Backend API

Fields
idobjectId

Unique identifier for the invoice.

account_idobjectIdrequired

ID of the customer's account.

accountAccount

Expandable link to the customer's account.

closedboolean

When true, it indicates no further attempts will be made to capture payment for the invoice.

couponCoupon

Expandable link to the coupon applied to the invoice.

coupon_codestring

Coupon code applied to the invoice.

coupon_idobjectId

ID of the coupon applied to the invoice.

creditsCredit memo

Expandable list of account credit transactions. Balance of these transactions is kept in balance.

credit_totalcurrency

Total amount of additional credit applied to the order.

currencystring

Three-letter ISO currency code in uppercase. Defaults to the store's base currency.

currency_ratefloat

Currency percentage used in calculating the fixed amount.

date_createddateauto

Date and time the invoice was created.

date_duedate

The date by which the invoice is to be paid.

date_payment_retrydate

Date the next automatic payment will be attempted.

date_period_enddate

End date of the subscription billing period for the invoice.

date_period_startdate

Start date of the subscription billing period for the invoice.

date_updateddateauto

Date and time the invoice was last updated.

discount_totalcurrencyauto

Total discount amount.

discountsarray of object

List of all discounts applied to the invoice.

grand_totalcurrencyauto

Grand total including items and taxes.

giftcard_totalcurrency

Total gift card value applied to the invoice.

giftcardsarray of object

List of gift cards applied to the invoice.

item_discountcurrencyauto

Sum of all line items before discounts and taxes.

item_tax_includedboolean

Indicates line item prices include taxes.

item_taxcurrencyauto

Total taxes applied to line items.

item_quantityintauto

Total quantity of all line items.

item_quantity_creditableint

Quantity of creditable items on the order.

itemsarray of object

List of invoice line items.

net_daysint

Net number of days for which the invoice is open before being considered past due.

notesstring

Internal admin notes, not visible to the customer. This field holds a single block of text. To record a series of notes against the invoice, each attributed to a user, see Notes.

numberstringauto

Unique incremental invoice number, assigned automatically.

orderOrder

Expandable link to the order the invoice was applied to, if applicable.

order_idobjectId

ID of the order the invoice was applied to, if applicable.

paidbooleanauto

Indicates the invoice was paid in full.

pastdueboolean

Indicates the invoice payment is past due.

payment_duecurrencyauto

Payment amount due on the invoice.

payment_errorstring

A message describing the last payment error, if one occurred.

payment_retry_countint

The number of times automatic payment has been attempted.

payment_retry_resolvestring

The method used to resolve automatic payment when all retry attempts are exhausted. Can be blank (do nothing), canceled, or unpaid.

payment_totalcurrency

Sum of payments applied to the order, not including refunds.

paymentsPayment

Expandable list of payments applied to the invoice.

refundsRefund

Expandable list of refunds applied to the invoice.

shipment_taxcurrency

Shipping tax amount, if applicable.

shipment_tax_includedboolean

Indicates shipping total includes taxes, if applicable.

shipment_tax_included_totalcurrency

Total of taxes applied separately from line items.

shipment_totalcurrency

Total shipping price after discounts.

sourceProduct

Expands into the corresponding order or subscription using source_model and source_id.

source_idobjectId

Used to expand source into corresponding order or subscription. Equal to order_id. If order_id is not set, then equal to subscription_id. If order_id nor subscription_id are set, is null.

source_modelstring

Used to expand source into corresponding order or subscription. If order_id is set, equals orders. If subscription_id is set, equals subscriptions. When neither is set, is null.

statusenumauto

Current status of the invoice. Can be pending, paid, or unpaid.

Possible enum values:

pendingvoidpaidunpaid
sub_totalcurrencyauto

Sum of all line items before discounts, taxes and shipping.

subscriptionSubscription

Expandable link to the subscription the invoice was issued for.

subscription_idobjectId

ID of the subscription the invoice was issued for.

tax_included_totalcurrencyauto

Total of taxes applied separately from line items.

tax_totalcurrencyauto

Total tax amount applied to the order including line items.

taxesarray of object

List of taxes applied to the order.

The invoice model
{
  "id": "60f199509111e7000000002f",
  "account_id": "60f199509111e70000000031",
  "currency": "USD",
  "date_created": "2021-07-16T14:36:00.194Z",
  "date_updated": "2021-07-16T14:36:00.194Z",
  "items": [
    {
      "id": "5ca537326a0ec32a521139dd",
      "product_id": "5c524166f4e8f3446a10331b",
      "variant_id": "5c524166f4e8f3446a10331f",
      "quantity": 2,
      "price": 19.99,
      "price_total": 38.98,
      "orig_price": 19.99,
      "options": [
        {
          "id": "5becb84fac207653a4816ee5",
          "name": "Type",
          "value": "Elven"
        },
        {
          "id": "5becb84fac207653a4816ee6",
          "name": "Enchanted",
          "value": "Fire"
        }
      ],
      "discounts": [
        {
          "id": "coupon-0",
          "amount": 5
        }
      ],
      "discount_each": 2.5,
      "discount_total": 5,
      "taxes": [
        {
          "id": "sales-tax",
          "amount": 2
        }
      ],
      "tax_each": 1,
      "tax_total": 2
    }
  ],
  "number": 117266,
  "paid": false,
  "pastdue": false,
  "status": "pending"
}