Skip to content

Payment

The payment resource.

Base/payment
GET/payment

List payments

Retrieve a paginated list of payments. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/payment
curl --request GET \
  --url '<your-host>/payment?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "paymentId": "xyz789",
    "paymentType": "string",
    "status": "string",
    "paymentDate": "2026-01-01",
    "currencyCode": "string",
    "exchangeRate": 0,
    "totalAmount": 0
  }
]
GET/payment

Retrieve a payment

Fetch a single payment by filtering on `id`.

Query parameters

idstring

Match on the payment's `id`, e.g. `eq.{id}`.

GET/payment
curl --request GET \
  --url '<your-host>/payment?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "paymentId": "xyz789",
  "paymentType": "string",
  "status": "string",
  "paymentDate": "2026-01-01",
  "currencyCode": "string",
  "exchangeRate": 0,
  "totalAmount": 0
}
POST/payment

Create a payment

Create a new payment.

Body parameters

paymentIdstringrequired
paymentTypepaymentTyperequired
statuspaymentStatusrequired
customerIdstring
supplierIdstring
paymentDatedaterequired
postingDatedate
currencyCodestringrequired

References currencyCode.code

exchangeRatenumberrequired
totalAmountnumberrequired

Gross cash amount in payment currency; divide by foreign-per-base exchangeRate for company base.

bankAccountstringrequired

References account.id

referencestring
memostring
journalIdstring

References journal.id

postedAttimestamp
postedBystring

References user.id

voidedAttimestamp
voidedBystring

References user.id

companyIdstringrequired

References company.id

customFieldsobject
POST/payment
curl --request POST \
  --url <your-host>/payment \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"paymentId":"xyz789","paymentType":"string","status":"string","paymentDate":"2026-01-01","currencyCode":"string","exchangeRate":0,"totalAmount":0,"bankAccount":"string","companyId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "paymentId": "xyz789",
  "paymentType": "string",
  "status": "string",
  "paymentDate": "2026-01-01",
  "currencyCode": "string",
  "exchangeRate": 0,
  "totalAmount": 0
}
PATCH/payment

Update a payment

Update an existing payment, matched on `id`.

Body parameters

paymentIdstringrequired
paymentTypepaymentTyperequired
statuspaymentStatusrequired
customerIdstring
supplierIdstring
paymentDatedaterequired
postingDatedate
currencyCodestringrequired

References currencyCode.code

exchangeRatenumberrequired
totalAmountnumberrequired

Gross cash amount in payment currency; divide by foreign-per-base exchangeRate for company base.

bankAccountstringrequired

References account.id

referencestring
memostring
journalIdstring

References journal.id

postedAttimestamp
postedBystring

References user.id

voidedAttimestamp
voidedBystring

References user.id

companyIdstringrequired

References company.id

customFieldsobject
PATCH/payment
curl --request PATCH \
  --url '<your-host>/payment?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"paymentId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "paymentId": "xyz789",
  "paymentType": "string",
  "status": "string",
  "paymentDate": "2026-01-01",
  "currencyCode": "string",
  "exchangeRate": 0,
  "totalAmount": 0
}
DELETE/payment

Delete a payment

Delete a payment, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the payment to delete, e.g. `eq.{id}`.

DELETE/payment
curl --request DELETE \
  --url '<your-host>/payment?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content