From the Stripe dashboard I can view a receipt (click preview link in invoice details). The receipt is then shown inside a popup but there is a permalink in it, so it can be viewed as a separate page. The URL of an emailed receipt looks like this:
https://dashboard.stripe.com/emails/receipts/invrc_xxxxxxxxxxxx
This URL does not require authentication, and so would be perfect for allowing me to show links to receipt details from inside my app's billing page. Except that there seems to be no way to get the magical invrc_xxxxxxxxxxxx id from the API, so I am unable construct the URL.
Or for some strange reason, Stripe engineers went through the trouble of designing an unauthenticated receipt view page, but have decided not to expose it via the API. Why??
This issue has been brought up in Stripe API - Receipts Listing (see comments section at the bottom), but no explanation, solution or justification was provided. Hope this more specific question can help.
UPDATE: As of January 17 2019, this is now possible to do. The Charge object has the receipt_url
property that lets you access this information whether an email receipt was sent or not!
Log in to your Stripe dashboard. Go 'Payments' Locate the payment to receive a receipt. Click the 'Send Receipt' button.
You can also generate a link to the Hosted Invoice Page by clicking the gear icon and selecting Send invoice or link manually. (We don't send an email to your customer when you select this option). After you complete the invoice go to the Details section in your invoice's details page.
Stripe creates receipts when a customer pays an invoice, or makes any subscription payment. Receipts for subscription and invoice payments are itemized to include line items, discounts, and taxes for the in the payment.
That's unfortunately not something currently supported. There isn't any way through the API to get an receipt ID to be used here. That endpoint was built with the intent that it would only be used to permalink to a receipt from the body of a receipt email. That said, we are considering building out this functionality at some point in the future.
EDIT: Looks like my colleagues in Stripe support beat me to the punch here.
UPDATE: as of 2019-01-17, this is now supported via the receipt_url property on Charges (https://stripe.com/docs/api/charges/object#charge_object-receipt_url).
The invoice object has attributes for this:
hosted_invoice_url - string - The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null.
invoice_pdf - string - The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null.
Solved using screenshot API If you are using React try this but you can just use the ajax request to show the receipt in your app
const [recipt, setrecipt] = useState({loading: false,img: '',});
get the url from the strip response receipt_url
const url = receipt_url
const result = await axios.get(`https://screenshotapi.net/api/v1/screenshot url=${url}&token=yourtokenhere`,);
then you can find the png URL from result.data.screenshot
then you can use img tag to display it make sure to replace token with yours
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With