#alle00

1 messages ยท Page 1 of 1 (latest)

daring robinBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • alle00, 20 hours ago, 47 messages
  • alle00, 5 days ago, 13 messages
cloud sluice
jaunty geode
#

๐Ÿ‘‹ happy to help

cloud sluice
#

Hello! Awesome to hear!

#

Also, what confuses me even more, is when I manually add it through stripe dashboard to the same subscription, eg req_HZkWVgZr1baxcW

#

it works

jaunty geode
cloud sluice
#

I've manually added all of the -50$

jaunty geode
#

the request you shared is from another subscription

#

the first one you shared applied the coupon correctly

#

am I missing something here?

daring robinBOT
cloud sluice
#

am I? wait, let me check if I missed something with the subscriptions

drifting flame
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

cloud sluice
#

will get back to you soon, let me just re-test everything, I might have missed something with my test clocks

#

okay so I've figured it out

#

when it's the SAME coupon it doesn't work

#

but when it's different it does

#

it returns 200: req_JdJAIunKLSgljG

#

but the price is still 300$ instead of 250$

drifting flame
#

Well you can't 'stack' coupons so that seems expected if you're trying to apply another coupon to a subscription with an already active coupon

cloud sluice
#

but the coupon was a "once" coupon

drifting flame
cloud sluice
#

and used on the last invoice

#

shouldn't re-applying it after the fact work?

drifting flame
#

Let me have a look

cloud sluice
#

the flow is
=> coupon lowers it by 50$ (type once, quantity is higher than required)
=> invoice created
=> after 11 months apply the same coupon to the upcoming invoice by adding it onto subscription
=> coupon lowers it by 50$ again instead of just leaving it at full price

drifting flame
#

Hmm, I think the issue is that the current coupon is still technically active as you're in the same billing period that it applied to

cloud sluice
#

I see, just to understand, these subscriptions I made in the test clock are from today => forever, and the real ones are annual subs, does this impact it?

drifting flame
#

Not sure I understand the difference. The example sub you shared me is subscribed to a yearly price

cloud sluice
#

oh I think I misunderstood what you meant, so because it's been applied 11 months before it's considered "active" until the next invoice is created?

drifting flame
#

Yes because you're currently still in the same initial yearly billing period when you created the sub and applied the original coupon

cloud sluice
#

ahhh okay

cloud sluice
#

understood, well my issue with invoice.created is that I can't test it then with the test clocks

#

because test clocks don't allow modifications while they are running

drifting flame
#

Hmm, really? Got an example?

cloud sluice
#

there is no way to apply a future discount for the upcoming invoice right? ๐Ÿ˜…

cloud sluice
#

I've wrote about it yesterday

#

but basically you get a 429

drifting flame
#

Yeah you're making an API request to update the Subscription directly. You don't do that

cloud sluice
#

now?

drifting flame
#

Yeah as I said, that request is to update the sub directly. You don't do that

cloud sluice
#

so just to understand, invoice.created does not mean the user has paid for it yet?

#

I'm just not clear on the invoice lifecycle events, I don't want to end up in a situation where the invoice is charged before updated with the discount

#

from what I understood the two happen almost immidiately one after the other

drifting flame
cloud sluice
#

Ah I see, do I need to call the finalize endpoint after I apply it for it to go through immidiately, or should I just wait for 3 days, the behavior would be the same I assume just spaced out differently?

drifting flame
#

It wouldn't be 3 days, it'd be finalised within ~1 hour assuming your webhook where you apply the discount responds with a 2xx:

Stripe waits an hour after receiving a successful response to the invoice.created event before attempting payment. If we donโ€™t receive a successful response within 72 hours, we attempt to finalize and send the invoice.

#

Of course you can manually call /finalize and/or /pay yourself if you wish

cloud sluice
#

Understood, awesome, thank you so much