Subscriptions

Apply discount to subscription

Applies one of the account's discounts to an existing subscription, replacing any discount already on it. Nothing is charged or refunded now: the discount takes effect from the next invoice and lasts as long as the discount's duration says. Applying the discount the subscription already has is a no-op. Payment plans and ended subscriptions can't be discounted, and a discount restricted to specific price variants only applies to subscriptions for those variants.

put/subscriptions/{id}/discount

Request

  • Base URL: https://api.crevio.co/v1
  • URL: https://api.crevio.co/v1/subscriptions/{id}/discount
  • Auth: API key in header Authorization

Path parameters

idstring required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Query parameters

expandstring

Comma-separated relations to expand: discount

Request body

discountstring required

ID of the discount to apply

Example request

{
  "discount": "disc_O7Y256nbwxmDh6gMKZvD8pRB"
}

Response

Discount applied

idstring required
objectstring required
statusstring nullable required
quantityinteger required
current_period_startstring date-time nullable required
current_period_endstring date-time nullable required
trial_ends_atstring date-time nullable required
ends_atstring date-time nullable required
created_atstring date-time nullable required
updated_atstring date-time nullable required
livemodeboolean required
canceledboolean required
pausedboolean required

Changes

No recorded changes to this operation across all 2 revisions of this API.