#jackson.bayor

1 messages ยท Page 1 of 1 (latest)

late cosmosBOT
bold lark
north tendon
#

Can you share the subscription ID (sub_xxx)?

bold lark
#

sub_1N5FdoDUun9ImF4JEG99bA4R

#

User gets this error

#

But is there something I'm doing wrong?

north tendon
#

Thanks for waiting. Discord is busy now. Looking into it

bold lark
#

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

north tendon
#

If the invoice is paid during the recurring payments, the billing_reason will be subscription_cycle

bold lark
#

Okay sounds good

#

Thanks

north tendon
#

No problem! Happy to help ๐Ÿ˜„

bold lark
#

๐Ÿ™

#

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

north tendon
#

Customer doesn't have the access to this page.

bold lark
#

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

north tendon
#

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

bold lark
#

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

north tendon
#

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

bold lark
#

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

north tendon
#

If the customer keeps using the same card for the payment, then the error message will always be the same

bold lark
#

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

late cosmosBOT
ember anchor
#

Hi @bold lark I'm taking over.

bold lark
#

Okay

#

Thanks

ember anchor
bold lark
#

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

ember anchor
#

As I mentioned before, Stripe retries the renewing payments, not the fist payment.

#

What made you think that Stripe is retrying the first payment?

bold lark
#

Cause the user never got to make a first successful payment

#

They're on the registration page when they see this

ember anchor
#

I don't see retry here.

bold lark
#

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

ember anchor
#

Thanks for the ID. The subscription was created through a schedule, and that's why the behaviour is a bit different.

bold lark
#

Oh

#

How can I handle this?

ember anchor
#

You can listen to invoice.payment_failed event and ask your customer to come to your website to complete the payment

bold lark
#

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.

ember anchor
#

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.

bold lark
#

hmm

#

I have to read ont hat

#

But will user action be required again to create the schedule?

ember anchor
#

No, user interaction is not needed to create a schedule.

bold lark
#

Okay, as long as the first subscription (which is not a schedule) is successful right?

ember anchor
#

Yes you are right/