#ali-nawaz_docs

1 messages ยท Page 1 of 1 (latest)

modern glenBOT
#

๐Ÿ‘‹ 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/1377229847465562194

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

harsh lily
#

Sorry, at the end I mistakenly write invoice, it's a receipt

limpid beacon
#

๐Ÿ‘‹ happy to help

#

give me a few minutes and I will be shortly with you

harsh lily
#

Sure

limpid beacon
#

redirecting your customer to the receipt url sends them to a hosted Stripe page where they can download the receipt themselves

harsh lily
#

Yes the receipt_url redirects to stripe page but that is a view only page I am not able to see any download options

#

let me share the screen shot with you

#

here is the page that is served from the receipt_url

limpid beacon
#

yes you're right it's the invoice that can be downloaded not the receipt. sorry

harsh lily
#

No worries, So is there any endpoint or an alternative way I can assist my customers to download the receipt?

limpid beacon
#

what you can do is actually to get the html content from the URL and transform it into a PDF in your backend and then generate a downloadable link for your customers

harsh lily
#

I also tied that by using puppeteer and it worked but when i deploy my node app to vercel, it throws the following error

Failed to generate PDF: Error: Could not find Chrome (ver. 136.0.7103.94). This can occur if either
 1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or
 2. your cache path is incorrectly configured (which is: /home/sbx_user1051/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
    at ChromeLauncher.resolveExecutablePath (file:///var/task/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.js:272:27)
    at ChromeLauncher.computeLaunchArguments (file:///var/task/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:85:24)
    at async ChromeLauncher.launch (file:///var/task/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserLauncher.js:48:28)
    at async downloadOrderReceipt (file:///var/task/controllers/orderController.js:220:25)




#

Can you please share if there is any other way I can generate the pdf using my BE

limpid beacon
#

this is not related to Stripe per say

harsh lily
#

Yes I agree, so it means that there is no way stripe provide access to download the receipt?

limpid beacon
#

no not really