Create a checkout with subscription fields

Create a checkout session for an order: amount, currency, customer, basket and the checkout type your integration uses. The response returns the checkout, its checkout_id and the payment methods available for it.

The three subscription_id examples show only the subscription fields.

This page lists only the fields used for subscriptions. For all the other checkout fields (customer, basket, 3DS, shipping), see Create Checkout.

Examples

Select a card to show its request and response in the panels on the right. "Subscribe to an offer" is shown by default.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Defaults to hosted_page

The type of checkout: hosted_fields, hosted_page, api, payment_link, mobile_sdk, qrcode, mail_to_pay

Allowed:
string
enum
required
Defaults to direct_capture

Kind of order: authorize or direct_capture

Allowed:
string
required
Defaults to sub-2026-000123

Unique identifier used by the merchant for an order

string
enum
required
Defaults to recurring

Where the transaction takes place: e-commerce, moto, pos or recurring. Send recurring with offer_id.

Allowed:
string
enum
Defaults to recurring

The type of token that will be used. Send recurring with offer_id.

Allowed:
string

Subscribes your customer to this offer. Send payment_channel: recurring and token_type: recurring, and do not send amount: the amount and the currency come from the offer. The payment is the first payment of the offer, and the card becomes the one used for the rebills. See Subscription Engine.

string

Opens a hosted page to pay for an existing subscription: the failed payment, a specific unpaid rebill (order_id) or the next rebill with a new card (subscription_update). Do not send amount: the amount is the one of the payment being made. See Update the payment method.

string

With subscription_id: the unpaid rebill to pay. Cannot be combined with subscription_update. See Update the payment method.

string
enum

With subscription_id: charge changes the card of the subscription by paying the next rebill now. Cannot be combined with order_id. See Update the payment method.

Allowed:
string
Defaults to [email protected]

Customer email

string
Defaults to https://www.yourwebsite.com/accepted

URL to redirect your customer to once the payment process is completed successfully. For testing, please make sure to either send it in the request or have it set in your merchant account. Max. 500 characters.

string
Defaults to https://www.yourwebsite.com/declined

URL to redirect your customer to if the payment was declined. For testing, please make sure to either send it in the request or have it set in your merchant account. Max. 500 characters.

Headers
string
required
Defaults to 1.0.0

API version

Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json