latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-14249167721.0 KB

75df3a43fcb2

Billing

Apply a discount to a subscription item

Applies an existing discount to a subscription item. Manual application is an override path: self-serve distribution rules are not enforced. At most one active discount is allowed per subscription item; applying a different discount replaces the currently active one. Re-applying the same active discount returns a conflict.

post/billing/subscription_items/{subscription_item_id}/discounts

Path parameters

subscription_item_idstring required

The ID of the subscription item to apply the discount to

Request body

discount_idstring required

The ID of the discount to apply to the subscription item.

Response

A commerce discount redemption.

object'commerce_discount_redemption' required

String representing the object's type. Objects of the same type share the same value.

idstring required

Unique identifier for the discount redemption.

subscription_item_idstring required

Unique identifier for the subscription item the discount was applied to.

discount_idstring required

Unique identifier for the discount that was applied.

namestring

The display name of the discount.

source'promotion' | 'manual' | 'promo_code' required

How the discount was applied to the subscription item.

promo_codestring

The promo code used to redeem the discount, when applicable.

effect'percentage' | 'fixed_amount'

The snapshotted discount effect.

percent_offnumber double nullable

Percent off when the effect is percentage.

cycles_remaininginteger nullable required

Remaining billing cycles the discount applies to. Null means the discount lasts forever.

cycles_appliedinteger required

Number of billing cycles the discount has already been applied to.

status'active' | 'exhausted' | 'removed'

Current status of the discount redemption.

redeemed_atinteger required

Unix timestamp (in milliseconds) when the discount was redeemed.

redeemed_bystring nullable required

Identifier of the actor that redeemed the discount, when available.