Skip to main content
POST
billing.portal.create

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Account
string

Optional. One of your account ids (GET /v1/accounts): run on that account, whatever your routing rules say. The response header X-Pramaan-Account names the account that ran.

Pramaan-End-User
string

Optional. Your own tag for your end user: a sticky: end_user rule keeps them on the account that first served them.

Maximum string length: 256
Pramaan-End-User-Group
string

Optional. Your end user's group, matched by rules with endUserGroup.

Maximum string length: 64

Body

application/json
customerId
string
required

Customer id returned by your connected billing account.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$
returnUrl
string

Page to return to. Optional; some accounts only support their configured return page. Accepts a public HTTPS URL, or http on localhost for a local install.

Response

The result

portalUrl
string
required

Short-lived platform link to the customer's private billing portal.

Pattern: ^https?:\/\/[^/?#\s]+\/connect\/link\/[A-Za-z0-9_-]+$
expiresAt
string<date-time>
required

Deadline to open the platform link, at most five minutes ahead. The billing session can expire sooner or after use.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$