v61

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-08-018131,3812.6 MB
OpenMeter Customers

Create Stripe Checkout Session

Create a Stripe Checkout Session for the customer.

Creates a Checkout Session for collecting payment method information from customers. The session operates in "setup" mode, which collects payment details without charging the customer immediately. The collected payment method can be used for future subscription billing.

For hosted checkout sessions, redirect customers to the returned URL. For embedded sessions, use the client_secret to initialize Stripe.js in your application.

post/v3/openmeter/customers/{customerId}/billing/stripe/checkout-sessions

Path parameters

customerIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

Example request

{
  "stripe_options": {
    "currency": "USD"
  }
}

Response

CreateStripeCheckoutSessionResult created response.

customer_idstring required

The customer ID in the billing system.

stripe_customer_idstring required

The Stripe customer ID.

session_idstring required

The Stripe checkout session ID.

setup_intent_idstring required

The setup intent ID created for collecting the payment method.

client_secretstring

Client secret for initializing Stripe.js on the client side.

Required for embedded checkout sessions. See: https://docs.stripe.com/payments/checkout/custom-success-page

client_reference_idstring

The client reference ID provided in the request.

Useful for reconciling the session with your internal systems.

customer_emailstring

Customer's email address if provided to Stripe.

currencystring

Currency code for the checkout session.

created_atstring date-time required

Timestamp when the checkout session was created.

expires_atstring date-time

Timestamp when the checkout session will expire.

metadataobject

Metadata attached to the checkout session.

urlstring

URL to redirect customers to the checkout page (for hosted mode).

mode'setup' required

Mode of the checkout session.

Currently only "setup" mode is supported for collecting payment methods.

cancel_urlstring

The cancel URL where customers are redirected if they cancel.

success_urlstring

The success URL where customers are redirected after completion.

return_urlstring

The return URL for embedded sessions after authentication.

Example response

{
  "customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "currency": "USD",
  "created_at": "2023-01-01T01:01:01.001Z",
  "expires_at": "2023-01-01T01:01:01.001Z"
}