API reference

Payments

Money received from customers and paid to vendors, applied across invoices and bills, with what is left unapplied.

Guides: Record payments and apply them

List payments

GET/v1/payments

client.payments.list()

The payments of these books, the newest first, each with what it is applied to and what is left unapplied.

Parameters

NameTypeDescription
directionQuerystring or null

Only in or out payments.

kindQuerystring or null

Only customer or vendor payments.

party_idQuerystring or null

An id that starts with party_.

limitQueryinteger

Page size, 1–200.

Default 50
cursorQuerystring or null

The next_cursor of the previous page.

Response

200PaymentPage

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/payments" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Record a payment received or made

POST/v1/payments· Idempotent

client.payments.record()

Record a payment that happened: money in from a customer, or out to a vendor, through a bank, cash or card account. It is posted on its day and applied to the invoices or bills listed (or the oldest first); whatever is not applied stays open as unapplied cash.

Request body

PaymentRecord

Response

201PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"account_id":"…","amount":0,"direction":"…","effective_on":"2026-09-30","kind":"…","party_id":"…"}'

Write a payment to send

POST/v1/payments/send· Idempotent

client.payments.createToSend()

Write a payment to a vendor that LedgerIt will send, to one of the vendor's destinations. It is created: nothing is sent and nothing is on the books. It leaves created only once a person who may approve money has approved it as it then is, and its destination is verified.

Request body

PaymentSend

Response

201PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments/send" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"account_id":"…","amount":0,"destination_id":"…","effective_on":"2026-09-30","party_id":"…"}'

Get a payment

GET/v1/payments/{payment_id}

client.payments.get()

One payment, what it is applied to and what is left unapplied.

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Response

200PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl "https://api.ledgerit.ai/v1/payments/{payment_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN"

Change a payment not yet released

PATCH/v1/payments/{payment_id}· Idempotent

client.payments.update()

Change a payment not yet released: its amount, day, account, destination, reference or memo. Any approval of it stops standing, since it approved something else: ask again. Refused with conflict once it is released, and for a recorded payment.

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Request body

PaymentChange

Response

200PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X PATCH "https://api.ledgerit.ai/v1/payments/{payment_id}" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Apply a payment to invoices or bills

POST/v1/payments/{payment_id}/apply· Idempotent

client.payments.apply()

Apply what is left of a payment to invoices or bills of the same party: those listed, for the amounts given, or the oldest first.

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Request body

PaymentApply

Response

200PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments/{payment_id}/apply" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Cancel a payment not yet released

POST/v1/payments/{payment_id}/cancel· Idempotent

client.payments.cancel()

Give up a payment not yet released. It stays listed as cancelled.

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Response

200PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments/{payment_id}/cancel" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Release an approved payment to be sent

POST/v1/payments/{payment_id}/release· Idempotent

client.payments.release()

Release a payment to be sent: out of created, refused with conflict unless an approval of exactly what it now is stands and has not expired, and its destination is verified. A released payment due by today is sent through the provider of the account it is paid from, once; one due later is sent on its day.

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Response

200PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments/{payment_id}/release" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"

Ask for a payment's approval

POST/v1/payments/{payment_id}/request_approval· Idempotent

client.payments.requestApproval()

Ask for approval of the payment as it now is. A person with money.approve decides it at /v1/approvals/{id}/decide; it expires after the hours given (72 by default).

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Request body

ApprovalAsk

Response

200AskedOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments/{payment_id}/request_approval" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Void a recorded payment

POST/v1/payments/{payment_id}/void· Idempotent

client.payments.void()

Take a payment off the books by reversing its entry. Refused with conflict while any of it is applied: undo those allocations first.

Parameters

NameTypeDescription
payment_idPath · Requiredstring

An id that starts with pay_.

Request body

PaymentVoid

Response

200PaymentOut

Errors

400
The request was malformed or a parameter is invalid.
401
No valid credential was sent.
403
The credential or the member's role does not allow this.
404
No such resource in this ledger.
409
A conflicting request, e.g. one with the same Idempotency-Key still running.
422
A well-formed request a business rule refused.
429
Too many requests; retry after the Retry-After header.
500
Something failed on our side; the request_id identifies it.

Example

curl
curl -X POST "https://api.ledgerit.ai/v1/payments/{payment_id}/void" \
  -H "Authorization: Bearer $LEDGERIT_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Objects

The objects these operations take and return.

PaymentPage

NameTypeDescription
dataRequiredarray of PaymentOut
has_moreRequiredboolean
next_cursorRequiredstring or null

PaymentRecord

NameTypeDescription
account_idRequiredstring

The bank or cash account it moved through, or a card for money out.

amountRequirednumber | string
applicationsarray of ApplicationIn

The invoices or bills it pays, and how much of each.

directionRequiredstring

in from a customer, or out to a vendor.

effective_onRequiredstring (date)

The day the money moved.

kindRequiredstring

customer (money in) or vendor (money out).

memostring or null
oldest_firstboolean

Apply it to the party's open invoices or bills, the earliest due first, until it runs out.

Default false
party_idRequiredstring

The customer or vendor: a counterparty of these books.

referencestring or null

The bank's reference, a check number.

PaymentOut

NameTypeDescription
account_idRequiredstring

An id that starts with gla_.

amountRequiredstring
applied_toRequiredarray of AppliedOut
approvedRequiredboolean

For a payment not yet sent: an approval of it as it now is stands.

created_atRequiredstring (date-time)
currencyRequiredstring
destination_idRequiredstring or null

An id that starts with dest_.

directionRequiredstring
effective_onRequiredstring (date)
entry_idRequiredstring or null

An id that starts with je_.

idRequiredstring

An id that starts with pay_.

kindRequiredstring
memoRequiredstring or null
party_idRequiredstring

An id that starts with party_.

referenceRequiredstring or null
statusRequiredstring

A recorded payment is settled once on the books and void once reversed. One LedgerIt sends is created, approved once released, submitted once sent to its provider, failed when the provider says nothing was sent, or cancelled.

submissionRequiredSubmissionOut or null

How it was sent, for a payment LedgerIt sent.

unappliedRequiredstring

What is not yet applied to an invoice or bill; 0 for a void payment.

void_entry_idRequiredstring or null

An id that starts with je_.

voided_atRequiredstring (date-time) or null

PaymentSend

NameTypeDescription
account_idRequiredstring

The bank or cash account it is paid from.

amountRequirednumber | string
destination_idRequiredstring

Where it goes: one of the vendor's payment destinations.

effective_onRequiredstring (date)

The day it is to be paid.

memostring or null
party_idRequiredstring

The vendor: a counterparty of these books.

referencestring or null

PaymentChange

NameTypeDescription
account_idstring or null

An id that starts with gla_.

amountnumber | string or null
destination_idstring or null

An id that starts with dest_.

effective_onstring (date) or null
memostring or null
referencestring or null

PaymentApply

NameTypeDescription
applicationsarray of ApplicationIn
oldest_firstboolean

Apply what is left to the oldest open invoices or bills.

Default false

ApprovalAsk

NameTypeDescription
expires_in_hoursinteger or null

How long the approval stands once given; 72 hours when left out.

AskedOut

NameTypeDescription
approval_idRequiredstring

An id that starts with appr_.

expires_atRequiredstring (date-time) or null
statusRequiredstring

PaymentVoid

NameTypeDescription
reasonstring or null

Why it is voided; written on the reversal.

ApplicationIn

NameTypeDescription
amountRequirednumber | string

How much of the payment goes to it.

document_idRequiredstring

An issued invoice (money in) or approved bill (money out) of the same party.

AppliedOut

NameTypeDescription
amountRequiredstring
documentRequiredstring

invoice or bill.

document_idRequiredstring

An id. Which resource it names is given by the field beside it.

numberRequiredstring

The invoice's number, or the vendor's number for the bill.

SubmissionOut

How a payment LedgerIt sends went to its provider.

NameTypeDescription
answered_atRequiredstring (date-time) or null
checksRequiredinteger

How many times the provider was asked whether it holds the payment.

external_idRequiredstring or null

The provider's id for the payment, once it holds it.

failureRequiredstring or null

Why the provider refused it, in its words.

providerRequiredstring

The provider it was sent through.

statusRequiredstring

sending, then the provider's answer: accepted (it holds the payment), rejected (it refused it), uncertain (no answer yet: it is asked, never sent again) or absent (asked, it holds no such payment).

submitted_atRequiredstring (date-time)