Skip to main content

Create Checkout Session

POST/subscriptions/checkout-sessions
Creates a hosted checkout session that redirects the customer to complete their subscription purchase. This is the primary way for SaaS integrations to create subscriptions programmatically.

Authentication

Headers

Request Body

You must provide either customer.id (to reference an existing customer) or the full set of customer.country_code, customer.phone, customer.firstName, customer.lastName, and customer.email (to create or match a customer).

Example Request (New Customer)

Example Request (Existing Customer)

Success Response

Response Fields

Flow

  1. Your server creates a checkout session via this endpoint
  2. Redirect the customer to the checkout_url
  3. The customer completes payment on the hosted checkout page
  4. On success, the customer is redirected to your success_url with ?rmz-subscription-id={id} appended as a query parameter
  5. A subscription.created webhook is fired to your webhook endpoint
Example redirect:
Use the rmz-subscription-id query parameter from the redirect to immediately look up the subscription. Always also listen for the subscription.created webhook to confirm the subscription was successfully created, as the redirect alone is not a guarantee of payment success.

Error Responses