#alinadialog - receipt
1 messages · Page 1 of 1 (latest)
You can get the receipt url from the charge object and share that: https://stripe.com/docs/api/charges/object#charge_object-receipt_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The receipt URL expires after 30 days.
I need a permanent solution where I do not have to keep pulling the URL.
Thanks for the thought though! Is there a way to convert the receipt URL into a pdf?
That's true, but if the receipt is accessed beyond 30 days, we resend the receipt to the customer via email. There's not a way to directly download the pdf via the api though
So the problem with that is, our customers often are not the ones requesting the PDF, it's their assistants or accounting departments.
So if it gets sent to the customer, it's not getting sent to the right place and causes run-around. Instead, it would be best if we were able to access a pdf of receipts (or a non-expiring URL) ourselves.
Just to be clear: basically no way to get receipts that are permanent at all via API?
No there's not a way to get a non-expiring link
You would have to store them yourself to get around that
How could we store them ourselves? Is that a possibility?
Yeah you can actually download a pdf if you append /pdf to the end of the email receipt: https://stackoverflow.com/a/73119953/17627350
In Stripe Payment System, for download Invoice.pdf we can retrieve Invoice object by its id via Stripe API and then examine field Invoice.invoice_pdf
See https://stripe.com/docs/api/invoices/object#