---
updatedAt: 2026-08-28T04:13:57.000Z
agentTools:
  projectIndex: https://docs.gettrx.com/llms.txt
---

# List Invoice Line Items

Lists line items for an invoice with keyset pagination. Data is loaded from the relational database via customer-payment-management-service. Results are sorted by `created` descending (newest first). Decoded pagination token: `cdt:<epoch>|id:<line_item_id>` (ili_...). 

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "onboarding",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api-dev.gettrx.com/onboard/v1/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "secretKey"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/invoices/{invoiceId}/invoice-line-items": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List Invoice Line Items",
        "description": "Lists line items for an invoice with keyset pagination. Data is loaded from the relational database via customer-payment-management-service. Results are sorted by `created` descending (newest first). Decoded pagination token: `cdt:<epoch>|id:<line_item_id>` (ili_...). ",
        "operationId": "getInvoiceLineItems",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "description": "Invoice ID the line items belong to.",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 10,
              "type": "string"
            }
          },
          {
            "name": "secretKey",
            "in": "header",
            "description": "Secret key associated to the partner's account",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of records per page (1–100, default 10)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "next_results_token",
            "in": "query",
            "description": "Base64-encoded keyset cursor. Decoded format: cdt:<created_timestamp>|id:<line_item_id> ",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "description": "Sort order. Only `created:desc` is supported (default when omitted). ",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "onBehalfOf",
            "in": "header",
            "description": "(Optional) AccountId of the merchant. Only required when secretKey belongs to an \"entity\" account. ",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "requestId",
            "in": "header",
            "description": "Unique Key String refNumber",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK - Invoice line items retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "code",
                    "message",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "object",
                          "properties": {
                            "nextResultsToken": {
                              "type": "string",
                              "description": "Base64 encoded pagination token. Null when there are no more records to retrieve.",
                              "example": "Y2R0OjE3MzIwNDY0NTd8aWQ6aW52XzY3NDI0MGVlYmU5NGRkYzk1ZTA0NGZkMg=="
                            },
                            "recordsRetrieved": {
                              "type": "integer",
                              "description": "Number of records retrieved in this response",
                              "format": "int32",
                              "example": 2
                            },
                            "limit": {
                              "type": "integer",
                              "description": "Maximum number of records requested",
                              "format": "int32",
                              "example": 10
                            }
                          }
                        },
                        "other": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total line items on the invoice",
                              "format": "int32"
                            },
                            "active": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "inactive": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "ili_690522278211cd51c8239b58"
                              },
                              "invoiceId": {
                                "type": "string",
                                "description": "Parent invoice id (present on list invoice line items responses)"
                              },
                              "accountId": {
                                "type": "string",
                                "description": "Merchant account id (present on list invoice line items responses)"
                              },
                              "productName": {
                                "type": "string"
                              },
                              "productDescription": {
                                "type": "string",
                                "description": "Product description for the line item (customizable for display)."
                              },
                              "price": {
                                "type": "object",
                                "description": "Price id string when not expanded; full price object when expanded (same idea as subscription `site`)."
                              },
                              "accountDiscounts": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountDiscounts path is expanded."
                              },
                              "accountFees": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountFees path is expanded."
                              },
                              "unitAmountOverride": {
                                "type": "string"
                              },
                              "unitPriceOverride": {
                                "type": "string",
                                "description": "Override used for proration and similar scenarios."
                              },
                              "unitPrice": {
                                "type": "number",
                                "description": "Effective unit price from unitPriceOverride, unitAmountOverride, or price.amount as applicable."
                              },
                              "quantity": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "amountSubtotal": {
                                "type": "number"
                              },
                              "amountTax": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "dualPricingAmounts": {
                                "type": "object",
                                "properties": {
                                  "expectedCardDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHAmountLineTotal": {
                                    "type": "number"
                                  }
                                }
                              },
                              "object": {
                                "type": "string",
                                "example": "item"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "code",
                    "message",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "object",
                          "properties": {
                            "nextResultsToken": {
                              "type": "string",
                              "description": "Base64 encoded pagination token. Null when there are no more records to retrieve.",
                              "example": "Y2R0OjE3MzIwNDY0NTd8aWQ6aW52XzY3NDI0MGVlYmU5NGRkYzk1ZTA0NGZkMg=="
                            },
                            "recordsRetrieved": {
                              "type": "integer",
                              "description": "Number of records retrieved in this response",
                              "format": "int32",
                              "example": 2
                            },
                            "limit": {
                              "type": "integer",
                              "description": "Maximum number of records requested",
                              "format": "int32",
                              "example": 10
                            }
                          }
                        },
                        "other": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total line items on the invoice",
                              "format": "int32"
                            },
                            "active": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "inactive": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "ili_690522278211cd51c8239b58"
                              },
                              "invoiceId": {
                                "type": "string",
                                "description": "Parent invoice id (present on list invoice line items responses)"
                              },
                              "accountId": {
                                "type": "string",
                                "description": "Merchant account id (present on list invoice line items responses)"
                              },
                              "productName": {
                                "type": "string"
                              },
                              "productDescription": {
                                "type": "string",
                                "description": "Product description for the line item (customizable for display)."
                              },
                              "price": {
                                "type": "object",
                                "description": "Price id string when not expanded; full price object when expanded (same idea as subscription `site`)."
                              },
                              "accountDiscounts": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountDiscounts path is expanded."
                              },
                              "accountFees": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountFees path is expanded."
                              },
                              "unitAmountOverride": {
                                "type": "string"
                              },
                              "unitPriceOverride": {
                                "type": "string",
                                "description": "Override used for proration and similar scenarios."
                              },
                              "unitPrice": {
                                "type": "number",
                                "description": "Effective unit price from unitPriceOverride, unitAmountOverride, or price.amount as applicable."
                              },
                              "quantity": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "amountSubtotal": {
                                "type": "number"
                              },
                              "amountTax": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "dualPricingAmounts": {
                                "type": "object",
                                "properties": {
                                  "expectedCardDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHAmountLineTotal": {
                                    "type": "number"
                                  }
                                }
                              },
                              "object": {
                                "type": "string",
                                "example": "item"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "code",
                    "message",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "object",
                          "properties": {
                            "nextResultsToken": {
                              "type": "string",
                              "description": "Base64 encoded pagination token. Null when there are no more records to retrieve.",
                              "example": "Y2R0OjE3MzIwNDY0NTd8aWQ6aW52XzY3NDI0MGVlYmU5NGRkYzk1ZTA0NGZkMg=="
                            },
                            "recordsRetrieved": {
                              "type": "integer",
                              "description": "Number of records retrieved in this response",
                              "format": "int32",
                              "example": 2
                            },
                            "limit": {
                              "type": "integer",
                              "description": "Maximum number of records requested",
                              "format": "int32",
                              "example": 10
                            }
                          }
                        },
                        "other": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total line items on the invoice",
                              "format": "int32"
                            },
                            "active": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "inactive": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "ili_690522278211cd51c8239b58"
                              },
                              "invoiceId": {
                                "type": "string",
                                "description": "Parent invoice id (present on list invoice line items responses)"
                              },
                              "accountId": {
                                "type": "string",
                                "description": "Merchant account id (present on list invoice line items responses)"
                              },
                              "productName": {
                                "type": "string"
                              },
                              "productDescription": {
                                "type": "string",
                                "description": "Product description for the line item (customizable for display)."
                              },
                              "price": {
                                "type": "object",
                                "description": "Price id string when not expanded; full price object when expanded (same idea as subscription `site`)."
                              },
                              "accountDiscounts": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountDiscounts path is expanded."
                              },
                              "accountFees": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountFees path is expanded."
                              },
                              "unitAmountOverride": {
                                "type": "string"
                              },
                              "unitPriceOverride": {
                                "type": "string",
                                "description": "Override used for proration and similar scenarios."
                              },
                              "unitPrice": {
                                "type": "number",
                                "description": "Effective unit price from unitPriceOverride, unitAmountOverride, or price.amount as applicable."
                              },
                              "quantity": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "amountSubtotal": {
                                "type": "number"
                              },
                              "amountTax": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "dualPricingAmounts": {
                                "type": "object",
                                "properties": {
                                  "expectedCardDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHAmountLineTotal": {
                                    "type": "number"
                                  }
                                }
                              },
                              "object": {
                                "type": "string",
                                "example": "item"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "code",
                    "message",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "object",
                          "properties": {
                            "nextResultsToken": {
                              "type": "string",
                              "description": "Base64 encoded pagination token. Null when there are no more records to retrieve.",
                              "example": "Y2R0OjE3MzIwNDY0NTd8aWQ6aW52XzY3NDI0MGVlYmU5NGRkYzk1ZTA0NGZkMg=="
                            },
                            "recordsRetrieved": {
                              "type": "integer",
                              "description": "Number of records retrieved in this response",
                              "format": "int32",
                              "example": 2
                            },
                            "limit": {
                              "type": "integer",
                              "description": "Maximum number of records requested",
                              "format": "int32",
                              "example": 10
                            }
                          }
                        },
                        "other": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total line items on the invoice",
                              "format": "int32"
                            },
                            "active": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "inactive": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "ili_690522278211cd51c8239b58"
                              },
                              "invoiceId": {
                                "type": "string",
                                "description": "Parent invoice id (present on list invoice line items responses)"
                              },
                              "accountId": {
                                "type": "string",
                                "description": "Merchant account id (present on list invoice line items responses)"
                              },
                              "productName": {
                                "type": "string"
                              },
                              "productDescription": {
                                "type": "string",
                                "description": "Product description for the line item (customizable for display)."
                              },
                              "price": {
                                "type": "object",
                                "description": "Price id string when not expanded; full price object when expanded (same idea as subscription `site`)."
                              },
                              "accountDiscounts": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountDiscounts path is expanded."
                              },
                              "accountFees": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountFees path is expanded."
                              },
                              "unitAmountOverride": {
                                "type": "string"
                              },
                              "unitPriceOverride": {
                                "type": "string",
                                "description": "Override used for proration and similar scenarios."
                              },
                              "unitPrice": {
                                "type": "number",
                                "description": "Effective unit price from unitPriceOverride, unitAmountOverride, or price.amount as applicable."
                              },
                              "quantity": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "amountSubtotal": {
                                "type": "number"
                              },
                              "amountTax": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "dualPricingAmounts": {
                                "type": "object",
                                "properties": {
                                  "expectedCardDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHAmountLineTotal": {
                                    "type": "number"
                                  }
                                }
                              },
                              "object": {
                                "type": "string",
                                "example": "item"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "code",
                    "message",
                    "success"
                  ],
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "code": {
                      "type": "integer",
                      "format": "int32"
                    },
                    "message": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "object",
                          "properties": {
                            "nextResultsToken": {
                              "type": "string",
                              "description": "Base64 encoded pagination token. Null when there are no more records to retrieve.",
                              "example": "Y2R0OjE3MzIwNDY0NTd8aWQ6aW52XzY3NDI0MGVlYmU5NGRkYzk1ZTA0NGZkMg=="
                            },
                            "recordsRetrieved": {
                              "type": "integer",
                              "description": "Number of records retrieved in this response",
                              "format": "int32",
                              "example": 2
                            },
                            "limit": {
                              "type": "integer",
                              "description": "Maximum number of records requested",
                              "format": "int32",
                              "example": 10
                            }
                          }
                        },
                        "other": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "description": "Total line items on the invoice",
                              "format": "int32"
                            },
                            "active": {
                              "type": "integer",
                              "format": "int32"
                            },
                            "inactive": {
                              "type": "integer",
                              "format": "int32"
                            }
                          }
                        },
                        "rows": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "ili_690522278211cd51c8239b58"
                              },
                              "invoiceId": {
                                "type": "string",
                                "description": "Parent invoice id (present on list invoice line items responses)"
                              },
                              "accountId": {
                                "type": "string",
                                "description": "Merchant account id (present on list invoice line items responses)"
                              },
                              "productName": {
                                "type": "string"
                              },
                              "productDescription": {
                                "type": "string",
                                "description": "Product description for the line item (customizable for display)."
                              },
                              "price": {
                                "type": "object",
                                "description": "Price id string when not expanded; full price object when expanded (same idea as subscription `site`)."
                              },
                              "accountDiscounts": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountDiscounts path is expanded."
                              },
                              "accountFees": {
                                "type": "object",
                                "description": "Id string, array of id strings, or full objects when accountFees path is expanded."
                              },
                              "unitAmountOverride": {
                                "type": "string"
                              },
                              "unitPriceOverride": {
                                "type": "string",
                                "description": "Override used for proration and similar scenarios."
                              },
                              "unitPrice": {
                                "type": "number",
                                "description": "Effective unit price from unitPriceOverride, unitAmountOverride, or price.amount as applicable."
                              },
                              "quantity": {
                                "type": "integer",
                                "format": "int32"
                              },
                              "amountSubtotal": {
                                "type": "number"
                              },
                              "amountTax": {
                                "type": "number"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "dualPricingAmounts": {
                                "type": "object",
                                "properties": {
                                  "expectedCardDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedCardAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHDiscountAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHFeeAmountLineTotal": {
                                    "type": "number"
                                  },
                                  "expectedACHAmountLineTotal": {
                                    "type": "number"
                                  }
                                }
                              },
                              "object": {
                                "type": "string",
                                "example": "item"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "tags": [
    {
      "name": "Invoices",
      "description": "the Invoices API"
    }
  ]
}
```