#skrypnyk81
1 messages · Page 1 of 1 (latest)
The API can give you a link to the receipt, not sure if the link is to the PDF specifically but you can download whatever is at the URL or print it as a PDF 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.
This is per charge, is there a possibility for a subscription?
For subscriptions we give a link right to the PDF https://stripe.com/docs/api/invoices/object#invoice_object-invoice_pdf
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This link for invoice, can I have a link of receipt for subscription. Because I need to show to client invoice paid, but in link of invoice there invoice due.
When client received the email after payment hi has two link for invoice and receipt. Can I retrieve a link of receipt via API?
Subscriptions create Invoices, so the invoice PDF is what you are looking for
In Stripe lingo, an Invoice is the thing that Subscriptions create to charge users, receipts are the thing that we send over email for one-off charges
This is footer of invoice: Importo dovuto = Amount due.
But I want to download the receipt with footer: Importo pagato = Amount paid
But in email for customer hi has both invoice and reciept link
In that case, you can check the Invoice's payment_intent property and that intent's latest_charge property to get the receipt URL that I originally linked to. 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.
Instead of latest_charge your payment intent may have a charges array depending on your API version
You can do all of this with one Retrieve Invoice call and using expansion to expand payment_intent.latest_charge or payment_intent.charges https://stripe.com/docs/expand
These actions lead me to URLs with a graphic interface, as if it were an e-mail sent to the customer. I think you do not have a direct link to receipt. I must to scrap the link of receipt from HTML. Thanks for help