Billing portal session
id: core-billing-portalsession owner: core method: POST path: /wp-json/headlesswp/v1/billing/portal-session title: Billing portal session usedBySite: true
POST /wp-json/headlesswp/v1/billing/portal-session
Create a billing portal session URL for the current authenticated user.
Auth + CSRF
- Auth: cookie session required.
- Proxy nonce required: yes.
- CSRF: required via
X-WP-Nonce(proxy enforces nonce for this route).
Request schema
No request body is required. The site sends no request body for this endpoint.
Response schema (200)
{
"data": {
"url": "https://billing.stripe.com/p/session/example-portal-session"
},
"meta": {
"correlationId": "abc123",
"correlation_id": "abc123",
"request_id": "abc123",
"timestamp": "2025-01-01T00:00:00Z"
}
}
Error codes
400 BILLING_NOT_ENABLED400 BILLING_PORTAL_UNAVAILABLE401 NOT_AUTHENTICATED403 CSRF_FAILED403 FORBIDDEN429 RATE_LIMITED