Cancel Subscription
Cancel the organization's current subscription. The subscription will remain active until the end of the current billing period, after which it will revert to the Free plan.
Request
POST /billing/cancel
Authentication
Requires an Admin Bearer JWT token.
Authorization: Bearer <access_token>
Request Body
No request body required.
Response
Success Response
Status Code: 200 OK
Response Body:
{
"message": "Subscription cancelled. Your plan will remain active until the end of the current billing period.",
"subscription": {
"planName": "paid",
"planDisplayName": "Paid",
"tier": "PAID",
"priceCents": 0,
"currency": "EUR",
"status": "CANCELLED",
"currentPeriodStart": "2026-02-01T00:00:00Z",
"currentPeriodEnd": "2026-03-01T00:00:00Z",
"gracePeriodEnd": null
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Confirmation message describing the cancellation |
subscription | object | Updated subscription details |
subscription.planName | string | Internal plan identifier |
subscription.planDisplayName | string | Human-readable plan name |
subscription.tier | string | Plan tier enum |
subscription.priceCents | integer | Price in cents (0 for usage-based billing) |
subscription.currency | string | Currency code |
subscription.status | string | Subscription status (now CANCELLED) |
subscription.currentPeriodStart | string | ISO timestamp of current billing period start |
subscription.currentPeriodEnd | string | ISO timestamp when subscription will end |
subscription.gracePeriodEnd | string | Always null for cancelled subscriptions |
Errors
| Status Code | Error Code | Description |
|---|---|---|
400 | BAD_REQUEST | No active subscription to cancel |
401 | UNAUTHORIZED | Missing or invalid JWT token |
403 | FORBIDDEN | User does not have admin privileges |
404 | NOT_FOUND | Organization does not have an active subscription |
Example
Request
curl -X POST https://app.entryguard.io/api/v1/billing/cancel \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Response
{
"message": "Subscription cancelled. Your plan will remain active until the end of the current billing period.",
"subscription": {
"planName": "paid",
"planDisplayName": "Paid",
"tier": "PAID",
"priceCents": 0,
"currency": "EUR",
"status": "CANCELLED",
"currentPeriodStart": "2026-02-01T00:00:00Z",
"currentPeriodEnd": "2026-03-01T00:00:00Z",
"gracePeriodEnd": null
}
}
Notes
- Cancellation takes effect at the end of the current billing period specified in
currentPeriodEnd. - No refunds are issued for remaining credits.
- After cancellation, debt may accumulate if usage continues. There is no automatic downgrade.
- All paid features will remain accessible until
currentPeriodEnd. - You can resubscribe at any time before the current period ends.
- The cancellation is logged in the audit trail with event type
SUBSCRIPTION_CANCELLED.