Skip to main content
POST
/
api
/
payments
/
customer-portal-sessions
Create Customer Portal Session
curl --request POST \
  --url https://api.example.com/api/payments/customer-portal-sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "environment": "test",
  "subject": {
    "type": "team",
    "id": "team_123"
  },
  "returnUrl": "https://app.example.com/billing"
}
'
{
  "customerPortalSession": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "environment": "test",
    "status": "initialized",
    "subjectType": "<string>",
    "subjectId": "<string>",
    "stripeCustomerId": "cus_123",
    "returnUrl": "https://app.example.com/billing",
    "configuration": "<string>",
    "url": "https://billing.stripe.com/p/session/test_123",
    "lastError": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.insforge.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
environment
enum<string>
required
Available options:
test,
live
subject
object
required
returnUrl
string<uri>
configuration
string
Required string length: 1 - 255

Response

Customer Portal Session created

customerPortalSession
object
required