Skip to content

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

HeaderRequiredDescription
Content-TypeYesapplication/json
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Path Parameters

ParameterTypeRequiredDescription
idintegerYesCustomer invoice ID

Response Fields (200 OK)

FieldTypeDescription
idintegerInvoice ID
incrementIdstringHuman-readable invoice number (e.g. INV-001)
statestringInvoice state
totalQtyintegerTotal quantity of items in the invoice
emailSentbooleanWhether the invoice email was sent
subTotalfloatSub total
baseSubTotalfloatBase sub total
grandTotalfloatGrand total
baseGrandTotalfloatBase grand total
shippingAmountfloatShipping amount
baseShippingAmountfloatBase shipping amount
taxAmountfloatTax amount
baseTaxAmountfloatBase tax amount
discountAmountfloatDiscount amount
baseDiscountAmountfloatBase discount amount
shippingTaxAmountfloatShipping tax amount
baseShippingTaxAmountfloatBase shipping tax amount
subTotalInclTaxfloatSub total including tax
baseSubTotalInclTaxfloatBase sub total including tax
shippingAmountInclTaxfloatShipping amount including tax
baseShippingAmountInclTaxfloatBase shipping amount including tax
baseCurrencyCodestringBase currency code (e.g. USD)
channelCurrencyCodestringChannel currency code
orderCurrencyCodestringOrder currency code
transactionIdstringPayment transaction ID
remindersintegerNumber of reminders sent
nextReminderAtstringNext reminder scheduled date
orderstringAssociated order IRI (e.g. /api/shop/customer-orders/1)
itemsarrayInvoice line item IRIs
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

Error Responses

Not Found (404):

json
{
  "message": "Customer invoice with ID \"999\" not found."
}

Unauthenticated (401):

json
{
  "message": "Customer is not logged in."
}

Accessing Another Customer's Invoice (404):

Requesting an invoice that belongs to a different customer's order returns the same 404 response, preventing enumeration attacks:

json
{
  "message": "Customer invoice with ID \"5\" not found."
}

Use Cases

  • Display detailed invoice page in customer account
  • Show full financial breakdown of an invoice
  • Track payment state and transaction ID
  • View tax, shipping, and discount details
  • Check if invoice email was sent

Released under the MIT License.