Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Retrieve an invoice


Retrieve an invoice

GET / v1 / invoices /:id

Retrieves the invoice with the given ID.

Parameters

No parameters.

Returns

Returns an invoice object if a valid invoice ID was provided. Raises an error otherwise.

The invoice object contains a lines hash that contains information about the subscriptions and invoice items that have been applied to the invoice, as well as any prorations that Stripe has automatically calculated. Each line on the invoice has an amount attribute that represents the amount actually contributed to the invoice’s total. For invoice items and prorations, the amount attribute is the same as for the invoice item or proration respectively. For subscriptions, the amount may be different from the plan’s regular price depending on whether the invoice covers a trial period or the invoice period differs from the plan’s usual interval.

The invoice object has both a subtotal and a total. The subtotal represents the total before any discounts, while the total is the final amount to be charged to the customer after all coupons have been applied.

The invoice also has a next_payment_attempt attribute that tells you the next time (as a Unix timestamp) payment for the invoice will be automatically attempted. For invoices with manual payment collection, that have been closed, or that have reached the maximum number of retries (specified in your subscriptions settings), the next_payment_attempt will be null.

Response

List all invoices

GET / v1 / invoices

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

Parameters

  • customer string Only return invoices for the customer specified by this customer ID.
  • customer _ account string Only return invoices for the account representing the customer specified by this account ID.
  • status enum The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more
  • subscription string Only return invoices for the subscription specified by this subscription ID.

More parameters

  • collection _ method enum
  • created object
  • ending _ before string
  • limit integer
  • starting _ after string

Returns

A dictionary with a data property that contains an array invoice attachments,

Response

Delete a draft invoice

DELETE / v1 / invoices /:id

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

Parameters

No parameters.

Returns

A successfully deleted invoice. Otherwise, this call raises an error, such as if the invoice has already been deleted.

Response

{ "id": "in_1MtHbELkdIwHu7ixl4OzzPMv", "object": "invoice", "deleted": true}
Last verified 2026-09-24

Is this helpful?