Cancel a subscription

End a subscription immediately, at period end, or on a scheduled date. Choose a refund strategy that fits your use case.
View as MarkdownOpen in Claude

Cancel immediately

Immediate cancellation terminates the subscription right away. No further invoices are generated.

  1. Go to Billing > Subscriptions in the sidebar
  2. Select the subscription to cancel
  3. Click Cancel subscription
  4. Choose Cancel immediately
  5. Select a refund option
  6. Confirm the action

The subscription transitions to Cancelled state. This is a terminal state and cannot be reversed.

Cancel at period end

Schedule the subscription to cancel at the end of the current billing period. The customer continues to have access until the period expires.

$curl -X PATCH https://api.paymentkit.com/api/{account_id}/subscriptions/{subscription_id} \
>-H "Authorization: Bearer sk_live_..." \
>-H "Content-Type: application/json" \
>-d '{
> "cancel_at_period_end": true
>}'

The subscription remains Active until the current period ends, then automatically transitions to Cancelled.

Cancel on a specific date

Schedule the subscription to cancel on a custom date. Use this for contract end dates or customer-requested future cancellations.

$curl -X POST https://api.paymentkit.com/api/{account_id}/subscriptions/{subscription_id}/schedule-cancellation \
>-H "Authorization: Bearer sk_live_..." \
>-H "Content-Type: application/json" \
>-d '{
> "cancel_at": "2026-06-01T00:00:00Z",
> "refund_option": "none"
>}'

The subscription continues billing normally until the scheduled date, then cancels automatically.

Refund options

When cancelling, choose how to handle the customer’s payments:

OptionBehavior
noneCancel with no refund. The default.
fullRefund the full paid amount for the current billing period.
proratedRefund only the unused portion of the current period, calculated by remaining time.
cancel_unpaidVoid all open and draft invoices instead of refunding paid ones.

Only invoices with licensed (non-metered) prices are eligible for refunds. Metered usage that has already been consumed is not refundable.

Preview a cancellation

Before confirming, preview the refund amount without applying any changes:

$curl -X POST https://api.paymentkit.com/api/{account_id}/subscriptions/{subscription_id}/cancel \
>-H "Authorization: Bearer sk_live_..." \
>-H "Content-Type: application/json" \
>-d '{
> "refund_option": "prorated",
> "is_preview": true
>}'

The response includes the calculated refund amount. No database changes or payment operations are performed.

Undo a scheduled cancellation

Remove a scheduled cancellation before it takes effect:

$curl -X PATCH https://api.paymentkit.com/api/{account_id}/subscriptions/{subscription_id} \
>-H "Authorization: Bearer sk_live_..." \
>-H "Content-Type: application/json" \
>-d '{
> "cancel_at_period_end": false
>}'

The subscription continues renewing as normal.

When to use each approach

ApproachUse case
Cancel immediatelyCustomer requests immediate termination. Pair with a refund option.
Cancel at period endCustomer wants to stop renewing but use the service through the paid period. Most common for self-service flows.
Cancel on dateContract has a defined end date, or customer requests cancellation on a future date.

Cancellation is irreversible. To restart billing for a cancelled customer, create a new subscription.

Webhook events

EventTrigger
subscription.cancelledSubscription was cancelled (immediate, at period end, or on scheduled date)