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.
Example response
{
"customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"currency": "USD",
"created_at": "2023-01-01T01:01:01.001Z",
"expires_at": "2023-01-01T01:01:01.001Z"
}