#anthony_charge-receipt

1 messages ¡ Page 1 of 1 (latest)

compact muskBOT
#

👋 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/1298673150178885742

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

wild grove
#

Hello, yes either are safe to share with your users. I am not sure if we have best practices around this per se. One thing that I am thinking is that you can share the Invoice's hosted URL instead of that receipt URL. That URL should stay stable and will give the user the same info

bitter perch
#

anthony_charge-receipt

#

@tawdry surge whenever you call the Retrieve Charge API we will "refresh" the receipt_url to have a newer version of it and "reset" the expiry date so instead of caching the value in your database you can use that API to always get the most recent version when you want to render it to your end customer

tawdry surge
#

This helps a lot thank you.
A final question: if we were to get the "invoice hosted url" for storage, will that be an asynchronous task for us to simply hit the charge API (https://api.stripe.com/v1/charges/[py_*,ch_*]) until it's returned?
Or there a way to get the "stable" url immediately?

bitter perch
#

there's no stable URL, it will change each time. Even the "invoice URL" expires. So really don't think too much about the difference in URL and just cache get the new URL when you need it