Developer Docs

Create a checkout session for a subscription offer (recommended)

Recommended way to start a hosted subscription checkout for an existing offer. Replaces the deprecated POST /subscription/offer/:subscriptionOfferId/initiate.

Returns { sessionId, checkoutUrl } — redirect the buyer to checkoutUrl to subscribe. The subscription and first payment are created once the buyer submits a payment method during the session. Subscribe to checkout_session.* merchant webhooks — the paymentId is included in the payload once the session is completed (e.g. checkout_session.completed).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the subscription offer

Body Params
string

Optional override for the successful payment redirect URL. If not provided, uses the subscription offer's successUrl, then the system default.

string

Optional override for the cancel/failed payment redirect URL. If not provided, uses the subscription offer's cancelUrl.

string
deprecated

Default customer email pre-filled in the checkout session. @deprecated Prefer customer.email.

metadatas
object

Custom metadata for the session/subscription

number
≥ 0.25

Duration in hours before the session expires. 0.75 = 45 minutes, 24 = 1 day. Minimum 0.25 (15 minutes). If not provided, the session will not have an automatic expiration.

string
deprecated

Optional default billing country (ISO 3166-1 alpha-2). When set, the checkout session is pre-filled with this country and VAT is recomputed accordingly. Ignored silently if the country is not supported for tax. @deprecated Prefer customer.billingCountry.

customer
object

Customer information pre-filled in the checkout session (email, identity or business, billing country) with an optional locked flag to make those fields read-only for the buyer. Takes priority over the deprecated top-level customerEmail / billingCountry.

number
≥ 0

Marketplaces only: fixed fee to collect on the first subscription payment, in cents. Can only be set by the parent marketplace acting on behalf of a sub-merchant. Defaults to the marketplace's configured fee.

boolean
Defaults to false

When true, the checkout offers the buyer the option to save their payment method (card / wallet) for future payments. The saved payment method is attached to the merchant's customer matching the buyer's email (created if needed). Pass customer.id to instead anchor it to a specific existing customer, regardless of the email the buyer enters. Subscriptions always store the payment method for renewals; this flag surfaces the reusable-save consent to the buyer.

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