Skip to main content

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": "professional",
"planDisplayName": "Professional",
"tier": "PROFESSIONAL",
"priceCents": 4900,
"currency": "EUR",
"status": "CANCELLED",
"currentPeriodStart": "2026-02-01T00:00:00Z",
"currentPeriodEnd": "2026-03-01T00:00:00Z",
"gracePeriodEnd": null
}
}

Response Fields

FieldTypeDescription
messagestringConfirmation message describing the cancellation
subscriptionobjectUpdated subscription details
subscription.planNamestringInternal plan identifier
subscription.planDisplayNamestringHuman-readable plan name
subscription.tierstringPlan tier enum
subscription.priceCentsintegerMonthly price in cents
subscription.currencystringCurrency code
subscription.statusstringSubscription status (now CANCELLED)
subscription.currentPeriodStartstringISO timestamp of current billing period start
subscription.currentPeriodEndstringISO timestamp when subscription will end
subscription.gracePeriodEndstringAlways null for cancelled subscriptions

Errors

Status CodeError CodeDescription
400BAD_REQUESTNo active subscription to cancel
401UNAUTHORIZEDMissing or invalid JWT token
403FORBIDDENUser does not have admin privileges
404NOT_FOUNDOrganization does not have an active subscription

Example

Request

curl -X POST https://api.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": "professional",
"planDisplayName": "Professional",
"tier": "PROFESSIONAL",
"priceCents": 4900,
"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 the remaining time in the current billing period.
  • After the billing period ends, the organization will be automatically downgraded to the Free plan.
  • All paid features will remain accessible until currentPeriodEnd.
  • You can resubscribe at any time before the current period ends to prevent downgrade.
  • The cancellation is logged in the audit trail with event type SUBSCRIPTION_CANCELLED.