#waqas-ahmad_best-practices

1 messages ¡ Page 1 of 1 (latest)

river nymphBOT
#

👋 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.

sharp jungle
#

hi there!

#

You charge the users once, or on a recurring basis?

rough atlas
#

recurring basis

sharp jungle
#

then yes creating a Subscription makes sense. then you can upgrade the subscription at any time to change the quantity of the product (shops).

rough atlas
#

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?

sharp jungle
#

handle what exactly? what do you want to happen?

rough atlas
#

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

sharp jungle
#

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.

rough atlas
#

How can I block the upgrade if the payment fails?

sharp jungle
rough atlas
#

If I block the upgrade if the payment fails then stripe will not retry to get payment?

sharp jungle
#

no, the upgrade itself will fail, so the quantity won't change.

rough atlas
#

okay if payment fail then stripe will send "invoice.payment_failed". Right?

sharp jungle
#

correct

rough atlas
#

Last question how Can I test this? Tell me card which have gnerate low balance error

#

at the time of subscription update

sharp jungle
rough atlas
#

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

sharp jungle
#

I don't understand your question, sorry.

rough atlas
#

When I add this card in highlighted section it will not give error. But when I update subscription using these cards will give error

sharp jungle
#

correct

rough atlas
#

ok thanks for help