#Jogui-recurring-3ds

1 messages ยท Page 1 of 1 (latest)

velvet hinge
#

Hey, can you share the ID of a failing Payment Intent?

round knot
#

I can give you the invoice ID that is generated with past due

#

in_1KblLQHFmluYEPgfx6Ia4w3Q

#

The sub -> sub_1KblJOHFmluYEPgfVOB8PlgB

#

(by updating the subscription entity with 14 days trial to 0 days trial in the stripe dashboard, I'm able to execute the renewal)

#

The payment intent

#

pi_3KblLQHFmluYEPgf1hGGdRqK

#

@velvet hinge I hope this information helps

#

I was thinking in adding to this email, the invoice.hosted_invoice_url and make the user pay using your website, the problem is that it could be better if I have total control (therefore using Stripe Elements), as we have our website in some languages that are not supported by Stripe (like Catalan)

#

But is strange that if the user validates the first time in Stripe Elements the iframe of 3Dsecure when accepting the trial, that renews require it again

velvet hinge
#

You're using a test card that will always required 3DS auth: 4000000000003220

round knot
#

Okay, good point, but it can be a production use case right?

velvet hinge
#

Sure, there could be instances where a bank will decline a recurring charge even if we've taken steps to 'setup' the card appropriately

round knot
#

Okay, but this solution cannot be custom i18n localized right?, It's a mandatory requirement for my project that can be custom localized.

velvet hinge
#

Correct, then you'd need to facilitate your own method to bring the customer on-session to complete payment

#

invoice.payment_failed is a good event to listen for, then you can handle accordingly

round knot
#

Okay, then, I humble request your assistence to this next step

#

Does Stripe Elements api allows to pay directly to an invoice, without creating a new one?

#

I understand that what I have to do, is to allow the user to pay for this invoice that is having problems, not to create a new subscription from 0

velvet hinge
#

Yes, you'd use the client_secret from the existing PI on the Invoice object

#

So I guess it would look something like this:

  • Listen for invoice.payment_failed events.
  • Send email to customer to bring them on-session.
  • Build some kind of payment page, that receives the PI client_secret (perhaps as a query parameter).
  • Initialise Elements and confirm payment with Stripe.js.
#

That will then mark the Invoice as paid and subscription will update accordingly

round knot
#

then i will receive the event of subscription update and work with the standard lifecycle for handling renewal

#

perfect, @velvet hinge you are the best, just what I needed

#

If I must be sincere, in this last steps i didn't thought in 3D secure activating on each subscription invoice, but only in the first one that requires the user interaction

#

and has been a last minute urgency

#

I will implement as explained here, thank you

velvet hinge
#

Yeah the 3DS requirement on recurring off-session payments isn't very common (but can happen)

#

So it's good you have recovery flow for that

#

Some test cards will work that the only require 3DS for the initial payment, then subsequent payments are fine

round knot
#

understood ๐Ÿ™‚

velvet hinge
#

I need to go now, but my colleague @runic hemlock is here to help with any follow-up Qs ๐Ÿ‘‹