#mangle8582

1 messages · Page 1 of 1 (latest)

desert burrowBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rapid hornet
#

That event is always sent when 3ds is required

#

That's because payment is attempted and failed because 3ds is required

unreal agate
#

I was trying to search for a boolean there to not remove the subscription if it's 3d

#

And only trigger on payment fail from subscription recurring

#

To delete the subscription

rapid hornet
#

Well recurring subscription payments can require 3ds as well

#

It's fairly rare

#

But still happens

unreal agate
#

True

#

Then how can i delete the subscription on fail payment? For recurring?

rapid hornet
#

You don't want any retries?

unreal agate
#

I don't wanna rely on automatic retries

rapid hornet
#

Why?

#

automatic retries are a way to increase your revenue

unreal agate
#

Because i'm still not sure how can i do it.

On Frontend i will need to keep subscription unpaid, and Retry button doens't work.
Changing of Payment Method is only for future payments there on the subscription UI.

And i will need to trigger somehow on changing of the payment method. But he will need to add the same card there to trigger retry. I'm a bit confused

rapid hornet
#

Failed payments happen all the time

#

It's not a good idea to just cancel the sub every time one happens

#

I can help you implement this if you want

unreal agate
#

That's true

rapid hornet
#

But just warning you that you will have a ton of cancelled subs due to this

unreal agate
#

I wanted to do retries, but somehow deleting the subscription seemed easier, but i see it's not a reliable solution. So i need to do retries

rapid hornet
#

You don't need to do anything to implement retries

#

Just change a setting on your dashboard

#

It's really easy

unreal agate
#

Yea, but the case where the user enters app, and he doens't wanna wait 1 day for retry.

He want to reactivate subscription imediately. He needs a button to retry that.

rapid hornet
#

Yeah I mean you can do that if you want

unreal agate
#

Let's say he didnd't had money.
After one hour when the subscription is unpaid, he enters app and he wants to retry imediately

#

To continue working

rapid hornet
#

Yeah you can do this, but I would put some restriction to prevent unlimited restries client side so someone doesn't just spam the api with retries

unreal agate
#

Because if the subscription is unpaid he won't be able to use the app's functionality

rapid hornet
#

Yeah makes sense

unreal agate
#

Yea, i could add a rate limiter on API, and maybe a functionality like login block after few attemps, but in this case will be retries attemps

rapid hornet
#

Sure

#

Or just cap the max manual retries in your database to some fixed number

unreal agate
#

But how can i trigger the payment from backend with which stripe method?

#

Front -> HTTP call -> Backend -> await stripe. which method

rapid hornet
#

To pay the underlying subscription's invoice

unreal agate
#

So i will need the invoiceId right in the database

rapid hornet
#

Yeah or susbcription object

unreal agate
#

Sounds good!

rapid hornet
#

I also recommend maintaining a form to allow the customer to switch cards and attempt payment with a new card/payment method

#

Sometimes a failed payment can be due to a bad card, etc

#

Up to you though

unreal agate
#

<PaymentElement id='payment-element' />
@stripe/react-stripe-js

I use this on frontend, and he can change cards and then hit Retry

#

Thank you ! You were really helpful