v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-03101355448.4 KB
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/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

ULID (Universally Unique Lexicographically Sortable Identifier).

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

Three-letter ISO4217 currency code. Custom three-letter currency codes are also supported for convenience.

created_atstring date-time required

RFC3339 formatted date-time string in UTC.

expires_atstring date-time

RFC3339 formatted date-time string in UTC.

metadataobject

Metadata attached to the checkout session.

urlstring

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

mode'setup' required

Stripe Checkout Session mode.

Determines the primary purpose of the checkout session.

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"
}