#galher
1 messages · Page 1 of 1 (latest)
Hello 👋
How exactly are you applying the promo? Can you share an example?
I test up creating a new one coupon (once with % or $), re-using a coupon (% or $) and re-using a forever coupon
Are you applying the promo in a checkout session or via the API? If you are using the API then can you share the request ID?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
I create the coupon via API but the issue is easily repro via manually
I create a manual coupon from Stripe Dashboard and it is the same issue
Can you share a request ID of you updating the subscription to use the coupon so that I can take a look at what's going on?
I will share you a test subscription
👍
sub_1MvLYDJd6n4tXBYso3ct6bou
So I do see a coupon being applied but was then taken off by this update request
https://dashboard.stripe.com/test/logs/req_gKo19ThfTIjjRq
Ideally, the flow of applying a coupon to subscription should look something like this
https://stripe.com/docs/billing/subscriptions/coupons?dashboard-or-api=api#discount-subscriptions
I know in code but the issue is from Dashboard, because it is not displayed in the invoice and if I try to add a coupon before charge to the customer nothing is applied
Iin_1MvMs3Jd6n4tXBYsbz9nD6WO
I applied a 10% off forever to the subscription and after I add 5 to the qty and after anothers 5
That is the invoice
Where is the discount?
Because I am using webhook and I am listening the subscription update event but in these cases no discount is listed
Can you see my point?
Hi 👋
Let me take a minute to catch up
evt_1MvMs4Jd6n4tXBYss4pzsJdR
That is the webhook event for drafted invoice
Invoice created event
I am listening for some subscription events and invoices also
But as my colleague pointed out, the discount being applied was removed by a successive update.
A new discount has been applied to that Subscription in this request: https://dashboard.stripe.com/test/logs/req_mtwHc6DQKBlcRc
but no new invoice has been created for it
Nop, I update the subscription with a new discount 10% off forever
And after I update again from 60 to 65
And after I update fro 65 to 70
And nothing but if you see in the invoice the description for each line said 10% discount but in the webhook nothing about coupon or discount is listed
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ok, you can see the information from ids
I don't see any discounts applied to this invoice
Exactly
That is my point
But see the description for each line
Can you see what I am saying?
I see that the invoice was generated 21 minutes ago. Which was after the older discount was removed but before the new coupon was applied. So it was generated during a period where there was no discount on that Susbcription
I will create a new invoice from pending invoice items as result after prorated upgrade to 75
No one coupon was added
I will add one
The same 10% off forever
See the discount
in_1MvNIVJd6n4tXBYsqgsWnDhR
Do you. have the coupon ID I could review?
Now can you see what I am saying?
evt_1MvNJzJd6n4tXBYsWfMGMHk1
That is for customer.discount.created
The id is 10FOREVER
I can see this Id also req_ZmIWPRHDFtkjxR
There is where the discount was applied I think
Just let me know if I need to do something to fix this, I only use the dashboard not the API directly but it is the same behavior
Maybe some setting or something like that
Hello?
Hi
Apologies for the pause, there are multiple people asking questions here and it's just me
It looks like all of these discounts and invoices were created within the last hour or two so it's hard to keep track of what updates apply to which invoices
Relax, I think you leave me alone, no worries
yea, but when I create them I need they must be reflected in my customer invoice
that is my worry
Wait, some of these Invoices are not related to Subscriptions.
But I saw the coupon was being applied to Subscriptions.
that is the way how you handle a upgrade subscription, I did a fix in my code last Friday because I was trying to get the total amount but only search for invoices liked to subscription in object. Subscription but in these cases that is not the correct way, I need to search inside the lines becasue each line is correctly linked to the subscription
but that is another point, no matter if the invoice is related or not, the point is why an amount of 0.00 is applied as discount? no matter what discount rate or amount is applied, all the time is zero
that was my original question
The coupon is being applied to the Subscription, not the Customer. So if an invoice is not related to the Subscription it won't include the coupon discount.
ok, let's see, you have a fail in that point
I was released an invoice directly linked to the subscription, and voilá... the same behavior
in_1MvNqvJd6n4tXBYsnaw4gVRr
this is the id for "invoice.created" event evt_1MvNqxJd6n4tXBYs8qWuW77w
the discount item, I think this is the one that was applied to the invoice
I see that the coupon applied to that subscription shows it was last redeemed 38 minutes ago but this invoice was created 4 minutes ago.
I think we are going to need to do more digging to understand this properly. I'm sorry but I'm going to have to ask you to write in to Support to create a case so we can examine this more thoroughly: https://support.stripe.com/?contact=true