#rexy_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1364905718574088293
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
In case it helps here is some example the data I found in the event payloads
"discount_amounts": [
{
"amount": 400,
"discount": "di_1QzKgu4Bq7XXUAkumufW5b0s"
},
{
"amount": 1800,
"discount": "di_1QzKRg4Bq7XXUAkuUa6GKBbN"
}
],
"discountable": true,
"discounts": [
"di_1QzKgu4Bq7XXUAkumufW5b0s"
],
"discounts": [
"di_1QzKgu4Bq7XXUAkumufW5b0s"
],
and can you clfiry what information exactly are you looking for, realted to the discount?
I basically would like to get the coupon data associated with these di_* ids
I can get you an example if it helps
you want to retrive the full Discount object?
like this? https://docs.stripe.com/api/discounts/object
Basically something like that (it's another data but you will get the idea)
"discount_amounts": [
{
"amount": 3450,
"discount": {
"id": "di_1QzKei4Bq7XXUAkuekEMtwOp",
"object": "discount",
"checkout_session": null,
"coupon": {
"id": "RfhzZFjR",
...
"name": "Kinsta Family Discount",
"owning_merchant": "acct_1040XM4Bq7XXUAku",
"owning_merchant_info": "acct_1040XM4Bq7XXUAku",
"percent_off": 30.0,
"redeem_by": null,
"script": null,
"times_redeemed": 4,
"type": null,
"valid": true
},
"customer": "cus_LmmMFzJi6uPf94",
"end": null,
"invoice": null,
"invoice_item": null,
"promotion_code": null,
"start": 1741191527,
"subscription": null,
"subscription_item": "si_Rt6soE1Giob6Zn"
},
"source": "item"
},
{
"amount": 4025,
"discount": {
"id": "di_1QzKRg4Bq7XXUAkuUa6GKBbN",
"object": "discount",
"checkout_session": null,
"coupon": {
"id": "OwV3GLvE",
"object": "coupon",
...
"name": "Black Friday (update)",
"owning_merchant": "acct_1040XM4Bq7XXUAku",
"owning_merchant_info": "acct_1040XM4Bq7XXUAku",
"percent_off": 50.0,
"redeem_by": null,
"script": null,
"times_redeemed": 5,
"type": null,
"valid": true
},
},
"source": "group"
}
],
I can't really use what you shared because it only has delete endpoints :/
The other thing is that I would like to avoid using the API if possible only rely on data provided by this route
https://docs.stripe.com/api/events
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
we don't have a retrive Discount endpoint here <https://docs.stripe.com/api/discounts/object, so not sure. looking into this.
I mean the documentation only shows these endpoints
I think I may have found what I was looking for, apparently there events such as
customer.discount.created| updated| deleted
customer.discount.created| updated| deleted
yes, that's what I was going to suggest