Checkout

Create a checkout session

post

Creates a checkout session using a Customer token. After creating the checkout session, redirect the customer to the url returned.

Authorizations
AuthorizationstringRequired

A Customer token generated using an API Key in the format 'Customer TOKEN_HERE'.

Header parameters
x-paynow-customer-ipstring · ipv4Optional

The IP address (IPv4 or IPv6) of the customer. Required if the request is not being made from the customer's browser.

x-paynow-customer-countrycodestringOptional

The customer's country code in ISO 3166-1 alpha-2 format. Optional, but recommended if you have this available.

Pattern: ^[A-Z]{2}$
Body

Request to create a new checkout session

subscriptionnull | booleanOptionalDeprecated

Whether this checkout creates a subscription. DEPRECATED: Use 'subscription' field in 'lines' array objects instead.

coupon_idstring · flake-idOptionalExample: 411486491630370816
affiliate_codenull | stringOptional

Optional affiliate code to track referrals

return_urlnull | stringOptional

Optional URL to redirect to after successful checkout

cancel_urlnull | stringOptional

Optional URL to redirect to if checkout is canceled

auto_redirectnull | booleanOptional

Whether to automatically redirect the customer (return_url must be set)

metadatanull | objectOptional

Optional metadata to associate with the checkout session. Do not store any sensitive information here.

Responses
200

OK

application/json
post
/v1/checkouts

Last updated

Was this helpful?