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.
Create a payment link#
/v1/payment-linksAPI key, payments scopeA 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({ … });client.payment_links.create(…)$nowgate->paymentLinks->create([…]);Headers
Idempotency-KeystringrequiredA 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
titlestringrequired1 to 200 characters.
descriptionstringAt most 1000 characters.
price_amountFiatAmount (string)A fixed price in
price_currency; the payer picks any ofassets.price_currencystringUSD or EUR.
amountAmount (string)A fixed amount of one asset, with
networkandasset.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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerFrom 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 ismerchant.One of:
merchant,payer.expires_inintegerEach attempt's window, as for a payment (for a price in a currency, at most 3600).
From 900 to 86400.
metadatamap of stringCopied to every attempt's payment.
At most 20 keys.
order_id_prefixstringEach attempt's
order_idis the prefix, a dash and the attempt's number, such asDONATE-17.At most 40 characters.
brandingBrandingInput (object)3 fields of BrandingInput
display_namestringThe name checkout shows; your account name if left out.
At most 100 characters.
accent_colorstringPattern:
^#[0-9a-fA-F]{6}$. Example:"#f97316".logoLogoID (string)
success_urlstringAn https URL checkout offers as a button once paid. Checkout never redirects on its own.
At most 2048 characters.
cancel_urlstringAn https URL checkout offers to payers who leave.
At most 2048 characters.
receiptsbooleanWhether checkout offers payers an emailed receipt.
donationsDonations (object)2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
Responses
201 The link.
The PaymentLink object
idPaymentLinkID (string)requiredobject"payment_link"requiredstatusPaymentLinkStatus (string)requiredOne of:
active,inactive.titlestringrequireddescriptionstringpricingstringrequiredHow 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)requiredAn amount of a currency with at most two decimal places, e.g. "25.00".
currencystringrequiredExample:
"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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredThe pairs a payer may choose; empty means every pair Nowgate follows.
2 fields of Pair
networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerrequiredfee_paid_byFeePaidBy (string)requiredWho bears Nowgate's fee. With
payer, the payer sends enough for you to receive the whole price after the fee. The default ismerchant.One of:
merchant,payer.expires_inintegermetadatamap of stringrequiredorder_id_prefixstringbrandingBranding (object)required4 fields of Branding
display_namestringaccent_colorstringtext_colorstringThe text color checkout uses on the accent, chosen for WCAG AA contrast.
logoLogoID (string)
success_urlstringcancel_urlstringreceiptsbooleanrequireddonationsDonations (object)required2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
attemptsintegerrequiredHow many payments have been made on the link.
checkout_urlstringThe link's checkout page, to share. Anyone with it can make payments on the link.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
Location: The link's URL.
4xx, 5xx An error, as problem details.
Retrieve a payment link#
/v1/payment-links/{id}API key, read scopeawait nowgate.paymentLinks.retrieve(id);client.payment_links.retrieve(id)$nowgate->paymentLinks->retrieve($id);Path parameters
idPaymentLinkID (string)required
Responses
200 The link.
The PaymentLink object
idPaymentLinkID (string)requiredobject"payment_link"requiredstatusPaymentLinkStatus (string)requiredOne of:
active,inactive.titlestringrequireddescriptionstringpricingstringrequiredHow 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)requiredAn amount of a currency with at most two decimal places, e.g. "25.00".
currencystringrequiredExample:
"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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredThe pairs a payer may choose; empty means every pair Nowgate follows.
2 fields of Pair
networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerrequiredfee_paid_byFeePaidBy (string)requiredWho bears Nowgate's fee. With
payer, the payer sends enough for you to receive the whole price after the fee. The default ismerchant.One of:
merchant,payer.expires_inintegermetadatamap of stringrequiredorder_id_prefixstringbrandingBranding (object)required4 fields of Branding
display_namestringaccent_colorstringtext_colorstringThe text color checkout uses on the accent, chosen for WCAG AA contrast.
logoLogoID (string)
success_urlstringcancel_urlstringreceiptsbooleanrequireddonationsDonations (object)required2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
attemptsintegerrequiredHow many payments have been made on the link.
checkout_urlstringThe link's checkout page, to share. Anyone with it can make payments on the link.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
4xx, 5xx An error, as problem details.
List payment links#
/v1/payment-linksAPI key, read scopeYour payment links, newest first.
await nowgate.paymentLinks.list({ … });
for await (const item of nowgate.paymentLinks.listAll({ … })) { … }client.payment_links.list(…)
for item in client.payment_links.list_all(…): …$nowgate->paymentLinks->list([…]);
foreach ($nowgate->paymentLinks->listAll([…]) as $item) { … }Query parameters
limitintegerFrom 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"requireddataarray of PaymentLink (object)required26 fields of PaymentLink
idPaymentLinkID (string)requiredobject"payment_link"requiredstatusPaymentLinkStatus (string)requiredOne of:
active,inactive.titlestringrequireddescriptionstringpricingstringrequiredHow 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)requiredAn amount of a currency with at most two decimal places, e.g. "25.00".
currencystringrequiredExample:
"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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredThe pairs a payer may choose; empty means every pair Nowgate follows.
2 fields of Pair
networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerrequiredfee_paid_byFeePaidBy (string)requiredWho bears Nowgate's fee. With
payer, the payer sends enough for you to receive the whole price after the fee. The default ismerchant.One of:
merchant,payer.expires_inintegermetadatamap of stringrequiredorder_id_prefixstringbrandingBranding (object)required4 fields of Branding
display_namestringaccent_colorstringtext_colorstringThe text color checkout uses on the accent, chosen for WCAG AA contrast.
logoLogoID (string)
success_urlstringcancel_urlstringreceiptsbooleanrequireddonationsDonations (object)required2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
attemptsintegerrequiredHow many payments have been made on the link.
checkout_urlstringThe link's checkout page, to share. Anyone with it can make payments on the link.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
has_morebooleanrequired
4xx, 5xx An error, as problem details.
Update a payment link#
/v1/payment-links/{id}API key, payments scopeChanges 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, { … });client.payment_links.update(id, …)$nowgate->paymentLinks->update($id, […]);Path parameters
idPaymentLinkID (string)required
Body
statusPaymentLinkStatus (string)One of:
active,inactive.titlestring1 to 200 characters.
descriptionstringAt most 1000 characters.
price_amountFiatAmount (string)An amount of a currency with at most two decimal places, e.g. "25.00".
price_currencystringamountAmount (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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerFrom 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 ismerchant.One of:
merchant,payer.expires_inintegerFrom 900 to 86400.
metadatamap of stringAt most 20 keys.
order_id_prefixstringAt most 40 characters.
brandingBrandingInput (object)3 fields of BrandingInput
display_namestringThe name checkout shows; your account name if left out.
At most 100 characters.
accent_colorstringPattern:
^#[0-9a-fA-F]{6}$. Example:"#f97316".logoLogoID (string)
success_urlstringAt most 2048 characters.
cancel_urlstringAt most 2048 characters.
receiptsbooleandonationsDonations (object)2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
Responses
200 The link, updated.
The PaymentLink object
idPaymentLinkID (string)requiredobject"payment_link"requiredstatusPaymentLinkStatus (string)requiredOne of:
active,inactive.titlestringrequireddescriptionstringpricingstringrequiredHow 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)requiredAn amount of a currency with at most two decimal places, e.g. "25.00".
currencystringrequiredExample:
"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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredThe pairs a payer may choose; empty means every pair Nowgate follows.
2 fields of Pair
networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerrequiredfee_paid_byFeePaidBy (string)requiredWho bears Nowgate's fee. With
payer, the payer sends enough for you to receive the whole price after the fee. The default ismerchant.One of:
merchant,payer.expires_inintegermetadatamap of stringrequiredorder_id_prefixstringbrandingBranding (object)required4 fields of Branding
display_namestringaccent_colorstringtext_colorstringThe text color checkout uses on the accent, chosen for WCAG AA contrast.
logoLogoID (string)
success_urlstringcancel_urlstringreceiptsbooleanrequireddonationsDonations (object)required2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
attemptsintegerrequiredHow many payments have been made on the link.
checkout_urlstringThe link's checkout page, to share. Anyone with it can make payments on the link.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
4xx, 5xx An error, as problem details.
Upload a logo#
/v1/branding/logosAPI key, payments scopeA 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({ … });client.logos.create(…)$nowgate->logos->create([…]);Headers
Idempotency-KeystringrequiredA 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
datastringrequiredThe PNG or JPEG file, base64-encoded (the standard alphabet, with padding).
Responses
201 The logo.
The Logo object
idLogoID (string)requiredobject"logo"requiredwidthintegerrequiredheightintegerrequiredcreated_atTimestamp (string (date-time))required
4xx, 5xx An error, as problem details.
The payment link object#
idPaymentLinkID (string)requiredobject"payment_link"requiredstatusPaymentLinkStatus (string)requiredOne of:
active,inactive.titlestringrequireddescriptionstringpricingstringrequiredHow 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)requiredAn amount of a currency with at most two decimal places, e.g. "25.00".
currencystringrequiredExample:
"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
presetsor, withcustom, enters an amount betweenminandmax.5 fields of OpenAmount
currencystringrequiredUSD or EUR.
Example:
"USD".presetsarray of FiatAmount (string)Up to six amounts to offer, shown in ascending order.
custombooleanWhether 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)requiredThe pairs a payer may choose; empty means every pair Nowgate follows.
2 fields of Pair
networkNetwork (string)requiredNetwork identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)requiredAsset symbol on the network; see GET /assets.
markup_bpsintegerrequiredfee_paid_byFeePaidBy (string)requiredWho bears Nowgate's fee. With
payer, the payer sends enough for you to receive the whole price after the fee. The default ismerchant.One of:
merchant,payer.expires_inintegermetadatamap of stringrequiredorder_id_prefixstringbrandingBranding (object)required4 fields of Branding
display_namestringaccent_colorstringtext_colorstringThe text color checkout uses on the accent, chosen for WCAG AA contrast.
logoLogoID (string)
success_urlstringcancel_urlstringreceiptsbooleanrequireddonationsDonations (object)required2 fields of Donations
messagesbooleanWhether a donor may leave a name and a message (up to 280 characters).
anonymousbooleanWhether a donor may give anonymously. Their name is then never stored.
attemptsintegerrequiredHow many payments have been made on the link.
checkout_urlstringThe link's checkout page, to share. Anyone with it can make payments on the link.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required