Create Customer Portal Session
Stripe Subscriptions
Create Customer Portal Session
Create a Stripe Customer Portal session for users to manage billing
POST
Create Customer Portal Session
Create a Stripe Customer Portal session that lets users manage their subscriptions, payment methods, and billing details directly in Stripe’s hosted interface.Documentation Index
Fetch the complete documentation index at: https://devkit4ai.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
This endpoint requires end user authentication via HTTP Bearer Token with project scope.
Query Parameters
Use test mode credentials. Set to
false for production.Request Body
URL to redirect user after they exit the portal
Response
URL to redirect user to the Stripe Customer Portal
Example Request
Example Response
Portal Flow
Portal Capabilities
The Customer Portal allows users to:| Capability | Description |
|---|---|
| View Invoices | See and download past invoices |
| Update Payment Method | Add or change credit/debit cards |
| Cancel Subscription | End their subscription |
| Change Plan | Upgrade or downgrade (if configured) |
| Update Billing Info | Change billing email and address |
Integration Example
Portal Configuration
Configure allowed actions in Stripe Dashboard: (((REPLACE_THIS_WITH_IMAGE: stripe-customer-portal-settings.png: Stripe Dashboard Customer Portal configuration page showing subscription and invoice settings)))Prerequisites
Error Responses
| Status | Description |
|---|---|
401 | Unauthorized - Invalid or missing authentication |
404 | No Stripe customer found for user |
404 | Project not found or Stripe not configured |
422 | Validation error - Invalid return_url |
Related Pages
Get My Subscription
Check subscription status
Cancel Subscription
Cancel programmatically
Update Subscription
Change plans via API
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Use test mode
Body
application/json
Request to create a customer portal session.
Minimum string length:
1Response
Successful Response
Customer portal session response.

