Skip to main content
POST
/
v1
/
billing
/
cancel
Cancel subscription
curl --request POST \
  --url https://api.truthlocks.com/v1/billing/cancel \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "reason": "<string>",
  "immediate": true
}
'
{
  "status": "<string>",
  "cancels_at": "<string>"
}
POST /v1/billing/cancel
Cancels your active subscription. The cancellation takes effect at the end of the current billing period — you retain full access until then. After the period ends, your account downgrades to the Developer (free) plan.

Response

Returns the updated subscription object with cancel_at_period_end set to true.
status
string
Subscription status. Remains active until the period ends, then changes to canceled.
plan_key
string
The current plan identifier (e.g., plan_starter, plan_business).
current_period_end
string
ISO 8601 timestamp for when the current billing period ends and the cancellation takes effect.
cancel_at_period_end
boolean
true after a successful cancellation request.
Cancellation is immediate but takes effect at the end of your billing period. You cannot undo a cancellation via the API — to resubscribe, create a new checkout session.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Body

application/json
reason
string

Optional cancellation reason

immediate
boolean

If true, cancel immediately instead of at period end

Response

Cancellation confirmed

status
string
cancels_at
string