---
title: "Create Stripe customer portal session"
method: POST
path: "/api/v1/customers/{customerIdOrKey}/stripe/portal"
tags: ["Customers", "Apps"]
---

# Create Stripe customer portal session

`POST /api/v1/customers/{customerIdOrKey}/stripe/portal`

Create Stripe customer portal session.
Only returns URL if the customer billing profile is linked to a stripe app and 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.

## Path parameters

- `customerIdOrKey` union, required — ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key.
  - string — ULID (Universally Unique Lexicographically Sortable Identifier).
  - string — ExternalKey is a looser version of key.

## Request body

- CreateStripeCustomerPortalSessionParams — Stripe customer portal request params.
  - `configurationId` string — The ID of an existing configuration to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. See https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-configuration
  - `locale` string — The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used. See: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale
  - `returnUrl` string — The URL to redirect the customer to after they have completed their requested actions. See: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url

## Response `201`

The request has succeeded and a new resource has been created as a result.

- StripeCustomerPortalSession — Stripe customer portal session. See: https://docs.stripe.com/api/customer_portal/sessions/object
  - `id` string, required — The ID of the customer portal session. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id
  - `stripeCustomerId` string, required — The ID of the stripe customer.
  - `configurationId` 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
  - `createdAt` string, date-time, required — Created at. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-created
  - `returnUrl` string, required — Return URL. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url
  - `locale` string, required — Status. /** 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 ID of the customer.The URL to redirect the customer to after they have completed their requested actions.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — The request has not been applied because it lacks valid authentication credentials for the target resource.
- `403` — The server understood the request but refuses to authorize it.
- `404` — The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
- `412` — One or more conditions given in the request header fields evaluated to false when tested on the server.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
- `default` — An unexpected error response.

---

[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/1cd97f063f4a/schema)
