#tonidigital_api
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/1334143872955060336
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Additional info, payment failed because card has insufficient funds. Why it's event subscriptio created if card didn't have enough money?
I did same case on test mode with Stripe test card "insufficient funds" and subscription is not even created.
Do you have any more details how this can happened?
๐
Checking the invoice you've shared with us...
There is no PaymentMethod collected to pay that invoice
Ah I see that the Subscription was created with this Payment Method pm_1QmXag02Eb1sVOaRU4CrjHEX ๐ค
yes, we have paymentmethod. Without that we couldn't have created this subscription
Ah the bank issuer declined the Payment actually (req_5H9uxaqxT6BqBo)
So the Customer have two options here:
- Reach out to their bank account and check why they declined their payment (It seems like they don't have enough funds
insufficient_funds) - Or use another PaymentMethod
Ok, but why we event have created subscription if this card, means paymentMethod is not correct - not have enought money?
We're using property CollectionMethod = "charge_automatically"
to make sure subscription will be created only if card is really valid
It is not clear and we need urgent help
because you created the Subscription with payment_behavior: default_incomplete .
If you want to block the customer from using your services untill they pay, then you need to listen to the webhook event invoice.payment_failed
And block them from using your services untill they pay the invoice (using another PaymentMethod)
Ok, but how Stripe subscription is created if card cannot be charged
This is something you specify when creating the Subscription
If you want to fail the creation of the Subscription if the first invoice can't be paid
then pass error_if_incomplete to payment_behavior
You created the Subscription req_wGv1zXrmptICdM with payment_behavior: "default_incomplete", (Which is the recommended between) So that you allow your customers some time to provide another PaymentMethods or collect new one. But feel free to change that if needed.
So you're saying if we set PaymentBehavior = "error_if_incomplete " Subcription will not be created and we will receive immediately exception from Stripe?
๐ taking over for my colleague. Let me catch up.
yes correct
ok I'll try it
sure let me know if you need any more help