#GlAof
1 messages ยท Page 1 of 1 (latest)
Hello ๐
I don't think we support that usecase with PaymentLinks really. If you just want to send users the page where they can add a new payment method and pay the invoice, you have several options. The easiest one,
You can enable Customer emails under "Manage failed payments" in your billing settings
https://dashboard.stripe.com/settings/billing/automatic
This would send the customer an email with hosted invoice page link where they can add a new PaymentMethod and pay the invoice
Is it possible to create a new invoice (using the failed invoice as a template, for example), and send the customer a link to that invoice so that the customer can both update the payment method and pay the invoice?
Also, can you briefly describe some of the other several options you mentioned above?
Is it possible to create a new invoice (using the failed invoice as a template, for example), and send the customer a link to that invoice so that the customer can both update the payment method and pay the invoice?
Taking a step back, why would you want to create a new invoice here when you already have one that's open and ready to be paid? Trying to make sure I am on the same page.
Also, can you briefly describe some of the other several options you mentioned above?
Sure thing, the other option would be for you to integrate customer portal
https://stripe.com/docs/customer-management
It will allow your customers to add a new payment method and pay past invoices
If you want to handle everything in your UI via the API then you can retrieve clientSecret from subscription.latest_invoice.payment_intent & render Stripe Elements to collect a new PaymentMethod and pay the invoice
The reasoning for creating a new invoice was that the last one failed payment. If I can reuse it that's great.
So if I can reuse it, I already have an invoice. So all I have to to do is to redirect the customer to a place he can pay that invoice after updating the payment methods.
Yup
You can use invoice.hosted_invoice_url for that
https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url
The hosted invoice page is on our frontend, or stripe's?
Stripe's. If you want to handle it all on your own then you can use the API based approach I mentioned above
No, I want to offload as much as possible to Stripe
Gotcha ๐
I will experiment with that URL and come back if I have any questions. Thank you for your help, it's very much appreciated
NP! ๐ Happy to help
Good luck