#waqas-ahmad_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1438832805932171274
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
recurring basis
then yes creating a Subscription makes sense. then you can upgrade the subscription at any time to change the quantity of the product (shops).
Let's say user have 2 shops at start. He buy monthly subscription. Then after 15 days he add one more shop. But he doesn't have amount. Stripe will retry within 1 week. Then he cancel subscription. But he already buy full amount of 2 shops. How I handle this?
handle what exactly? what do you want to happen?
I recommend testing this in test mode to see how everything works. you can use Test Clocks for this: https://docs.stripe.com/billing/testing/test-clocks
let's say 1 shop price is $10. Users buy monthly subscription of 2 shops means $20/month. At 15 he add one more shop. But users doesn't have sufficient amount in card. Then what will happens
At 15 I call update subscription api with propartion yes
depends on your settings here: https://dashboard.stripe.com/settings/billing/automatic
and also depends on your integration.
you could block the upgrade if the payment fails. or you could just retry the payment later. or cancel the subscription. or something else, it's up to you.
How can I block the upgrade if the payment fails?
If I block the upgrade if the payment fails then stripe will not retry to get payment?
no, the upgrade itself will fail, so the quantity won't change.
okay if payment fail then stripe will send "invoice.payment_failed". Right?
correct
Last question how Can I test this? Tell me card which have gnerate low balance error
at the time of subscription update
you can update the default payment method on the customer with this one: https://docs.stripe.com/testing#:~:text=To simulate a declined payment with a successfully attached card%2C use the next one.
then the next payment will fail.
I can add this card in my payment method but when I update subscription it will give error. Right? Will not give card when I try to add in my payment methods
I don't understand your question, sorry.
When I add this card in highlighted section it will not give error. But when I update subscription using these cards will give error
correct
ok thanks for help