#marc_marc-invoice-checkout-redirects

1 messages ยท Page 1 of 1 (latest)

hallow roseBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1266069423152828518

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

eternal wind
#

Full question:

I have implemented Stripe payments where customers use their saved payment methods during the checkout process. We create an "Invoice" and pay it with the saved payment method. This works well, but we encounter an issue when the card payment fails.

Currently, if a payment fails, we redirect the customer to Stripe Checkout to enter their card details again. However, this creates a new invoice, leaving the original invoice unpaid in our system.

What I would like to do instead is redirect the user to the "hosted invoice page" for the invoice with the failed payment, so they can enter their credit card details manually. The issue is that this hosted invoice page does not provide a way to redirect the user back to our website's checkout process.

Is there a best practice or recommended solution for this scenario?

analog pagoda
#

Hi ๐Ÿ‘‹

Is the reason you want to redirect the user back to your site that you need it to complete your order flow?

eternal wind
#

Right now only because it's a better user experience. Get visual confirmation that their order was created and is pending review by our team.

#

If a redirect from the hosted invoice page is not possible, I think there are 2 alternative options:

  1. Void the invoice, and redirect to Stripe Checkout and have it create a new invoice. Downside is that we'll end up with some void invoices that might be confusing if they show up in the Billing Portal, etc.

  2. Redirect the user to Stripe Checkout but not to pay a new invoice, but rather to setup new payment details. After that, we redirect back our own checkout flow and re-attempt the payment with the saved details like we do normally. This might be a bit confusing to the customer as the Stripe Checkout wouldn't mention anything about this particular order.

#

I'm curious what is considered the best practice

analog pagoda
#

Well it sounds like you have thought through a couple different alternative implementations.

#

I don't think we have a specific "best practice" recommendation in this scenario.

#

For what it's worth, I am testing out having voided invoices and I don't see them show up in the billing portal.

But I might not fully understand how your Subscription integration is set up so I recommend you test the flow yourself to see how it looks.

eternal wind
#

I'll try that approach then. It would be the simplest to implement

#

Thank you!

analog pagoda
#

Once again, I recommend you build the entire flow in code using your Test mode API keys so you can test this flow end-to-end. That way you can be certain of the behavior before you have any customers walk through it.

#

It's the kind of thing I do to learn more about Stripe's API behaviors