anon_email
API referenceBilling

Start a crypto checkout

POST
/billing/crypto-checkout

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.

Authorization

CognitoUserPool
headerAuthorizationBearer <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.

Request Body

application/json
  1. body
plan*string

Paid tier to check out.

Value in"lite""pro"
years*integer

Years of coverage the invoice covers.

Range1 <= value <= 3

Response Body

Hosted invoice URL.

application/json
  1. response
invoice_url*string

Hosted crypto invoice URL to redirect to.

Formaturi
curl -X POST "https://example.com/billing/crypto-checkout" \  -H "Content-Type: application/json" \  -d '{    "plan": "lite",    "years": 1  }'
{  "invoice_url": "http://example.com"}