Skip to main content
POST
/
api
/
subscriptions
/
portal
cURL
curl --request POST \
  --url https://api.recoupable.com/api/subscriptions/portal \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "returnUrl": "https://chat.recoupable.com/settings/billing"
}
'
{
  "id": "portal_sess_a1b2c3d4",
  "url": "https://billing.example.com/manage/portal_sess_a1b2c3d4"
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

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

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"