Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe API - Receipts Listing

Tags:

I'm using the Stripe API and I'd like to present my customer's a list of their invoice history along with the relevant receipts.

I can't find anywhere in the Stripe API (https://stripe.com/docs/api?lang=php) that allows me fetch a list of a customer's receipts. Is there something I'm missing?

like image 517
Chris Bowal Avatar asked Jun 20 '14 20:06

Chris Bowal


People also ask

Can you get a receipt from Stripe?

Stripe can automatically send email receipts after a successful payment, or when you refund one. This is done by providing an email address when making the API request, using the email address of a Customer object, or updating a PaymentIntent with a customer's email address after checkout.

Can Stripe terminal print receipts?

You can use Stripe's prebuilt email receipts, or use receipt data from the Stripe API and your Terminal integration to generate on-brand custom receipts.

How do I view invoices on Stripe?

On the Invoices page, click through the tabs at the top to view invoices according to their status. To filter your invoices in more detail, click Filter. Stripe gives you the option to filter your invoices by frequency, status, creation date, due date, and more.


1 Answers

Each invoice includes a charge property which contains the id of its last charge. This will either be the current/final payment attempt (for invoices not successfully paid) or the successful payment (for paid invoices).

This allows you to easily use the charge and invoice data to present a receipt to the user, but a "receipt" is itself more of an application-side notion; its needs and presentation vary with the application.

Once you've got the data, you can present a receipt however you like.

Ideally, I recommend caching these records locally. It's almost painless to do if you're receiving webhooks. You can then model (and search!) a local receipt record as best fits your needs, your customer then gets the benefit of very fast billing display, and we all get the benefit of less load on Stripe's API endpoints.

like image 50
colinm Avatar answered Sep 30 '22 06:09

colinm