v1

latestOpenAPI 3.0.12026-07-243686491.1 MB
Subscriptions

Preview a subscription cancellation

Returns the end date and any refund or final purchase that would be applied if the subscription was cancelled now with the given option. Read-only — no state changes. Required scope: subscriptions:read

get/api/v1/subscriptions/{subscriptionId}/cancel/preview

Path parameters

subscriptionIdinteger required

Query parameters

cancellationOption'cancel-immediately' | 'cancel-at-end-of-billing-period'

Cancellation option to preview

Response

Preview of the cancellation outcome

endAtstring date-time required

The date the subscription would end if cancelled with the requested option.

Example response

{
  "endAt": "2025-02-28T23:59:59Z",
  "reconciliation": {
    "type": "refund",
    "currentBillingPeriod": {
      "start": "2025-02-01T00:00:00Z",
      "end": "2025-02-28T00:00:00Z",
      "amount": 12.5,
      "currency": "EUR"
    },
    "reconciliationPeriod": {
      "start": "2025-02-01T00:00:00Z",
      "end": "2025-02-28T00:00:00Z",
      "amount": 12.5,
      "currency": "EUR"
    }
  }
}