#johnroberts-invoice-urls

1 messages ยท Page 1 of 1 (latest)

cold glacierBOT
eternal gyro
#

johnroberts-invoice-urls

#

@halcyon elbow we don't really make any guarantee here. Even if it expired in X days right now it could be lowered later. We make it easy for the end customer to gain access back though if the URL expired by sending them a code via email

halcyon elbow
#

Thanks. When I went to a URL that had expired, I got a page referring me to my company's email address (the platform account) to get another URL. Does that mean we would get emails to request a new URL?

eternal gyro
#

Not sure I understand what you are describing. Can you give me a concrete example?

halcyon elbow
#

Here is an expired link

#

It says to get a new link contact our email

eternal gyro
#

which Invoice id is this for?

halcyon elbow
#

test mode

#

in_1M8urTFOtBDkom7gupPw1Xn2

#

Our use case is to send the customer an email with the link if we receive a payment_intent.payment_failed

eternal gyro
halcyon elbow
#

Not sure, I don't think so

eternal gyro
#

I think that might be the issue, if you don't email invoices by default then there's no good recovery flow yet ๐Ÿ˜ฆ

halcyon elbow
#

OK Thanks!

eternal gyro
#

What happens if you retrieve the Invoice via the API. Do you not get a newer URL that works?

halcyon elbow
#

hahaha I was just typing the question -- can I just get the invoice from the API and will it have a fresh url

#

I will try

eternal gyro
#

let me know if that works I'm curious now

halcyon elbow
#

It works! Woo!

eternal gyro
#

ah perfect, so the main issue is that if you have cached a URL it might have expired by then and if you don't email invoices to customers by default the only recovery flow is for them to email you

#

so as long as you don't cache those URLs and get them fresh from the API when you want to email customers you should be fine

halcyon elbow
#

Yep. That works for me. Thank you very much

eternal gyro
#

sure thing, thanks for bearing with me. I helped design this flow and I still got confused so we definitely can improve this a bit ๐Ÿ™‚

halcyon elbow
#

Our flow is to charge the invoice to the customer's default payment method, typically bank debit. If sometime later we get a payment_intent.payment_failed we email them with the hosted invoice URL at that time.

eternal gyro
#

yeah that makes sense

halcyon elbow
#

We originally were using the invoice.payment_failed but the payment_intent.payment_failed has failure info.

#

The invoice.payment_failed payload has the hosted invoice URL but not failure info

eternal gyro
#

yeah I think I'd used invoice.payment_failed and then go find the information I need from the underlying PaymentIntent and then decide next steps

halcyon elbow
#

OK, I'll look into doing it that way