Delete customer

delete

Path Parameters

customerIdstringrequired

ULID (Universally Unique Lexicographically Sortable Identifier).

Match pattern:^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Example:01G65Z755AFWAKHE12NY0CQ9FH

Response

Deleted response.

delete/openmeter/customers/{customerId}
 

Get customer billing data

get

Path Parameters

customerIdstringrequired

ULID (Universally Unique Lexicographically Sortable Identifier).

Match pattern:^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Example:01G65Z755AFWAKHE12NY0CQ9FH

Response

application/json

CustomerBillingData response.

BillingCustomerData

Billing customer data.

billing_profileobject

The billing profile for the customer.

If not provided, the default billing profile will be used.

Show Child Parameters
app_dataobject

App customer data.

Show Child Parameters
get/openmeter/customers/{customerId}/billing
 
application/json

Update customer billing data

put

Path Parameters

customerIdstringrequired

ULID (Universally Unique Lexicographically Sortable Identifier).

Match pattern:^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Example:01G65Z755AFWAKHE12NY0CQ9FH

Body

application/json

UpsertCustomerBillingDataRequest

CustomerBillingData upsert request.

billing_profileobject

The billing profile for the customer.

If not provided, the default billing profile will be used.

Show Child Parameters
app_dataobject

App customer data.

Show Child Parameters

Response

application/json

CustomerBillingData upsert response.

BillingCustomerData

Billing customer data.

billing_profileobject

The billing profile for the customer.

If not provided, the default billing profile will be used.

Show Child Parameters
app_dataobject

App customer data.

Show Child Parameters
put/openmeter/customers/{customerId}/billing

Body

{}
 
application/json

Update customer billing app data

put

Path Parameters

customerIdstringrequired

ULID (Universally Unique Lexicographically Sortable Identifier).

Match pattern:^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Example:01G65Z755AFWAKHE12NY0CQ9FH

Body

application/json

UpsertAppCustomerDataRequest

AppCustomerData upsert request.

stripeobject

Used if the customer has a linked Stripe app.

Show Child Parameters
external_invoicingobject

Used if the customer has a linked external invoicing app.

Show Child Parameters

Response

application/json

AppCustomerData upsert response.

BillingAppCustomerData

App customer data.

stripeobject

Used if the customer has a linked Stripe app.

Show Child Parameters
external_invoicingobject

Used if the customer has a linked external invoicing app.

Show Child Parameters
put/openmeter/customers/{customerId}/billing/app-data

Body

{}
 
application/json

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

Path Parameters

customerIdstringrequired

ULID (Universally Unique Lexicographically Sortable Identifier).

Match pattern:^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Example:01G65Z755AFWAKHE12NY0CQ9FH

Body

application/json

BillingCustomerStripeCreateCheckoutSessionRequest

Request to create a Stripe Checkout Session for the customer.

Checkout Sessions are used to collect payment method information from customers
in a secure, Stripe-hosted interface. This integration uses setup mode to collect
payment methods that can be charged later for subscription billing.

stripe_optionsobjectrequired

Options for configuring the Stripe Checkout Session.

These options are passed directly to Stripe’s checkout session creation API.

Show Child Parameters

Response

application/json

CreateStripeCheckoutSessionResult created response.

BillingAppStripeCreateCheckoutSessionResult

Result of creating a Stripe Checkout Session.

Contains all the information needed to redirect customers to the checkout
or initialize an embedded checkout flow.

customer_idstringrequired

The customer ID in the billing system.

Match pattern:^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Example:01G65Z755AFWAKHE12NY0CQ9FH

stripe_customer_idstringrequired

The Stripe customer ID.

session_idstringrequired

The Stripe checkout session ID.

setup_intent_idstringrequired

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.

Match pattern:^[A-Z]{3}$

>= 3 characters<= 3 characters

Example:USD

created_atstring(date-time)required

Timestamp when the checkout session was created.

Example:2023-01-01T01:01:01.001Z

expires_atstring(date-time)

Timestamp when the checkout session will expire.

Example:2023-01-01T01:01:01.001Z

metadataobject

Metadata attached to the checkout session.

urlstring

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

modestringrequired

Mode of the checkout session.

Currently only “setup” mode is supported for collecting payment methods.

Allowed values:setup

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.

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

Body

{ "stripe_options": {} }
 
application/json