#galher

1 messages · Page 1 of 1 (latest)

primal sparrowBOT
native radish
#

Hello 👋
How exactly are you applying the promo? Can you share an example?

quaint escarp
#

I test up creating a new one coupon (once with % or $), re-using a coupon (% or $) and re-using a forever coupon

native radish
quaint escarp
#

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

native radish
#

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?

quaint escarp
#

I will share you a test subscription

native radish
#

👍

quaint escarp
#

sub_1MvLYDJd6n4tXBYso3ct6bou

native radish
primal sparrowBOT
quaint escarp
#

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?

late dome
#

Hi 👋

Let me take a minute to catch up

quaint escarp
#

evt_1MvMs4Jd6n4tXBYss4pzsJdR

#

That is the webhook event for drafted invoice

#

Invoice created event

#

I am listening for some subscription events and invoices also

late dome
#

But as my colleague pointed out, the discount being applied was removed by a successive update.

quaint escarp
#

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

late dome
#

I can't look at dashboard links because it's not my dashboard.

#

But IDs are helpful

quaint escarp
#

Ok, you can see the information from ids

late dome
#

I don't see any discounts applied to this invoice

quaint escarp
#

That is my point

#

But see the description for each line

#

Can you see what I am saying?

late dome
#

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

quaint escarp
#

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

late dome
#

Do you. have the coupon ID I could review?

quaint escarp
#

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?

late dome
#

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

quaint escarp
#

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

late dome
#

Wait, some of these Invoices are not related to Subscriptions.

#

But I saw the coupon was being applied to Subscriptions.

quaint escarp
#

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

late dome
#

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.

quaint escarp
#

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

late dome
#

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

quaint escarp
#

do you know what?

#

not continue

#

I spend a lot of time here with you, next time I will go directly with a real support