#Invoice Management in MedusaJS: Customer Downloads & Admin Controls

4 messages · Page 1 of 1 (latest)

crude temple
#

How can I implement invoice management in MedusaJS? I want customers to be able to download their invoices from the storefront, and I also want admins to manage invoices from the admin panel.

frail falcon
#

there is invoice plugin but , i think your needs need a better solution

#

to manage invoice and send email

clever jasper
# crude temple How can I implement invoice management in MedusaJS? I want customers to be able ...

For customers (storefront)
After an order is placed, you can generate a PDF invoice using something like pdfkit or puppeteer (whichever you vibe with).
Save the file somewhere (local, S3, etc.) and store the URL in the order's metadata.
Then expose a custom route like /store/orders/:id/invoice that checks if the logged-in user owns the order and sends them the PDF.
On the frontend, just show a little “Download Invoice” button on the order details page

For admins (admin panel)
You can auto-generate the invoice when an order is completed, or let admins do it manually from the admin UI.
Add a custom API route like /admin/orders/:id/invoice to handle generation or retrieval.
If you’re using the new admin (Next.js), you can add a custom card or section to the order view showing invoice info + download link.