#jackson.bayor
1 messages ยท Page 1 of 1 (latest)
Can you share the subscription ID (sub_xxx)?
sub_1N5FdoDUun9ImF4JEG99bA4R
User gets this error
But is there something I'm doing wrong?
Thanks for waiting. Discord is busy now. Looking into it
From https://dashboard.stripe.com/payments/pi_3N5FdqDUun9ImF4J0O1C1QXx, this was the decline from the card issuer. Customer should reach out to his/her card issuer/bank why the payment was declined
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Okay thanks.
when listening to this event invoice.paid how do you differentiate between the first initial payment of the subscription from the recurring payments?
Because, the first payment is a different workflow where we send the customer the registration details etc. The recurring, we just send invoice and dont want to repeat the first workflow
You may check billing_reason in the Invoice object: https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
If the invoice is created from the initial payment of the subscription creation, it will be subscription_create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If the invoice is paid during the recurring payments, the billing_reason will be subscription_cycle
No problem! Happy to help ๐
๐
So I noticed on the UI, the user received the error: Your card does not support this type of purchase.
But stripe keeps retrying
The user would believe their card did not work and they're not registered
Why is stripe keep retrying?
The error message from stripe on the UI did not tell the customer it will keep retrying
The customer is unaware
Also I have setup an email to capture this and is sending email to the customer regarding this
But if the event is tomorrow, it woulnt make sense to retry after 3 days
Customer doesn't have the access to this page.
The customer believes the registration failed and they have to come back to the page to reregister if they have another card for instance
Yes they dont
You may enable Send emails to customers to update failed card payment methods in https://dashboard.stripe.com/settings/billing/automatic, so that the customer will be informed to update the payment method details when the payment fails
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So I noticed on the UI, the user received the error: Your card does not support this type of purchase
This is the UI your system implemented. Your system can either use above email setting to ask for new payment method, or collect new payment method from the customer with Payment Element
Yeah what im saying is that the payment failed right? but within the system, stripe is retrying.
but on the frontend, registration is not complete
At what point would I know to show the customer that: "Your payment failed but we will keep retrying. You can leave the registration page now..."
Which registration are you referring to? Stripe retrying is not visible to the customer.
When your server receives invoice.payment_failed event, your application may ask customer for the new payment method details regardless whether Stripe attempts for any retry
Retrying it just the best effort that Stripe is attempting behind the scene and it's not meant to inform the customer. If the customer is able to update to new payment method, you should bring the customer back to update it
Instead of showing the message that "Your payment failed but we will keep retrying. You can leave the registration page now...", your application should ask for new payment method details
Yes my application is doing that
Thats why we show an error to the user
That says that
And they have the card form by stripe element below this to input another card
If the customer keeps using the same card for the payment, then the error message will always be the same
Thats correct
and we are not able to register them for the event they are paying for.
Basically what im trying to say is if the initial payment failed for the first subscription in this scenario, there should be a retry trill the first payment is successful at the time the customer is inputting their card details
Hi @bold lark I'm taking over.
https://stripe.com/docs/billing/subscriptions/overview#settings Stripe performs smart retries for renewing payments, but there's no retry for the 1st payment since the user is already on session.
i understand. Let me try to explaing th current scenaria
scenario*
The customer is trying to buy a product and make instalment payments.
When filling in their details and card payment to buy the product, the payment fails.
The error stripe returns to the user in this scenario is "Your card does not support this type of purchase."
The user could choose to terminate the process because they dont have a card that works right?
But behind the scenes, stripe is retrying which I dont think is necessary as it's the first payment and not trying to renew a subscription
As I mentioned before, Stripe retries the renewing payments, not the fist payment.
What made you think that Stripe is retrying the first payment?
Cause the user never got to make a first successful payment
They're on the registration page when they see this
I don't see retry here.
sub_1N5FdoDUun9ImF4JEG99bA4R
If you look at this, you will see no successful payment made yet
But this invoice is being retried
in_1N5FdoDUun9ImF4JHpjGTOHg
It has retried 3 times and next is in 3 days
Thanks for the ID. The subscription was created through a schedule, and that's why the behaviour is a bit different.
You can listen to invoice.payment_failed event and ask your customer to come to your website to complete the payment
I have that done
But in this case, it is possible the product they're paying for expires in 2 days, or the deadline is in 2 days so it wouldn't make sense to retry after 3 days.
Because during the payment, the user never leaves the payment page, they'll believe/assume they're not registered and their card details will not be used.
Alternatively you might want use /v1/subscriptons API to create the subscription, once the first payment is succeeded, create a schedule to manage the subscrition.
hmm
I have to read ont hat
But will user action be required again to create the schedule?
No, user interaction is not needed to create a schedule.
Okay, as long as the first subscription (which is not a schedule) is successful right?
Yes you are right/