The Discount object 

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.

  • couponobject

    Hash describing the coupon applied to create this discount.

  • 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 of once or forever, this attribute will be null.

  • 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

  • checkout_sessionnullable string

  • invoicenullable string

  • invoice_itemnullable string

  • promotion_codenullable stringExpandable

  • subscription_itemnullable string

The Discount object
{
"id": "di_1M6vk22eZvKYlo2CYMGIhk14",
"object": "discount",
"checkout_session": "cs_test_b1mywbZHtQCQW2ncaItVPFqupwmfqNU4IMMdw3lArEBGt0QD0CZDrNQswR",
"coupon": {
"id": "wsd",
"object": "coupon",
"amount_off": null,
"created": 1669116350,
"currency": null,
"duration": "forever",
"duration_in_months": null,
"livemode": false,
"max_redemptions": null,
"metadata": {},
"name": null,
"percent_off": 10,
"redeem_by": null,
"times_redeemed": 1,
"valid": true
},
"customer": "cus_9s6XKzkNRiz8i3",
"end": null,
"invoice": null,
"invoice_item": null,
"promotion_code": null,
"start": 1669120702,
"subscription": null
}

Delete a customer discount 

Removes the currently applied discount on a customer.

Parameters

No parameters.

Returns

An object with a deleted flag set to true upon success. This call returns an error otherwise, such as if no discount exists on this customer.

DELETE /v1/customers/:id/discount
curl -X DELETE https://api.stripe.com/v1/customers/cus_9s6XKzkNRiz8i3/discount \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"object": "discount",
"deleted": true
}

Delete a subscription discount 

Removes the currently applied discount on a subscription.

Parameters

No parameters.

Returns

An object with a deleted flag set to true upon success. This call returns an error otherwise, such as if no discount exists on this subscription.

DELETE /v1/subscriptions/:id/discount
curl -X DELETE https://api.stripe.com/v1/subscriptions/sub_1NlcNX2eZvKYlo2CFqnrn9ow/discount \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"object": "discount",
"deleted": true
}

Tax Code 

Tax codes classify goods and services for tax purposes.

Tax Rate