API referenceBilling
Start a crypto checkout
POST
Creates a NOWPayments invoice for a yearly plan term and returns its hosted payment URL. Crypto is yearly-only and priced identically to card: the rail is cheaper for the service, so there is no surcharge.
One to three years may be purchased; the paid invoice credits that many years onto the subscription period when the provider callback reports it finished.
CognitoUserPoolheader
AuthorizationBearer <token>Cognito user pool ID token. API Gateway validates the token (identity
token: no OAuth scopes are configured on the authorizer) and forwards
its claims; the sub claim is the tenant key.
application/json- body
plan*stringPaid tier to check out.
Value in
"lite""pro"years*integerYears of coverage the invoice covers.
Range
1 <= value <= 3Hosted invoice URL.
application/json- response
invoice_url*stringHosted crypto invoice URL to redirect to.
Format
uricurl -X POST "https://example.com/billing/crypto-checkout" \ -H "Content-Type: application/json" \ -d '{ "plan": "lite", "years": 1 }'{ "invoice_url": "http://example.com"}