#frallain_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/1414912623899574322
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
example of such sub : https://dashboard.stripe.com/subscriptions/sub_1ROhwRI9qXomtXqSvnn1ry6f
Hmm, you can probably look at the associated Discount object on one of the invoices and infer it from the start timestamp: https://docs.stripe.com/api/discounts/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
OK cool! One more question : for "once" coupon, how can I know API-wise that it has been already applied or not?
What do you mean by 'once' coupons? As in duration: 'once'?
yes
What exactly are you trying to do?
we sometimes see some once coupons that have already been used and stay on the subscription after use, dangling
We'd like to detect those
Got an example? I think that is expected
You'd probably need to check the invoice(s) for the subscription and check to see if discounts is set on them. If for example it's only set on the Jan invoice and not on Feb invoice then you can infer that is has been 'applied'
Not great I know
OK, yes that would be great to have a dedicated field on the discount entity for this
or fill in start and end for those once coupons
One sec, checking on this as we can't reproduce this behaviour
just found one
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
To confirm, you're creating these subscriptions directly via the API and not via Checkout etc?
yes via the API
OK, one moment
then our Support adds some coupons via the dashboard
No in fact previous example was unclear
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
To be clear, this is an example of this behaviour:
we sometimes see some once coupons that have already been used and stay on the subscription after use, dangling
???
Looks like that subscription just had a new discount applied?
Look at https://dashboard.stripe.com/subscriptions/sub_EvwvpVR2rdGiqk :
sucess-hd+ao-year-$1333-once is at subscription.discount.coupon whereas it has been already applied on https://dashboard.stripe.com/invoices/in_1Q5CXbI9qXomtXqSEdvyBwej
Both discount and discounts were null before you applied that coupon on 8/13: https://dashboard.stripe.com/events/evt_1RvkBcI9qXomtXqS8ITfMLHa
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Right but then you/somebody applied it again, here: https://dashboard.stripe.com/logs/req_o9MK8YvKffcGLX
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Before that call discount/discounts were null, which is not what you described
MMmh allright
So it doesn't seem like the coupons/discounts are hanging, but that they're being re-applied again