#sweetpopcornsimon
1 messages ยท Page 1 of 1 (latest)
Can you give an example of expires coupon you are referring to?
Hi, sure one sec
So in the subscription object there is this section
...
...
"discount": {
"id": "di_<id>",
"object": "discount",
"checkout_session": null,
"coupon": {
"id": "<id>",
"object": "coupon",
"amount_off": null,
"created": 1696314438,
"currency": null,
"duration": "repeating",
"duration_in_months": 3,
"livemode": true,
"max_redemptions": 1,
"metadata": {
},
"name": "3 Monate Rabatt",
"percent_off": 6,
"redeem_by": null,
"times_redeemed": 1,
"valid": false
},
"customer": "cus_<id>",
"end": 1704263377,
"invoice": null,
"invoice_item": null,
"promotion_code": null,
"start": 1696314577,
"subscription": "sub_<id>"
},
And I want to receive a webhook when the coupon expires so when "end" time elapses
๐ taking over for my colleague. Let me catch up.
Okay no worries
I'm terribly sorry, it's been so busy on discord this morning
I'm not sure to be honest, but you can use test clocks and test that out easily
based on the description from https://stripe.com/docs/api/events/types#event_types-customer.discount.deleted
Occurs whenever a coupon is removed from a customer.
I think this means you need to manually remove it but we would have to test it out to be sure
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Hey no worries, okay sure I will try it with a test clock thanks