Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you generate a paid invoice PDF for a Stripe checkout session?

My web app currently emails customers their Stripe receipt after purchase via stripe checkout. However for some customers this isn't enough – they want a paid invoice for the purchase with the information of my business and their business on it. How do you generate a PDF with this info?

I've investigated Stripe Invoices, but that seems to be a system for collecting payment. I already have payment from the checkout sessions. I just want to send the customer a souped-up receipt, really.

I've also considered using some js PDF library to generate the PDF myself, but it felt like there must be an easy way to do what I want with the Stripe API.

like image 448
Daniel Avatar asked Sep 13 '25 02:09

Daniel


1 Answers

Since ~November 2022 there is a feature just for this: https://stripe.com/docs/payments/checkout/post-payment-invoices

It lets you generate an invoice just by setting a parameter in the request for creating Checkout Session.

like image 115
Jen Avatar answered Sep 16 '25 08:09

Jen