Subscriptions

Cancel subscription

Changed on

Cancels a subscription. Metered and past-due subscriptions are canceled immediately. Others cancel at the end of the current billing period.

post/subscriptions/{id}/cancel

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Response

Subscription canceled

Subscription required
id, string required
object, string required
status, string nullable required

The billing status. paused whenever payment collection is paused, even while the provider still reports the subscription as active.

quantity, integer required
current_period_start, string date-time nullable required
current_period_end, string date-time nullable required
trial_ends_at, string date-time nullable required
ends_at, string date-time nullable required
created_at, string date-time nullable required
updated_at, string date-time nullable required
livemode, boolean required
canceled, boolean required
paused, boolean required
cancellation_details, object nullable required

What the contact told you when they last cancelled from the billing portal. Null if they never did.

contact, union

ID by default, full object when expanded

order, union

ID by default, full object when expanded

price_variant, union

ID by default, full object when expanded

product, string nullable required
discount, union

ID by default, full object when expanded

Changes

    • warning

      added the new expired enum value to the discount/oneOf[#/components/schemas/Discount]/status response property for the response status

    • info

      added the optional property price_variant to the response with the status

    • info

      added the required property order/oneOf[#/components/schemas/Order]/line_items/items/price_variant/oneOf[#/components/schemas/PriceVariant]/cross_sells to the response with the status

    3 more changes in this revision