Customer Portal Sessions
Creates a customer portal session from a secure server using an API Key. The returned session contains the token and URL to hand to the customer.
An API Key token generated in the Dashboard in the format 'APIKey TOKEN_HERE'.
The ID of the store to create the portal session for.
411486491630370816The ID of the customer to create the portal session for.
411486491630370816Request to create a new customer portal session from your back-end server using the management API
How long the portal session stays valid, in seconds. When unset, a default expiry is used.
URL to redirect the customer back to after completing the portal flow
OK
Represents a customer portal session
411486491630370816411486491630370816411486491630370816The token used to access the portal session
The URL to redirect the customer to for this portal session
URL to redirect the customer back to after completing the portal flow
Date and time when the portal session was created
Date and time when the portal session expires
Error response
POST /v1/stores/{storeId}/customers/{customerId}/portal-sessions HTTP/1.1
Authorization: APIKey TOKEN_HERE
Content-Type: application/json
Accept: */*
Content-Length: 195
{
"flow": {
"subscription_cancel": {
"subscription_id": "411486491630370816"
},
"subscription_payment_method_update": {
"subscription_id": "411486491630370816"
}
},
"expires_in_seconds": null,
"return_url": null
}{
"id": "411486491630370816",
"store_id": "411486491630370816",
"customer_id": "411486491630370816",
"flow": {
"subscription_cancel": {
"subscription_id": "411486491630370816"
},
"subscription_payment_method_update": {
"subscription_id": "411486491630370816"
}
},
"token": null,
"url": null,
"return_url": null,
"created_at": "2026-01-01T00:00:00.000Z",
"expires_at": "2026-01-01T00:00:00.000Z"
}Last updated
Was this helpful?
