---
title: "Create Stripe customer portal session"
method: POST
path: "/openmeter/customers/{customerId}/billing/stripe/portal-sessions"
tags: ["OpenMeter Customers"]
---

# Create Stripe customer portal session

`POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions`

Create Stripe Customer Portal Session.

Useful to redirect the customer to the Stripe Customer Portal to manage their
payment methods, change their billing address and access their invoice history.
Only returns URL if the customer billing profile is linked to a stripe app and
customer.

## Path parameters

- `customerId` string, required — ULID (Universally Unique Lexicographically Sortable Identifier).

## Request body

- BillingCustomerStripeCreateCustomerPortalSessionRequest — Request to create a Stripe Customer Portal Session for the customer. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.
  - `stripe_options` BillingAppStripeCreateCustomerPortalSessionOptions, required — Request to create a Stripe Customer Portal Session.
    - `configuration_id` string — The ID of an existing [Stripe configuration](https://docs.stripe.com/api/customer_portal/configurations) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
    - `locale` string — The IETF [language tag](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale) of the locale customer portal is displayed in. If blank or `auto`, the customer's preferred_locales or browser's locale is used.
    - `return_url` string — The [URL to redirect](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) the customer to after they have completed their requested actions.

## Response `201`

CreateStripeCustomerPortalSessionResult created response.

- BillingAppStripeCreateCustomerPortalSessionResult — Result of creating a [Stripe Customer Portal Session](https://docs.stripe.com/api/customer_portal/sessions/object). Contains all the information needed to redirect the customer to the Stripe Customer Portal.
  - `id` string, required — The ID of the customer portal session. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id
  - `stripe_customer_id` string, required — The ID of the stripe customer.
  - `configuration_id` string, required — Configuration used to customize the customer portal. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration
  - `livemode` boolean, required — Livemode. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode
  - `created_at` string, date-time, required — [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
  - `return_url` string, required — Return URL. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url
  - `locale` string, required — The IETF language tag of the locale customer portal is displayed in. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale
  - `url` string, required — The URL to redirect the customer to after they have completed their requested actions.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `410` — Gone

---

[API](https://skmtc.net/openmeterio/apis/openmeter-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-api/revisions/327f2080730f/schema)
