#sweetpopcornsimon

1 messages ยท Page 1 of 1 (latest)

mint flareBOT
timber heron
#

Can you give an example of expires coupon you are referring to?

safe sedge
#

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

earnest pasture
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

safe sedge
#

Okay no worries

earnest pasture
#

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

safe sedge
#

Hey no worries, okay sure I will try it with a test clock thanks