Subscriptions
Plans, subscriptions and their invoices, each period paid on-chain as an ordinary payment.
On this page
A plan is what a subscription costs and how often. A subscription bills one email address on a
plan, with an invoice each period; each invoice is paid by ordinary payments
that carry its invoice and subscription. Nothing is charged automatically: Nowgate emails the
subscriber their invoices, reminders and notices, and moves the subscription through past_due,
unpaid and, at the end of dunning, canceled.
Create a plan#
/v1/plansAPI key, payments scopeA plan is what a subscription costs and how often: a price in USD or EUR (price_amount, price_currency) or in an asset (amount, network, asset), an interval, and an optional free trial. The price and the interval never change; make a new plan for a new price.
await nowgate.plans.create({ … });client.plans.create(…)$nowgate->plans->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
namestringrequired1 to 100 characters.
descriptionstringAt most 500 characters.
price_amountFiatAmount (string)An amount of a currency with at most two decimal places, e.g. "25.00".
price_currencystringExample:
"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.
intervalInterval (string)requiredOne of:
day,week,month,year.interval_countintegerIntervals per period (1 by default). A period is a day to a year.
From 1 to 365.
trial_daysintegerFrom 0 to 365.
assetsarray of Pair (object)For a price in a currency, the pairs a subscriber may pay with; every pair by default.
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.metadatamap of stringAt most 20 keys.
Responses
201 The plan.
The Plan object
idPlanID (string)requiredobject"plan"requiredstatusPlanStatus (string)requiredOne of:
active,archived.namestringrequireddescriptionstringpricePrice (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.
intervalInterval (string)requiredOne of:
day,week,month,year.interval_countintegerrequiredtrial_daysintegerrequiredassetsarray of Pair (object)required2 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.metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
Location:
4xx, 5xx An error, as problem details.
Retrieve a plan#
/v1/plans/{id}API key, read scopeawait nowgate.plans.retrieve(id);client.plans.retrieve(id)$nowgate->plans->retrieve($id);Path parameters
idPlanID (string)required
Responses
200 The plan.
The Plan object
idPlanID (string)requiredobject"plan"requiredstatusPlanStatus (string)requiredOne of:
active,archived.namestringrequireddescriptionstringpricePrice (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.
intervalInterval (string)requiredOne of:
day,week,month,year.interval_countintegerrequiredtrial_daysintegerrequiredassetsarray of Pair (object)required2 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.metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
4xx, 5xx An error, as problem details.
List plans#
/v1/plansAPI key, read scopeawait nowgate.plans.list({ … });
for await (const item of nowgate.plans.listAll({ … })) { … }client.plans.list(…)
for item in client.plans.list_all(…): …$nowgate->plans->list([…]);
foreach ($nowgate->plans->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.
statusPlanStatus (string)One of:
active,archived.
Responses
200 A page of plans, newest first.
The PlanList object
object"list"requireddataarray of Plan (object)required18 fields of Plan
idPlanID (string)requiredobject"plan"requiredstatusPlanStatus (string)requiredOne of:
active,archived.namestringrequireddescriptionstringpricePrice (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.
intervalInterval (string)requiredOne of:
day,week,month,year.interval_countintegerrequiredtrial_daysintegerrequiredassetsarray of Pair (object)required2 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.metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
has_morebooleanrequired
4xx, 5xx An error, as problem details.
Update a plan#
/v1/plans/{id}API key, payments scopeChanges a plan's name, description, trial (for new subscriptions), assets, markup, fee mode, metadata or status. The assets, markup and fee mode apply to payments made after the change. An archived plan takes no new subscriptions; its subscriptions carry on.
await nowgate.plans.update(id, { … });client.plans.update(id, …)$nowgate->plans->update($id, […]);Path parameters
idPlanID (string)required
Body
statusPlanStatus (string)One of:
active,archived.namestring1 to 100 characters.
descriptionstringAt most 500 characters.
trial_daysintegerFrom 0 to 365.
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.metadatamap of stringAt most 20 keys.
Responses
200 The plan.
The Plan object
idPlanID (string)requiredobject"plan"requiredstatusPlanStatus (string)requiredOne of:
active,archived.namestringrequireddescriptionstringpricePrice (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.
intervalInterval (string)requiredOne of:
day,week,month,year.interval_countintegerrequiredtrial_daysintegerrequiredassetsarray of Pair (object)required2 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.metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
4xx, 5xx An error, as problem details.
Create a subscription#
/v1/subscriptionsAPI key, payments scopeSubscribes an email address to a plan. With a trial, the first invoice comes before the trial ends; without one, the first invoice is issued at once, and the subscription starts when it is paid: send the subscriber to latest_invoice.checkout_url. Nowgate emails the subscriber their invoices and reminders unless emails is false. At most 1,000 subscriptions a day per merchant by default (subscription_limit).
await nowgate.subscriptions.create({ … });client.subscriptions.create(…)$nowgate->subscriptions->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
planPlanID (string)requiredsubscriberSubscriberInput (object)required3 fields of SubscriberInput
emailstringrequiredAt most 254 characters.
namestringAt most 100 characters.
localestringThe language of the emails and of the subscriber's page; English by default.
One of:
en,es,pt-BR,fr,de,it,tr,ru,zh-CN,ja.
trial_daysintegerOverrides the plan's trial.
From 0 to 365.
emailsbooleanWhether Nowgate emails the subscriber (true by default).
external_idstringAt most 100 characters.
metadatamap of stringAt most 20 keys.
Responses
201 The subscription.
The Subscription object
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
Location:
4xx, 5xx An error, as problem details.
Retrieve a subscription#
/v1/subscriptions/{id}API key, read scopeawait nowgate.subscriptions.retrieve(id);client.subscriptions.retrieve(id)$nowgate->subscriptions->retrieve($id);Path parameters
idSubscriptionID (string)required
Responses
200 The subscription.
The Subscription object
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
4xx, 5xx An error, as problem details.
List subscriptions#
/v1/subscriptionsAPI key, read scopeawait nowgate.subscriptions.list({ … });
for await (const item of nowgate.subscriptions.listAll({ … })) { … }client.subscriptions.list(…)
for item in client.subscriptions.list_all(…): …$nowgate->subscriptions->list([…]);
foreach ($nowgate->subscriptions->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.
statusSubscriptionStatus (string)One of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)emailstringAt most 254 characters.
external_idstringAt most 100 characters.
Responses
200 A page of subscriptions, newest first.
The SubscriptionList object
object"list"requireddataarray of Subscription (object)required20 fields of Subscription
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
has_morebooleanrequired
4xx, 5xx An error, as problem details.
Update a subscription#
/v1/subscriptions/{id}API key, payments scopeMoves the subscription to another plan from the next period (no proration), sets or undoes its cancellation at the end of the period, or changes the subscriber's details, the emails switch or the metadata.
await nowgate.subscriptions.update(id, { … });client.subscriptions.update(id, …)$nowgate->subscriptions->update($id, […]);Path parameters
idSubscriptionID (string)required
Body
planPlanID (string)cancel_at_period_endbooleansubscriberSubscriberInput (object)3 fields of SubscriberInput
emailstringrequiredAt most 254 characters.
namestringAt most 100 characters.
localestringThe language of the emails and of the subscriber's page; English by default.
One of:
en,es,pt-BR,fr,de,it,tr,ru,zh-CN,ja.
emailsbooleanmetadatamap of stringAt most 20 keys.
Responses
200 The subscription.
The Subscription object
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
4xx, 5xx An error, as problem details.
Cancel a subscription at once#
/v1/subscriptions/{id}/cancelAPI key, payments scopeEnds the subscription now and voids its open invoice. Nothing is refunded automatically: refund a payment with POST /payments/{id}/refunds. To end it at the end of the period instead, update it with cancel_at_period_end.
await nowgate.subscriptions.cancel(id);client.subscriptions.cancel(id)$nowgate->subscriptions->cancel($id);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:
^[!-~]+$.
Path parameters
idSubscriptionID (string)required
Responses
200 The canceled subscription.
The Subscription object
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
4xx, 5xx An error, as problem details.
Replace the subscriber's link#
/v1/subscriptions/{id}/rotate-linkAPI key, payments scopeGives the subscription a new subscriber_url; the old link stops working at once. For a subscriber whose link went astray.
await nowgate.subscriptions.rotateLink(id);client.subscriptions.rotate_link(id)$nowgate->subscriptions->rotateLink($id);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:
^[!-~]+$.
Path parameters
idSubscriptionID (string)required
Responses
200 The subscription, with its new link.
The Subscription object
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
4xx, 5xx An error, as problem details.
Retrieve an invoice#
/v1/invoices/{id}API key, read scopeawait nowgate.invoices.retrieve(id);client.invoices.retrieve(id)$nowgate->invoices->retrieve($id);Path parameters
idInvoiceID (string)required
Responses
200 The invoice.
The Invoice object
idInvoiceID (string)requiredobject"invoice"requirednumberstringrequiredExample:
"INV-000123".statusInvoiceStatus (string)requiredOne of:
open,paid,void.subscriptionSubscriptionID (string)requiredplanPlanID (string)requiredcurrencystringExample:
"USD".networkNetwork (string)Network identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)Asset symbol on the network; see GET /assets.
amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_paidAmount (string)requiredWhat its payments are worth; a partial payment counts at its own quote.
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
overpaidbooleanrequiredperiod_startTimestamp (string (date-time))period_endTimestamp (string (date-time))issued_atTimestamp (string (date-time))requireddue_atTimestamp (string (date-time))requiredpaid_atTimestamp (string (date-time))voided_atTimestamp (string (date-time))void_reasonstringOne of:
canceled,unpaid,replaced.paymentsarray of PaymentID (string)requiredcheckout_urlstringThe invoice's page, where the subscriber picks an asset and pays.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
4xx, 5xx An error, as problem details.
List invoices#
/v1/invoicesAPI key, read scopeawait nowgate.invoices.list({ … });
for await (const item of nowgate.invoices.listAll({ … })) { … }client.invoices.list(…)
for item in client.invoices.list_all(…): …$nowgate->invoices->list([…]);
foreach ($nowgate->invoices->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.
subscriptionSubscriptionID (string)statusInvoiceStatus (string)One of:
open,paid,void.
Responses
200 A page of invoices, newest first.
The InvoiceList object
object"list"requireddataarray of Invoice (object)required25 fields of Invoice
idInvoiceID (string)requiredobject"invoice"requirednumberstringrequiredExample:
"INV-000123".statusInvoiceStatus (string)requiredOne of:
open,paid,void.subscriptionSubscriptionID (string)requiredplanPlanID (string)requiredcurrencystringExample:
"USD".networkNetwork (string)Network identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)Asset symbol on the network; see GET /assets.
amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_paidAmount (string)requiredWhat its payments are worth; a partial payment counts at its own quote.
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
overpaidbooleanrequiredperiod_startTimestamp (string (date-time))period_endTimestamp (string (date-time))issued_atTimestamp (string (date-time))requireddue_atTimestamp (string (date-time))requiredpaid_atTimestamp (string (date-time))voided_atTimestamp (string (date-time))void_reasonstringOne of:
canceled,unpaid,replaced.paymentsarray of PaymentID (string)requiredcheckout_urlstringThe invoice's page, where the subscriber picks an asset and pays.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
has_morebooleanrequired
4xx, 5xx An error, as problem details.
Move a subscription's time (sandbox)#
/v1/sandbox/subscriptions/{id}/simulateAPI key, payments scopeIn the sandbox (and dev and test), moves the subscription's whole timeline earlier so that its next moment (to: next), or a named one, is now, then runs its schedule at once: a year of renewals, reminders and dunning in a few calls. In live this route doesn't exist: 404.
await nowgate.sandbox.simulateSubscription(id, { … });client.sandbox.simulate_subscription(id, …)$nowgate->sandbox->simulateSubscription($id, […]);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:
^[!-~]+$.
Path parameters
idSubscriptionID (string)required
Body
action"advance"requiredtostringThe moment to bring to now;
next(the default) is the next one on its schedule.One of:
next,invoice,due,grace_end,dunning_end,period_end.
Responses
200 The subscription after its schedule ran.
The Subscription object
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
4xx, 5xx An error, as problem details.
Pay an invoice (sandbox)#
/v1/sandbox/invoices/{id}/simulateAPI key, payments scopeIn the sandbox (and dev and test), pays what remains of an open invoice: a payment as the invoice's page makes one, in the given asset (the plan's own for a price in an asset), then a simulated deposit of its amount. The payment finishes about 10 seconds later, and the invoice with it. In live this route doesn't exist: 404.
await nowgate.sandbox.simulateInvoice(id, { … });client.sandbox.simulate_invoice(id, …)$nowgate->sandbox->simulateInvoice($id, […]);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:
^[!-~]+$.
Path parameters
idInvoiceID (string)required
Body
actionstringrequiredpay: the only action.
At most 20 characters.
networkNetwork (string)Network identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)Asset symbol on the network; see GET /assets.
Responses
202 The payment made; its deposit settles shortly.
Returns The Payment object.
4xx, 5xx An error, as problem details.
Subscription event#
your endpoint (you choose the URL)Sent by NowgateNowgate POSTs subscription.created, subscription.<status> on every change of a subscription's status (active, past_due, unpaid, canceled), subscription.renewed when a period begins paid for, and subscription.updated when its plan, cancellation, subscriber or emails switch changes. Signed and retried as payment events are.
Headers
Nowgate-SignaturestringrequiredNowgate-Event-IdEventID (string)required
Body
idEventID (string)requiredobject"event"requiredtypestringrequiredsubscription.created, subscription.<status>, subscription.renewed or subscription.updated.
api_versionstringrequiredExample:
"2026-11-01".environmentstringrequiredOne of:
live,sandbox,dev,test.created_atTimestamp (string (date-time))requireddataobjectrequired1 fields
objectSubscription (object)required20 fields of Subscription
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
Responses
200 Any 2xx acknowledges the event.
Invoice event#
your endpoint (you choose the URL)Sent by NowgateNowgate POSTs invoice.created when a subscription's invoice is issued, invoice.paid once its payments are worth its amount, invoice.void when it won't be paid, and invoice.reopened in the rare case that a payment it counted is reversed. The invoice's payments send their own payment events.
Headers
Nowgate-SignaturestringrequiredNowgate-Event-IdEventID (string)required
Body
idEventID (string)requiredobject"event"requiredtypestringrequiredinvoice.created, invoice.paid, invoice.void or invoice.reopened.
api_versionstringrequiredExample:
"2026-11-01".environmentstringrequiredOne of:
live,sandbox,dev,test.created_atTimestamp (string (date-time))requireddataobjectrequired1 fields
objectInvoice (object)requiredAmounts are in the currency (
currency) or the asset (network,asset) of the plan's price.25 fields of Invoice
idInvoiceID (string)requiredobject"invoice"requirednumberstringrequiredExample:
"INV-000123".statusInvoiceStatus (string)requiredOne of:
open,paid,void.subscriptionSubscriptionID (string)requiredplanPlanID (string)requiredcurrencystringExample:
"USD".networkNetwork (string)Network identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)Asset symbol on the network; see GET /assets.
amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_paidAmount (string)requiredWhat its payments are worth; a partial payment counts at its own quote.
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
overpaidbooleanrequiredperiod_startTimestamp (string (date-time))period_endTimestamp (string (date-time))issued_atTimestamp (string (date-time))requireddue_atTimestamp (string (date-time))requiredpaid_atTimestamp (string (date-time))voided_atTimestamp (string (date-time))void_reasonstringOne of:
canceled,unpaid,replaced.paymentsarray of PaymentID (string)requiredcheckout_urlstringThe invoice's page, where the subscriber picks an asset and pays.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
Responses
200 Any 2xx acknowledges the event.
The plan object#
idPlanID (string)requiredobject"plan"requiredstatusPlanStatus (string)requiredOne of:
active,archived.namestringrequireddescriptionstringpricePrice (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.
intervalInterval (string)requiredOne of:
day,week,month,year.interval_countintegerrequiredtrial_daysintegerrequiredassetsarray of Pair (object)required2 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.metadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))required
The subscription object#
idSubscriptionID (string)requiredobject"subscription"requiredstatusSubscriptionStatus (string)requiredOne of:
trialing,incomplete,active,past_due,unpaid,canceled.planPlanID (string)requiredpending_planPlanID (string)A plan change, applied from the next period.
subscriberSubscriber (object)required3 fields of Subscriber
emailstringCleared 30 days after the subscription ends.
namestringlocalestringrequired
emailsbooleanrequiredtrial_endTimestamp (string (date-time))current_period_startTimestamp (string (date-time))current_period_endTimestamp (string (date-time))cancel_at_period_endbooleanrequiredcanceled_atTimestamp (string (date-time))cancel_reasonstringOne of:
merchant,subscriber,unpaid,incomplete.latest_invoiceInvoiceSummary (object)6 fields of InvoiceSummary
idInvoiceID (string)requiredstatusInvoiceStatus (string)requiredOne of:
open,paid,void.amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
due_atTimestamp (string (date-time))requiredcheckout_urlstring
subscriber_urlstringThe subscriber's own page, to pay, cancel at the end of the period and see their invoices.
external_idstringmetadatamap of stringrequiredcreated_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired
The invoice object#
Amounts are in the currency (currency) or the asset (network, asset) of the plan's price.
idInvoiceID (string)requiredobject"invoice"requirednumberstringrequiredExample:
"INV-000123".statusInvoiceStatus (string)requiredOne of:
open,paid,void.subscriptionSubscriptionID (string)requiredplanPlanID (string)requiredcurrencystringExample:
"USD".networkNetwork (string)Network identifier; see GET /assets. New networks may be added.
assetAssetSymbol (string)Asset symbol on the network; see GET /assets.
amount_dueAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
amount_paidAmount (string)requiredWhat its payments are worth; a partial payment counts at its own quote.
amount_remainingAmount (string)requiredA non-negative decimal amount in the asset's units, e.g. "12.5".
overpaidbooleanrequiredperiod_startTimestamp (string (date-time))period_endTimestamp (string (date-time))issued_atTimestamp (string (date-time))requireddue_atTimestamp (string (date-time))requiredpaid_atTimestamp (string (date-time))voided_atTimestamp (string (date-time))void_reasonstringOne of:
canceled,unpaid,replaced.paymentsarray of PaymentID (string)requiredcheckout_urlstringThe invoice's page, where the subscriber picks an asset and pays.
created_atTimestamp (string (date-time))requiredupdated_atTimestamp (string (date-time))requiredversionintegerrequired