Get Customer Invoice
Retrieve detailed information for a specific customer invoice by its ID. Customers can only access invoices from their own orders — requesting another customer's invoice returns a 404, preventing enumeration attacks.
Endpoint
GET /api/shop/customer-invoices/{id}Request Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Bearer token (customer login required) |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Customer invoice ID |
Response Fields (200 OK)
One invoice, flat. The field set is identical to a row of Get Customer Invoices — there is no extra detail on this endpoint.
| Field | Type | Description |
|---|---|---|
id | integer | Invoice ID. |
incrementId | string | Invoice number shown to the customer. |
state | string | pending, pending_payment, paid, or overdue. |
emailSent | boolean | Whether the invoice email has gone out. |
totalQty | integer | Units covered by this invoice. |
orderCurrencyCode | string | Currency the order was placed in. |
subTotal / baseSubTotal / subTotalInclTax / baseSubTotalInclTax | float | Line total, before and including tax. |
grandTotal / baseGrandTotal | float | Invoice total. |
shippingAmount / baseShippingAmount / shippingAmountInclTax / baseShippingAmountInclTax | float | Shipping charged. |
taxAmount / baseTaxAmount / shippingTaxAmount / baseShippingTaxAmount | float | Tax charged. |
discountAmount / baseDiscountAmount | float | Discount applied. |
reminders | integer | Payment reminders sent so far. |
downloadUrl | string | Absolute URL of the PDF. It still requires both auth headers, so it is a request URL rather than a shareable link. |
items / addresses | array | References to the invoice lines and the order's addresses. |
createdAt / updatedAt | string | ISO 8601 timestamps. |
The invoiced line items are available from the parent order's items block on Get Customer Order, and on the invoice PDF. Over GraphQL the customerInvoice query returns them as selectable nested objects.
Error Responses
| Status | Body detail | Cause |
|---|---|---|
404 | Customer invoice with ID "999999" not found | No such invoice, or it belongs to another customer's order. The two cases are deliberately indistinguishable. |
403 | Unauthenticated. Please login to perform this action | No customer Bearer token was sent. |
401 | — | The storefront key header was missing or wrong. |
Use Cases
- Invoice detail screen — read one invoice by the
idcarried in the list, and offer the PDF fromdownloadUrl. - Payment-status check — re-read after an offline payment to see
statemove frompending_paymenttopaid.
Best Practices
- Fetch the list instead when showing several invoices — this endpoint returns no more fields than a list row, so per-invoice calls add nothing.
- Read the line items from the parent order — the order detail carries them in full.
- Treat
404as "not yours or not there" — the message quotes the requested ID and is not proof the invoice is missing store-wide.
Related Resources
- Get All Customer Invoices — every invoice raised against the customer's orders
- Download Invoice PDF — the invoice as a PDF stream
- Get Customer Orders — the customer's order history
- Get Customer Profile — read the authenticated customer's account details

