KintsugiKintsugi
API reference / Create a billing self-serve customer portal session

Create a billing self-serve customer portal session

POST/billing/portal-session

Creates a billing self-serve customer portal session (URL, token, and the fields the embedded self-serve portal widget needs) for the org selected by Organization-Id, Connection-Id, or Entity-Id. Creates the billing customer record on first use, billed to the authenticated identity's name and email. Requires an owner or admin of the organization, or the organization's own API key.

Authorization

Api-KeystringRequired

Your secret API key. Include it with every request.

Headers

Api-Versiondate

Release date, as YYYY-MM-DD. Defaults to 2026-07-21.

Organization-Idstring

Target organization id (Organization-Id selector).

Connection-Idstring

Target connection id; resolves to its organization.

Entity-Idstring

Platform entity id; resolves to a connection's organization.

Entity-Sourcestring

Optional source to disambiguate an Entity-Id.

Response

idstringRequired

Billing portal session id.

tokenstringRequired

Portal session token. Treat as a secret.

accessUrlstringRequired

One-time portal URL. Treat as a secret.

statusstringRequired

Portal session status, e.g. created.

createdAtstringRequired

When the session was created.

expiresAtstringRequired

When the portal URL expires.

objectstringRequired

Billing object type, portal_session.

customerIdstringRequired

Billing customer id the session is for.

redirectUrlstring

Where the portal sends the user on exit, or null.

linkedCustomersPortalLinkedCustomer[]Required

Other billing customers reachable from this session.

201

Successful Response

400

The request was invalid.

401

Authentication failed or was missing.

403

The credential is not permitted for this request.

404

The requested resource was not found.

422

Validation Error

cURL
POST /billing/portal-session
-H "Api-Key: ***"
-H "Api-Version: 2026-10-06"
Response
{
"id": "3f6c2b1e-8a4d-4c2e-9b1f-2d7e5a6c9f10",
"token": "tok_2mNpQr7Ls8f3k",
"accessUrl": "https://www.example.com",
"status": "ACTIVE",
"createdAt": "2026-07-28T12:00:00Z",
"expiresAt": "2026-07-28T12:00:00Z",
"object": "object",
"customerId": "cust_2mNpQr7Ls8f3k",
"redirectUrl": "https://www.example.com",
"linkedCustomers": [
{
"customerId": "cust_2mNpQr7Ls8f3k",
"email": "jane.doe@example.com",
"hasActiveSubscription": false,
"hasBillingAddress": false,
"hasPaymentMethod": false,
"object": "object"
}
]
}
Create a billing self-serve customer portal session (2026-10-06) | Kintsugi API Reference