Skip to main content
POST
cURL

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

Portal session parameters

Request body for creating a billing portal session. The account is determined from authentication (API key or session), not from this payload.

returnUrl
string<uri>
required

The URL to redirect to when the customer leaves the portal.

Example:

"https://chat.recoupable.com/settings/billing"

Response

Portal session created successfully

id
string
required

The portal session ID.

Example:

"portal_sess_a1b2c3d4"

url
string<uri>
required

The hosted portal URL. Redirect to this URL so the customer can manage their subscription.

Example:

"https://billing.example.com/manage/portal_sess_a1b2c3d4"