GET
/
payments
curl --request GET \
  --url https://api.togai.com/payments \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "payment.1223dfs.234ds",
      "description": "Payment for services",
      "notes": "Invoice payment",
      "accountId": "acc123",
      "currency": "USD",
      "externalPaymentReferences": {
        "sourceName": "XYZ Company",
        "sourceType": "CARD",
        "transactionNumber": "TXN123",
        "description": "Card payment"
      },
      "lineItemRecords": [
        {
          "togaiId": "inv.234.12efwe",
          "amount": 1000,
          "type": "INVOICE",
          "order": 1
        },
        {
          "togaiId": "inv.235.12efwe",
          "amount": 600,
          "type": "INVOICE",
          "order": 2
        },
        {
          "togaiId": "cred.236.12efwe",
          "amount": 100,
          "type": "CREDIT",
          "order": 3
        }
      ],
      "totalAmount": 1700,
      "version": 1,
      "createdBy": "user123",
      "createdAt": "2023-01-01T12:00:00"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

nextToken
string

Pagination token used as a marker to get records from next page.

Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="

pageSize
integer

Maximum page size expected by client to return the record list.

NOTE: Max page size cannot be more than 50. Also 50 is the default page size if no value is provided.

Example:

10

Response

200
application/json
Response for GET payments requests

List payments response

data
object[]
required

Payment object

nextToken
string
Maximum length: 500
Example:

"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEyMywgInNvcnRPcmRlciI6ICJhc2MifQ=="