#mentijm-subscriptions
1 messages ยท Page 1 of 1 (latest)
Hi @high geyser, I'm really glad to hear you're enjoying our products, and I'm happy to help you but I'm not sure I got your question. Could you please clarify what is the issue
Hi tarzan! I'll try to explain again ๐
Say a user went through the prebuilt checkout and signed up for a basic subscription. We handle customer, subscription, payment etc through the checkout and the customer & subscription is provisioned on the checkout.session.completed webhook.
One week later this customer goes to our change-plan page and decides to upgrade to a better plan. The page makes a request to your subscription update which updates the subscription, which generates a new invoice and a payment is attempted etc.
However, for us, on our current implementation it seems like the subscription is updated to be on the new, better plan even though the payments fail. We'd like this user to be on the plan he already paid for until the payment succeeds, then we want him to be upgraded.
We don't want to give the customer the new product until it's been successfully paid for
are you using the customer.subscription.updated event to handle the changes in the subscription?
We're but we need to find a better way to manage it.
- Either we update the subscription right away (but can roll back to an earlier state if payment fails)
or 2) We don't actually update the subscription until the payment is successfull
Do you see what I mean?
yes I see what you're saying and sorry for my late reply
I think the best way to handle this is using the billing_reason when listening to invoice.paid
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and if the value is subscription_update then you make the changes
@grand olive sanity check please
What you likely need is payment_behavior: 'pending_if_incomplete': https://stripe.com/docs/billing/subscriptions/pending-updates
@high geyser Did that help? Let me know if you have any follow-up Qs