---
title: "List all payments"
method: GET
path: "/payments"
tags: ["Payments"]
---

# List all payments

`GET /payments`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/payments`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/payments/get.ts> (a function with typed inputs; its response is checked against the schema)

List all payments

## Query parameters

- `nextToken` string
- `pageSize` integer

## Response `200`

Response for GET payments requests

- ListPaymentResponse: List payments response
  - `data` Payment[], required
    - `id` string, required
    - `description` string
    - `notes` string
    - `accountId` string, required
    - `externalPaymentReferences` ExternalPaymentReference, required: external payment reference object
      - `sourceName` string, required
      - `sourceType` 'GATEWAY' | 'CASH' | 'CHEQUE' | 'BANK_TRANSFER' | 'CARD', required
      - `transactionNumber` string, required: Check number or Card transaction number
      - `description` string
      - `metadata` object
    - `lineItemRecords` PaymentLineItemRecord[], required
      - `type` 'INVOICE' | 'CREDIT' | 'WALLET_CREDIT', required
      - `togaiId` string
      - `amount` number
      - `order` integer, required
    - `totalAmount` number, required
    - `currency` string, required
    - `version` number, required
    - `createdBy` string, required
    - `createdAt` string, date-time, required
  - `nextToken` string

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response
- `default`: Error response

## Changes

- **2024-04-18** `f22fc08442b7`: 1 info
  - the response property `data/items/externalPaymentReferences` became required for the status `200`
- **2024-01-05** `ea9c4628bfdb`: 1 warning, 1 info
  - added the new `CHEQUE` enum value to the `data/items/externalPaymentReferences/sourceType` response property for the response status `200`
  - removed the `CHECK` enum value from the `data/items/externalPaymentReferences/sourceType` response property for the response status `200`
- **2023-12-21** `dbff52f9d224`: 2 breaking, 2 warning, 2 info
  - the response property `data/items/lineItemRecords/items/amount` became optional for the status `200`
  - the response property `data/items/lineItemRecords/items/togaiId` became optional for the status `200`
  - added the new `CREDIT` enum value to the `data/items/lineItemRecords/items/type` response property for the response status `200`
  - added the new `WALLET_CREDIT` enum value to the `data/items/lineItemRecords/items/type` response property for the response status `200`
  - …2 more
- **2023-12-08** `49b2a2e3f198`: 1 breaking
  - the `data/items/createdAt` response's property type changed from `date-time` to `string`, and format from no format to `date-time` for status `200`
- **2023-12-07** `9f3c4190595b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/payments/get.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
