Attributes
- idstring
The ID of the discount object. Discounts cannot be fetched by ID. Use
expand[]=discounts
in API calls to expand discount IDs in an array. - customernullable stringExpandable
The ID of the customer associated with this discount.
- endnullable timestamp
If the coupon has a duration of
repeating
, the date that this discount will end. If the coupon has a duration ofonce
orforever
, this attribute will be null. - sourceobject
The source of the discount.
- source.
couponnullable stringExpandable The coupon that was redeemed to create this discount.
- source.
typeenum The source type of the discount.
Possible enum valuescoupon
Coupon source type
- starttimestamp
Date that the coupon was applied.
- subscriptionnullable string
The subscription that this coupon is applied to, if it is applied to a particular subscription.
More attributes
- objectstring
String representing the object’s type. Objects of the same type share the same value.
- checkout_
sessionnullable string The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
- invoicenullable string
The invoice that the discount’s coupon was applied to, if it was applied directly to a particular invoice.
- invoice_
itemnullable string The invoice item
id
(or invoice line itemid
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. - promotion_
codenullable stringExpandable The promotion code applied to create this discount.
- subscription_
itemnullable string The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
{ "id": "di_1M6vk22eZvKYlo2CYMGIhk14", "object": "discount", "checkout_session": "cs_test_b1mywbZHtQCQW2ncaItVPFqupwmfqNU4IMMdw3lArEBGt0QD0CZDrNQswR", "source": { "type": "coupon", "coupon": "nVJYDOag" }, "customer": "cus_9s6XKzkNRiz8i3", "end": null, "invoice": null, "invoice_item": null, "promotion_code": null, "start": 1669120702, "subscription": null}