Skip to main content
A checkout session is the entry point for subscriber onboarding. You create one by linking a service to a payment plan, and optionally pre-associating an existing user. Retempo always creates the session in PENDING status and returns it immediately — the session transitions to PAID only after the subscriber completes payment.

Request Body

string
required
The ID of the service the subscriber is signing up for.
string
required
The ID of the payment plan to attach to this checkout session. The plan must belong to the specified service; a mismatch returns a 404.
string
The ID of an existing Retempo user to pre-associate with this session. If omitted, the user is identified during the checkout flow.
string
An ISO 8601 datetime string specifying when the session expires. If omitted, the session does not expire automatically.

Response

A successful request returns HTTP 201 Created with the new checkout session object. The status is always PENDING.
object
The newly created checkout session.

201 — Checkout session created

Example Request

Error Codes

Checkout sessions are always created with status PENDING. The session transitions to PAID when the subscriber completes payment. Attempting to create a session with any other initial status returns a 400 error.