Subscriptions

Cancel subscription

Changed on

Use when a customer churns or downgrades. Supports immediate or end-of-period cancellation and proration. Ideal for self-serve or support-driven cancellations.

post/subscriptions/{id}/cancel

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/subscriptions/{id}/cancel
  • Auth
    API key in header x-api-key

Path parameters

idstring required

Subscription ID

Request body

cancel_atstring date-time

CancelAt is the exact date/time when the subscription should be cancelled. Required for cancellation_type "scheduled_date"; optional for "immediate" (past dates only — backdated cancellation). For "scheduled_date", accepts both future dates (deferred cancellation) and past dates (backdated cancellation). For "immediate", accepts past/current dates only; use "scheduled_date" for future dates.

cancel_immediately_invoice_policy'generate_invoice' | 'skip'
cancellation_type'immediate' | 'end_of_period' | 'scheduled_date' required
proration_behavior'create_prorations' | 'none'
reasonstring

Reason for cancellation (for audit and business intelligence)

Response

OK

cancellation_type'immediate' | 'end_of_period' | 'scheduled_date'
effective_datestring date-time
messagestring

Response metadata

processed_atstring date-time
reasonstring
status'active' | 'paused' | 'cancelled' | 'incomplete' | 'trialing' | 'draft'
subscription_idstring

Basic cancellation info

total_credit_amountstring

Changes

    • info

      added the optional property / to the response with the status

    • warning

      added the new END_OF_MONTH enum value to the // response property for the response status

    • warning

      added the new END_OF_NEXT_MONTH enum value to the // response property for the response status

    • warning

      added the new credit_note enum value to the /// response property for the response status

    • warning

      added the new not_collecting enum value to the / response property for the response status

    • warning

      added the new not_collecting enum value to the /// response property for the response status

    • warning

      added the new not_subject_to_tax enum value to the / response property for the response status

    • warning

      added the new not_subject_to_tax enum value to the /// response property for the response status

    • warning

      added the new not_supported enum value to the / response property for the response status

    • warning

      added the new not_supported enum value to the /// response property for the response status

    • warning

      added the new reverse_charge enum value to the / response property for the response status

    • warning

      added the new reverse_charge enum value to the /// response property for the response status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status