npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

payme-generator

v1.0.1

Published

A generator of payme.sk payment links

Readme

payme-generator

A generator of payme.sk payment links

let fromUrl = new PayMeLink("https://payme.sk/?V=1&IBAN=SK9181800000007000155733&AM=0.01&CC=EUR&DT=20250421&PI=%2FVS0123456789%2FSS0123456789%2FKS1234&MSG=DO+NOT+SEND+ANY+MONEY+HERE")

let fromParsedParams = new PayMeLink({
	V: '1',
	IBAN: 'SK9181800000007000155733',
	AM: 0.01,
	CC: 'EUR',
	DT: '2025-04-21',
	PI: '/VS0123456789/SS0123456789/KS1234',
	MSG: 'DO NOT SEND ANY MONEY HERE',
	CN: null
})

let empty = new PayMeLink()
console.log(empty.setIBAN('SK9181800000007000155733').setAmount(0.01).setMessage('DO NOT SEND ANY MONEY HERE').getLink())

For full documentation of the format, please refer to: https://www.payme.sk/docs/PaymentLinkStandard_v1_2.pdf

[!WARNING] Really don't send any money to this bank account (SK9181800000007000155733) This bank account is only used as a preview. Please replace with your own Bank Account

Documentation

Constructor Overloads

  1. constructor(input: PayMeParams)

    • Creates a PayMeLink instance from an object containing the link parameters.
    • Parameters:
      • input (PayMeParams): Object containing the payment parameters.
    • Example:
      const payMeLink = new PayMeLink({
        V: "1",
        IBAN: "SK9181800000007000155733",
        AM: 100,
        CC: "EUR",
      });
  2. constructor(input: string | URL)

    • Creates a PayMeLink instance from a URL string or URL object.
    • Parameters:
      • input (string | URL): URL containing the payment parameters.
    • Example:
      const payMeLink = new PayMeLink("https://payme.sk/?V=1&IBAN=SK9181800000007000155733&AM=100&CC=EUR");
  3. constructor()

    • Creates a clean PayMeLink instance with default values.
    • Example:
      const payMeLink = new PayMeLink();

Methods

  1. get params(): PayMeParams

    • Retrieves the current parameters of the PayMeLink instance.
    • Returns:
      • (PayMeParams): Object containing the payment parameters.
    • Example:
      const params = payMeLink.params;
  2. setVersion(version: PayMeSupportedVersions): PayMeLink

    • Sets the version of the PayMe link.
    • Parameters:
      • version (PayMeSupportedVersions): The version to set.
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setVersion("1");
  3. setIBAN(iban: string): PayMeLink

    • Sets the IBAN (account number) for the PayMe link.
    • Parameters:
      • iban (string): The IBAN to set.
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setIBAN("SK9181800000007000155733");
  4. setAmount(amount: number): PayMeLink

    • Sets the amount for the PayMe link.
    • Parameters:
      • amount (number): The amount to set (must be positive and less than 9,999,999).
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setAmount(100);
  5. setCurrency(currency: CurrencyCode): PayMeLink

    • Sets the currency for the PayMe link.
    • Parameters:
      • currency (CurrencyCode): The currency code to set.
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setCurrency("EUR");
  6. setDueDate(dueDate: string): PayMeLink

    • Sets the due date for the PayMe link.
    • Parameters:
      • dueDate (string): The due date in any native Date class supported format.
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setDueDate("2025-04-21");
  7. setPaymentIdentifier(paymentIdentifier: string): PayMeLink

    • Sets the payment identifier for the PayMe link.
    • Parameters:
      • paymentIdentifier (string): The payment identifier (max 35 characters).
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setPaymentIdentifier("/VS12345/SS67890/KS1234");
  8. setMessage(message: string): PayMeLink

    • Sets the message for the PayMe link.
    • Parameters:
      • message (string): The message for the beneficiary (max 140 characters).
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setMessage("Payment for invoice #123");
  9. setCreditorName(creditorName: string): PayMeLink

    • Sets the creditor name for the PayMe link.
    • Parameters:
      • creditorName (string): The creditor name (max 70 characters).
    • Returns:
      • (PayMeLink): The updated PayMeLink instance.
    • Example:
      payMeLink.setCreditorName("John Doe");
  10. getLink(): string

    • Generates the PayMe link as a URL string.
    • Returns:
      • (string): The PayMe link URL.
    • Example:
      const link = payMeLink.getLink();
  11. getPayBySquare(): string

    • Generates the contents of a Pay BySquare QR code.
    • Returns:
      • (string): The QR code contents.
    • Example:
      const qrCodeContent = payMeLink.getPayBySquare();
  12. toString(): string

    • Converts the PayMeLink instance to a URL string.
    • Returns:
      • (string): The PayMe link URL.
    • Example:
      const linkString = payMeLink.toString();