NowgateDocs

Payment links

Reusable checkout pages, for fixed prices and for donations.

On this page

A payment link never expires. Each attempt on it is an ordinary payment that names the link in payment_link, with its own quote, and sends you its events like any payment.

POST/v1/payment-linksAPI key, payments scope

A reusable checkout page that never expires. Each attempt on it is an ordinary payment that names the link in payment_link, with its own quote, and sends you its events like any payment. Price it in a currency (price_amount and price_currency; the payer picks an asset), in an asset (amount, network and asset; only that asset), or leave the amount open for donations (open_amount). Give exactly one of the three.

await nowgate.paymentLinks.create({ … });

Headers

  • Idempotency-Keystringrequired

    A unique key for this request, such as a UUID: 1-255 visible ASCII characters, without spaces. Retrying with the same key and the same request replays the original response (for at least 24 hours); the same key with a different request is refused with 422 idempotency_key_reused. Failed requests are not stored, so they can be retried with the same key.

    1 to 255 characters. Pattern: ^[!-~]+$.

Body

  • titlestringrequired

    1 to 200 characters.

  • descriptionstring

    At most 1000 characters.

  • price_amountFiatAmount (string)

    A fixed price in price_currency; the payer picks any of assets.

  • price_currencystring

    USD or EUR.

  • amountAmount (string)

    A fixed amount of one asset, with network and asset.

  • networkNetwork (string)

    Network identifier; see GET /assets. New networks may be added.

  • assetAssetSymbol (string)

    Asset symbol on the network; see GET /assets.

  • open_amountOpenAmount (object)

    An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

    5 fields of OpenAmount
    • currencystringrequired

      USD or EUR.

      Example: "USD".

    • presetsarray of FiatAmount (string)

      Up to six amounts to offer, shown in ascending order.

    • customboolean

      Whether the payer may enter an amount of their own.

    • minFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • maxFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

  • assetsarray of Pair (object)

    The pairs a payer may choose for a price in a currency. Every pair Nowgate follows if left out.

    2 fields of Pair
    • networkNetwork (string)required

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)required

      Asset symbol on the network; see GET /assets.

  • markup_bpsinteger

    From 0 to 1000.

  • fee_paid_byFeePaidBy (string)

    Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

    One of: merchant, payer.

  • expires_ininteger

    Each attempt's window, as for a payment (for a price in a currency, at most 3600).

    From 900 to 86400.

  • metadatamap of string

    Copied to every attempt's payment.

    At most 20 keys.

  • order_id_prefixstring

    Each attempt's order_id is the prefix, a dash and the attempt's number, such as DONATE-17.

    At most 40 characters.

  • brandingBrandingInput (object)
    3 fields of BrandingInput
    • display_namestring

      The name checkout shows; your account name if left out.

      At most 100 characters.

    • accent_colorstring

      Pattern: ^#[0-9a-fA-F]{6}$. Example: "#f97316".

    • logoLogoID (string)
  • success_urlstring

    An https URL checkout offers as a button once paid. Checkout never redirects on its own.

    At most 2048 characters.

  • cancel_urlstring

    An https URL checkout offers to payers who leave.

    At most 2048 characters.

  • receiptsboolean

    Whether checkout offers payers an emailed receipt.

  • donationsDonations (object)
    2 fields of Donations
    • messagesboolean

      Whether a donor may leave a name and a message (up to 280 characters).

    • anonymousboolean

      Whether a donor may give anonymously. Their name is then never stored.

Responses

201 The link.

The PaymentLink object
  • idPaymentLinkID (string)required
  • object"payment_link"required
  • statusPaymentLinkStatus (string)required

    One of: active, inactive.

  • titlestringrequired
  • descriptionstring
  • pricingstringrequired

    How the link is priced, in a currency, in an asset, or open.

    One of: fiat, asset, open.

  • pricePrice (object)
    2 fields of Price
    • amountFiatAmount (string)required

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • currencystringrequired

      Example: "USD".

  • amountAmount (string)

    A non-negative decimal amount in the asset's units, e.g. "12.5".

  • networkNetwork (string)

    Network identifier; see GET /assets. New networks may be added.

  • assetAssetSymbol (string)

    Asset symbol on the network; see GET /assets.

  • open_amountOpenAmount (object)

    An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

    5 fields of OpenAmount
    • currencystringrequired

      USD or EUR.

      Example: "USD".

    • presetsarray of FiatAmount (string)

      Up to six amounts to offer, shown in ascending order.

    • customboolean

      Whether the payer may enter an amount of their own.

    • minFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • maxFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

  • assetsarray of Pair (object)required

    The pairs a payer may choose; empty means every pair Nowgate follows.

    2 fields of Pair
    • networkNetwork (string)required

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)required

      Asset symbol on the network; see GET /assets.

  • markup_bpsintegerrequired
  • fee_paid_byFeePaidBy (string)required

    Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

    One of: merchant, payer.

  • expires_ininteger
  • metadatamap of stringrequired
  • order_id_prefixstring
  • brandingBranding (object)required
    4 fields of Branding
    • display_namestring
    • accent_colorstring
    • text_colorstring

      The text color checkout uses on the accent, chosen for WCAG AA contrast.

    • logoLogoID (string)
  • success_urlstring
  • cancel_urlstring
  • receiptsbooleanrequired
  • donationsDonations (object)required
    2 fields of Donations
    • messagesboolean

      Whether a donor may leave a name and a message (up to 280 characters).

    • anonymousboolean

      Whether a donor may give anonymously. Their name is then never stored.

  • attemptsintegerrequired

    How many payments have been made on the link.

  • checkout_urlstring

    The link's checkout page, to share. Anyone with it can make payments on the link.

  • created_atTimestamp (string (date-time))required
  • updated_atTimestamp (string (date-time))required
  • Location: The link's URL.

4xx, 5xx An error, as problem details.

GET/v1/payment-links/{id}API key, read scope
await nowgate.paymentLinks.retrieve(id);

Path parameters

  • idPaymentLinkID (string)required

Responses

200 The link.

The PaymentLink object
  • idPaymentLinkID (string)required
  • object"payment_link"required
  • statusPaymentLinkStatus (string)required

    One of: active, inactive.

  • titlestringrequired
  • descriptionstring
  • pricingstringrequired

    How the link is priced, in a currency, in an asset, or open.

    One of: fiat, asset, open.

  • pricePrice (object)
    2 fields of Price
    • amountFiatAmount (string)required

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • currencystringrequired

      Example: "USD".

  • amountAmount (string)

    A non-negative decimal amount in the asset's units, e.g. "12.5".

  • networkNetwork (string)

    Network identifier; see GET /assets. New networks may be added.

  • assetAssetSymbol (string)

    Asset symbol on the network; see GET /assets.

  • open_amountOpenAmount (object)

    An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

    5 fields of OpenAmount
    • currencystringrequired

      USD or EUR.

      Example: "USD".

    • presetsarray of FiatAmount (string)

      Up to six amounts to offer, shown in ascending order.

    • customboolean

      Whether the payer may enter an amount of their own.

    • minFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • maxFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

  • assetsarray of Pair (object)required

    The pairs a payer may choose; empty means every pair Nowgate follows.

    2 fields of Pair
    • networkNetwork (string)required

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)required

      Asset symbol on the network; see GET /assets.

  • markup_bpsintegerrequired
  • fee_paid_byFeePaidBy (string)required

    Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

    One of: merchant, payer.

  • expires_ininteger
  • metadatamap of stringrequired
  • order_id_prefixstring
  • brandingBranding (object)required
    4 fields of Branding
    • display_namestring
    • accent_colorstring
    • text_colorstring

      The text color checkout uses on the accent, chosen for WCAG AA contrast.

    • logoLogoID (string)
  • success_urlstring
  • cancel_urlstring
  • receiptsbooleanrequired
  • donationsDonations (object)required
    2 fields of Donations
    • messagesboolean

      Whether a donor may leave a name and a message (up to 280 characters).

    • anonymousboolean

      Whether a donor may give anonymously. Their name is then never stored.

  • attemptsintegerrequired

    How many payments have been made on the link.

  • checkout_urlstring

    The link's checkout page, to share. Anyone with it can make payments on the link.

  • created_atTimestamp (string (date-time))required
  • updated_atTimestamp (string (date-time))required

4xx, 5xx An error, as problem details.

GET/v1/payment-linksAPI key, read scope

Your payment links, newest first.

await nowgate.paymentLinks.list({ … });
for await (const item of nowgate.paymentLinks.listAll({ … })) { … }

Query parameters

  • limitinteger

    From 1 to 100. Default: 20.

  • starting_afterPaymentID (string)

    Return the page after (older than) this ID.

  • ending_beforePaymentID (string)

    Return the page before (newer than) this ID.

  • statusPaymentLinkStatus (string)

    One of: active, inactive.

Responses

200 A page of links.

The PaymentLinkList object
  • object"list"required
  • dataarray of PaymentLink (object)required
    26 fields of PaymentLink
    • idPaymentLinkID (string)required
    • object"payment_link"required
    • statusPaymentLinkStatus (string)required

      One of: active, inactive.

    • titlestringrequired
    • descriptionstring
    • pricingstringrequired

      How the link is priced, in a currency, in an asset, or open.

      One of: fiat, asset, open.

    • pricePrice (object)
      2 fields of Price
      • amountFiatAmount (string)required

        An amount of a currency with at most two decimal places, e.g. "25.00".

      • currencystringrequired

        Example: "USD".

    • amountAmount (string)

      A non-negative decimal amount in the asset's units, e.g. "12.5".

    • networkNetwork (string)

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)

      Asset symbol on the network; see GET /assets.

    • open_amountOpenAmount (object)

      An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

      5 fields of OpenAmount
      • currencystringrequired

        USD or EUR.

        Example: "USD".

      • presetsarray of FiatAmount (string)

        Up to six amounts to offer, shown in ascending order.

      • customboolean

        Whether the payer may enter an amount of their own.

      • minFiatAmount (string)

        An amount of a currency with at most two decimal places, e.g. "25.00".

      • maxFiatAmount (string)

        An amount of a currency with at most two decimal places, e.g. "25.00".

    • assetsarray of Pair (object)required

      The pairs a payer may choose; empty means every pair Nowgate follows.

      2 fields of Pair
      • networkNetwork (string)required

        Network identifier; see GET /assets. New networks may be added.

      • assetAssetSymbol (string)required

        Asset symbol on the network; see GET /assets.

    • markup_bpsintegerrequired
    • fee_paid_byFeePaidBy (string)required

      Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

      One of: merchant, payer.

    • expires_ininteger
    • metadatamap of stringrequired
    • order_id_prefixstring
    • brandingBranding (object)required
      4 fields of Branding
      • display_namestring
      • accent_colorstring
      • text_colorstring

        The text color checkout uses on the accent, chosen for WCAG AA contrast.

      • logoLogoID (string)
    • success_urlstring
    • cancel_urlstring
    • receiptsbooleanrequired
    • donationsDonations (object)required
      2 fields of Donations
      • messagesboolean

        Whether a donor may leave a name and a message (up to 280 characters).

      • anonymousboolean

        Whether a donor may give anonymously. Their name is then never stored.

    • attemptsintegerrequired

      How many payments have been made on the link.

    • checkout_urlstring

      The link's checkout page, to share. Anyone with it can make payments on the link.

    • created_atTimestamp (string (date-time))required
    • updated_atTimestamp (string (date-time))required
  • has_morebooleanrequired

4xx, 5xx An error, as problem details.

PATCH/v1/payment-links/{id}API key, payments scope

Changes the fields you send and leaves the rest. A new price applies to new attempts only; payments already made keep theirs. Set status to inactive to stop new attempts while the link's payments complete. Send an empty string to clear description, order_id_prefix, success_url or cancel_url. branding, donations and open_amount replace the whole object.

await nowgate.paymentLinks.update(id, { … });

Path parameters

  • idPaymentLinkID (string)required

Body

  • statusPaymentLinkStatus (string)

    One of: active, inactive.

  • titlestring

    1 to 200 characters.

  • descriptionstring

    At most 1000 characters.

  • price_amountFiatAmount (string)

    An amount of a currency with at most two decimal places, e.g. "25.00".

  • price_currencystring
  • amountAmount (string)

    A non-negative decimal amount in the asset's units, e.g. "12.5".

  • networkNetwork (string)

    Network identifier; see GET /assets. New networks may be added.

  • assetAssetSymbol (string)

    Asset symbol on the network; see GET /assets.

  • open_amountOpenAmount (object)

    An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

    5 fields of OpenAmount
    • currencystringrequired

      USD or EUR.

      Example: "USD".

    • presetsarray of FiatAmount (string)

      Up to six amounts to offer, shown in ascending order.

    • customboolean

      Whether the payer may enter an amount of their own.

    • minFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • maxFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

  • assetsarray of Pair (object)
    2 fields of Pair
    • networkNetwork (string)required

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)required

      Asset symbol on the network; see GET /assets.

  • markup_bpsinteger

    From 0 to 1000.

  • fee_paid_byFeePaidBy (string)

    Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

    One of: merchant, payer.

  • expires_ininteger

    From 900 to 86400.

  • metadatamap of string

    At most 20 keys.

  • order_id_prefixstring

    At most 40 characters.

  • brandingBrandingInput (object)
    3 fields of BrandingInput
    • display_namestring

      The name checkout shows; your account name if left out.

      At most 100 characters.

    • accent_colorstring

      Pattern: ^#[0-9a-fA-F]{6}$. Example: "#f97316".

    • logoLogoID (string)
  • success_urlstring

    At most 2048 characters.

  • cancel_urlstring

    At most 2048 characters.

  • receiptsboolean
  • donationsDonations (object)
    2 fields of Donations
    • messagesboolean

      Whether a donor may leave a name and a message (up to 280 characters).

    • anonymousboolean

      Whether a donor may give anonymously. Their name is then never stored.

Responses

200 The link, updated.

The PaymentLink object
  • idPaymentLinkID (string)required
  • object"payment_link"required
  • statusPaymentLinkStatus (string)required

    One of: active, inactive.

  • titlestringrequired
  • descriptionstring
  • pricingstringrequired

    How the link is priced, in a currency, in an asset, or open.

    One of: fiat, asset, open.

  • pricePrice (object)
    2 fields of Price
    • amountFiatAmount (string)required

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • currencystringrequired

      Example: "USD".

  • amountAmount (string)

    A non-negative decimal amount in the asset's units, e.g. "12.5".

  • networkNetwork (string)

    Network identifier; see GET /assets. New networks may be added.

  • assetAssetSymbol (string)

    Asset symbol on the network; see GET /assets.

  • open_amountOpenAmount (object)

    An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

    5 fields of OpenAmount
    • currencystringrequired

      USD or EUR.

      Example: "USD".

    • presetsarray of FiatAmount (string)

      Up to six amounts to offer, shown in ascending order.

    • customboolean

      Whether the payer may enter an amount of their own.

    • minFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • maxFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

  • assetsarray of Pair (object)required

    The pairs a payer may choose; empty means every pair Nowgate follows.

    2 fields of Pair
    • networkNetwork (string)required

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)required

      Asset symbol on the network; see GET /assets.

  • markup_bpsintegerrequired
  • fee_paid_byFeePaidBy (string)required

    Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

    One of: merchant, payer.

  • expires_ininteger
  • metadatamap of stringrequired
  • order_id_prefixstring
  • brandingBranding (object)required
    4 fields of Branding
    • display_namestring
    • accent_colorstring
    • text_colorstring

      The text color checkout uses on the accent, chosen for WCAG AA contrast.

    • logoLogoID (string)
  • success_urlstring
  • cancel_urlstring
  • receiptsbooleanrequired
  • donationsDonations (object)required
    2 fields of Donations
    • messagesboolean

      Whether a donor may leave a name and a message (up to 280 characters).

    • anonymousboolean

      Whether a donor may give anonymously. Their name is then never stored.

  • attemptsintegerrequired

    How many payments have been made on the link.

  • checkout_urlstring

    The link's checkout page, to share. Anyone with it can make payments on the link.

  • created_atTimestamp (string (date-time))required
  • updated_atTimestamp (string (date-time))required

4xx, 5xx An error, as problem details.

POST/v1/branding/logosAPI key, payments scope

A PNG or JPEG of at most 2048 × 2048 pixels, as base64, within the 64 KiB request limit. Nowgate decodes it, scales it to fit 512 × 512 and stores it re-encoded as PNG: checkout never serves what you sent. Use its ID in a link's branding.

await nowgate.logos.create({ … });

Headers

  • Idempotency-Keystringrequired

    A unique key for this request, such as a UUID: 1-255 visible ASCII characters, without spaces. Retrying with the same key and the same request replays the original response (for at least 24 hours); the same key with a different request is refused with 422 idempotency_key_reused. Failed requests are not stored, so they can be retried with the same key.

    1 to 255 characters. Pattern: ^[!-~]+$.

Body

  • datastringrequired

    The PNG or JPEG file, base64-encoded (the standard alphabet, with padding).

Responses

201 The logo.

The Logo object
  • idLogoID (string)required
  • object"logo"required
  • widthintegerrequired
  • heightintegerrequired
  • created_atTimestamp (string (date-time))required

4xx, 5xx An error, as problem details.

  • idPaymentLinkID (string)required
  • object"payment_link"required
  • statusPaymentLinkStatus (string)required

    One of: active, inactive.

  • titlestringrequired
  • descriptionstring
  • pricingstringrequired

    How the link is priced, in a currency, in an asset, or open.

    One of: fiat, asset, open.

  • pricePrice (object)
    2 fields of Price
    • amountFiatAmount (string)required

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • currencystringrequired

      Example: "USD".

  • amountAmount (string)

    A non-negative decimal amount in the asset's units, e.g. "12.5".

  • networkNetwork (string)

    Network identifier; see GET /assets. New networks may be added.

  • assetAssetSymbol (string)

    Asset symbol on the network; see GET /assets.

  • open_amountOpenAmount (object)

    An open amount, for donations: the payer picks one of presets or, with custom, enters an amount between min and max.

    5 fields of OpenAmount
    • currencystringrequired

      USD or EUR.

      Example: "USD".

    • presetsarray of FiatAmount (string)

      Up to six amounts to offer, shown in ascending order.

    • customboolean

      Whether the payer may enter an amount of their own.

    • minFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

    • maxFiatAmount (string)

      An amount of a currency with at most two decimal places, e.g. "25.00".

  • assetsarray of Pair (object)required

    The pairs a payer may choose; empty means every pair Nowgate follows.

    2 fields of Pair
    • networkNetwork (string)required

      Network identifier; see GET /assets. New networks may be added.

    • assetAssetSymbol (string)required

      Asset symbol on the network; see GET /assets.

  • markup_bpsintegerrequired
  • fee_paid_byFeePaidBy (string)required

    Who bears Nowgate's fee. With payer, the payer sends enough for you to receive the whole price after the fee. The default is merchant.

    One of: merchant, payer.

  • expires_ininteger
  • metadatamap of stringrequired
  • order_id_prefixstring
  • brandingBranding (object)required
    4 fields of Branding
    • display_namestring
    • accent_colorstring
    • text_colorstring

      The text color checkout uses on the accent, chosen for WCAG AA contrast.

    • logoLogoID (string)
  • success_urlstring
  • cancel_urlstring
  • receiptsbooleanrequired
  • donationsDonations (object)required
    2 fields of Donations
    • messagesboolean

      Whether a donor may leave a name and a message (up to 280 characters).

    • anonymousboolean

      Whether a donor may give anonymously. Their name is then never stored.

  • attemptsintegerrequired

    How many payments have been made on the link.

  • checkout_urlstring

    The link's checkout page, to share. Anyone with it can make payments on the link.

  • created_atTimestamp (string (date-time))required
  • updated_atTimestamp (string (date-time))required