#kushal-subscriptions
1 messages · Page 1 of 1 (latest)
kushal — Today at 12:58 PM
if a person subscribe to one of my plan
and then if he tries to switch to higher plan, and their previously saved card details have expired or no longer valid, how can i handle and also test that case in my web app?
will you invoice the customer immediately upon upgrade?
i have kept the
payment_behavior="pending_if_incomplete",
proration_behavior='always_invoice'
this while modifying the subscription
gimme a while to get back to you.
ok take your time
this guide may be helpful : https://stripe.com/docs/billing/subscriptions/pending-updates
this section specifically : https://stripe.com/docs/billing/subscriptions/pending-updates#handling-failed-payments
yes i went through this document but can you please tell me how can i create such case in my project to in stripe test mode
what part of it are you stuck on exactly?
hi
i want to encounter with expired card scenario while upgrading user subscription
to handle it
i have code ready for it i only want to know how can i create such a scenario
i am in test mode and using the stripes default cards
after creating the subscription, you can update the customer's payment method to the "Decline after attaching" card from https://stripe.com/docs/testing#declined-payments ; and then on the next invoice (for example by triggering an upgrade) there will be a decline
thank you so much for your help
sorry for bothering i am new to stripe can you please tell how can i update the customers payment method and update the card card for the customer i went through the stripe customers doc https://stripe.com/docs/api/customers/update but that did not help
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
have you considered using Customer Portal https://stripe.com/docs/billing/subscriptions/integrating-customer-portal
this is helpful but there should be some predefine apis i could call to implement that logic in my web app can you please share that documentation?
if you want to implement it yourself it boils down to a Setup Intent https://stripe.com/docs/payments/setup-intents