Payment

The payment resource.

Basehttps://rest.carbon.ms/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.

GEThttps://rest.carbon.ms/payment
curl --request GET \
  --url 'https://rest.carbon.ms/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}`.

GEThttps://rest.carbon.ms/payment
curl --request GET \
  --url 'https://rest.carbon.ms/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
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
POSThttps://rest.carbon.ms/payment
curl --request POST \
  --url https://rest.carbon.ms/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
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
PATCHhttps://rest.carbon.ms/payment
curl --request PATCH \
  --url 'https://rest.carbon.ms/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}`.

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