BillKit/Docs Console
Billing portal

Revoke portal session

Invalidate a portal link that is already out in the world.

POST/v1/billing_portal/sessions/{session_id}/revoke
Operation revoke_portal_session · Scope subscriptions:write · Spec snapshot 2026-09-13

Parameters

ParameterDescription
session_idstring · pathrequiredNo description in the spec.

Returns

Returns a BillingPortalSessionRevokeResponse object.

Errors

Status Cause
401 Missing or invalid API key.
403 Key is missing the subscriptions:write scope.
404 No such object, or it belongs to the other mode.
422 Validation Error
429 Rate limited. Back off and retry.
Request · curl
curl -X POST https://api.billkit.eu/v1/billing_portal/sessions/bps_9XKp2vQ1/revoke \
  -H "Authorization: Bearer $BILLKIT_SECRET_KEY"
Response · 200 OK
{
  "customer_id": "cus_9XKp2vQ1",
  "id": "obj_9XKp2vQ1",
  "livemode": false,
  "object": "billing_portal.session",
  "revoked_at": 1789392000,
  "subscription_id": "sub_9XKp2vQ1"
}