Cancel a Subscription

Cancels a subscription either immediately or at the end of the current billing period.

Cancellation Options:

  • No request body: Cancel immediately (default behavior)
  • cancel_at_period_end: true: Cancel at the end of the current billing period
  • cancel_at: Schedule cancellation for a specific ISO 8601 datetime

After cancellation, the customer will not be charged again for the subscription.

Path Parameters
  • id
    Type: string
    required

    Subscription ID (26-character ULID).

Body
application/json

Optional request body for canceling a subscription. If not provided, the subscription is canceled immediately.

  • cancel_at
    Type: string | nullFormat: date-time

    Schedule cancellation for a specific date (ISO 8601). The subscription remains active until this date. Cannot be used with cancel_at_period_end=true.

  • cancel_at_period_end
    Type: boolean

    If true, the subscription remains active until the end of the current billing period, then cancels automatically.

  • cancellation_details
    Type: object · CancellationDetails

    Details about why this subscription was cancelled.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/v1/subscriptions/{id}
curl https://api.paypercut.io/v1/subscriptions/01HD7M6DRKZ4Q4QEVWJB0RC1S6 \
  --request DELETE \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{}'
{
  "id": "01HD7M6DRKZ4Q4QEVWJB0RC1S6",
  "customer": "01KJQ34MWYH0TES77RDXA8T8TT",
  "status": "CANCELED",
  "start_date": "2026-01-01T00:00:00Z",
  "next_billing_date": null,
  "current_period_start": "2026-01-01T00:00:00Z",
  "current_period_end": "2026-02-01T00:00:00Z",
  "cancel_at_period_end": false,
  "cancel_at": null,
  "canceled_at": "2026-01-15T10:30:00Z",
  "paused_at": null,
  "trial_start": null,
  "trial_end": null,
  "billing_cycle_anchor": "2026-01-01T00:00:00Z",
  "collection_method": "charge_automatically",
  "days_until_due": null,
  "default_payment_method": "pm_01HD7M6DRKZ4Q4QEVWJB0RC1S6",
  "currency": "USD",
  "livemode": false,
  "ended_at": "2026-01-15T10:30:00Z",
  "cancellation_details": {
    "feedback": "too_expensive",
    "comment": "Switching to a cheaper plan"
  },
  "items": [
    {
      "id": "si_01HD7M6DRKZ4Q4QEVWJB0RC1S6",
      "price": "01XXXXXXXXXXXXXXXXXXXXXXX",
      "product": "01XXXXXXXXXXXXXXXXXXXXXXX",
      "quantity": 1,
      "billing_interval": "monthly",
      "unit_amount": 2999,
      "currency": "USD",
      "recurring": {
        "interval": "monthly",
        "interval_count": 1,
        "usage_type": "licensed"
      },
      "created_at": "2026-01-01T00:00:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "created": "2026-01-01T00:00:00Z",
  "updated_at": "2026-01-15T10:30:00Z"
}