#Andora
1 messages · Page 1 of 1 (latest)
Hi there!
How do you create the subscription? With Checkout Session, Subscription directly, something else?
subscription directly I don't use checkout session
Gotcha. And so to be clear, the desired behavior is a free first month and charging 2.99€ on each subsequent monty, or is it something else?
Like can you tell me ideally how the user would be charged in this scenario?
Basically the idea is allow the user to switch between paypal and stripe (change payment method) at any time. So because you can switch anytime means you should not be charged in stripe if you already been charged in paypal and vice versa
So in my example because the user already paid the 9.99€ subscription when downgrading to 2.99€ subscription using paypal, he should not pay because he already paid, but his balance do need to be updated accordingly
Gotcha. So what you are saying (-7€ + 100% discount first month) sounds like it should work. I would also think you could just give -9.99€ of credit and create the subscription and it should result in a 0€ charge for a bit.
Can you tell me more about how the proration is going wrong here?
so the issue with proration happens when going from the 2.99€ stripe to 9.99€ stripe, this how how the proration looks at this step
and here you have the reason why it's zero and not 2.99€
because since there was a discount it seems like it's amount become 0
I am a bit confused, I thought the first example was 9.99 -> 2.99.
So we are going from 2.99 -> 9.99, what do you want the end payment to be for the user?
there are 2 steps : first one goes from 9.99 paypal ->2.99 stripe and second one goes from 2.99 stripe -> 9.99 stripe
in this case the total should be zero
because the user switched to 2.99€ before he already paid 2.99, and he has a balance of -7€ which means -2.99-7 = -9.99 = 0
but as you can see because I applied a discount when buying the 2.99 subscription
the proration calculation is wrong
this does not happen if I don't apply a discount but then I have another issue is that the user has paid a subscription even though he should not have paid it
I think there is still a step in this that I am not understanding. So it this that they switch back and forth between plans within the same month? Like they switch 9.99 PayPal to 2.99 Stripe and then to 9.99 Stripe within the same billing period and so they should pay 0 when they switch back to 9.99?
exactly
Have you tried just applying a -9.99 balance up front?
so just before buying the subscription ?
Correct
Awesome! I am a bit surprised that the discount works differently here but I'm glad credit works at least
Thank you for your help
Of course! Glad we could find a way to implement this
hold on I'm not sure it works in all case
for example, if I then go from 2.99€ to 9.99€ and then from 2.99€ to 69.99€ it gonna apply 2.99€ instead of 9.99€
which will cost 67€ instead of 60€
That is surprising. Can you send me the ID of the subscription or invoice that this happened for?
invoice id : in_1MBfjzBvZmAnxmFyd4WANktH
I think I wen from 2.99€ paypal to 69.99€ stripe and before that I had already bought 9.99€
but I think I should set both balance before to make the result of the subscription = 0, and also after to add the remaining balance
instead of setting to the value of the current subscription
Thanks for the example. Apologies still looking at it a bit. I can see the behavior you are describing but am having a bit of trouble confirming what happened just before on this customer
Oh wait, I confused myself. Looking at the call just before that subscription, it looks like only -2.99 of balance was given to them https://dashboard.stripe.com/test/logs/req_wCHLpw3KhEgrMn
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
yes that's because I went from a 2.99 subscription directly to 69.99 so I applied -2.99 to the balance instead of 9.99
this is why I'm thinking I need to update the balance before to cancel to nullify the payment and also after to set the new balance
Gotcha, yeah, whichever makes the most sense for your usecase
You can close the thread I think