palbaseDocs

Palbase Payments · API

POST/payments/customers/{customer_id}/portal

Create a payer's billing portal session

Opens a provider-hosted self-service billing portal session for the payer: whoever holds its link manages the payer's cards and subscriptions at the provider. The cards the payer changes there are followed (ListCustomerMethods); the default card stays the one chosen here. Closed to an environment's token. 409 provider_customer_gone when the payer's record was deleted on the provider's own pages: it is let go of here, and a card page or payment makes a new one.

Called by your server, with the project's secret key.

Path

customer_idstring · requiredThe payer's id: a user id, or any name of 1 to 128 characters the project's server gives a company or a team. Escape it as a path segment.

Request body

channelstring · optionalOptional channel key override.
return_urlstring · requiredAllowed return URL.
curl
curl -X POST "https://<your-ref>.palbase.studio/payments/customers/<customer_id>/portal" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"return_url":"string"}'

Responses

200OK

defaultStandard Palbase JSON error envelope (`error` and `error_description`).

Operation CreateCustomerPortal of payments's contract.