Sample - Stripe API
DELETE/v1/customers/{customer}/subscriptions/{subscription_exposed_id}/discount

Remove a subscription discount

Deletes the discount currently applied to a customer's subscription. Provide the customer and subscription identifiers to select the subscription whose discount you want to remove. The response confirms deletion using the deleted discount representation.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
customerstringrequired
The identifier of the customer associated with the subscription. Maximum 5000 characters.
subscription_exposed_idstringrequired
The identifier of the subscription whose discount to remove. Maximum 5000 characters.

2 status codes
200Returns the deleted discount object with its `deleted` field set to true, along with its identifier and associated subscription details.
checkout_sessionstringoptional
The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Not present for subscription mode.
customerstringoptional
The ID of the customer associated with this discount.
customer_accountstringoptional
The ID of the account representing the customer associated with this discount.
deletedbooleanrequired
Always true for a deleted object
Allowed:true
idstringrequired
The ID of the discount object. Discounts can't be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
invoicestringoptional
The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
invoice_itemstringoptional
The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:discount
promotion_codestringoptional
The promotion code applied to create this discount.
sourceobjectrequired
startintegerrequired
Date that the coupon was applied.
subscriptionstringoptional
The subscription that this coupon is applied to, if it is applied to a particular subscription.
subscription_itemstringoptional
The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
defaultError response.
errorobjectrequired

Error handling

customer and subscription_exposed_id must each be identifiers no longer than 5000 characters. The identifiers must refer to the customer and subscription whose discount you want to remove.