API reference
Payment destinations
Where vendors are paid: versioned bank accounts and addresses, kept encrypted, verified by a person before money goes there.
- GET
/v1/payment_destinationsList payment destinations - POST
/v1/payment_destinationsAdd where a vendor is paid - GET
/v1/payment_destinations/{destination_id}Get a payment destination - POST
/v1/payment_destinations/{destination_id}/blockBlock a payment destination - POST
/v1/payment_destinations/{destination_id}/verifyVerify a payment destination
Guides: Record payments and apply them
List payment destinations
GET/v1/payment_destinations
client.paymentDestinations.list()
Where vendors are paid, the newest first, superseded versions included.
Parameters
| Name | Type | Description |
|---|---|---|
party_idQuery | string or null | An id that starts with |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
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 "https://api.ledgerit.ai/v1/payment_destinations" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Add where a vendor is paid
POST/v1/payment_destinations· Idempotent
client.paymentDestinations.create()
Add where a vendor is paid: a new version, unverified, that supersedes the one before. Nothing can be sent there until a person who may approve money verifies it.
Request body
Response
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 -X POST "https://api.ledgerit.ai/v1/payment_destinations" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"details":{},"party_id":"…","rail":"…"}'Get a payment destination
GET/v1/payment_destinations/{destination_id}
client.paymentDestinations.get()
One destination, as much of it as may be shown.
Parameters
| Name | Type | Description |
|---|---|---|
destination_idPath · Required | string | An id that starts with |
Response
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 "https://api.ledgerit.ai/v1/payment_destinations/{destination_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Block a payment destination
POST/v1/payment_destinations/{destination_id}/block· Idempotent
client.paymentDestinations.block()
Never send anything here again. Needs money.approve.
Parameters
| Name | Type | Description |
|---|---|---|
destination_idPath · Required | string | An id that starts with |
Response
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 -X POST "https://api.ledgerit.ai/v1/payment_destinations/{destination_id}/block" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"Verify a payment destination
POST/v1/payment_destinations/{destination_id}/verify· Idempotent
client.paymentDestinations.verify()
Say the details were confirmed with the vendor, and how. Needs
money.approve.
Parameters
| Name | Type | Description |
|---|---|---|
destination_idPath · Required | string | An id that starts with |
Request body
Response
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 -X POST "https://api.ledgerit.ai/v1/payment_destinations/{destination_id}/verify" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"note":"…"}'Objects
The objects these operations take and return.
DestinationPage
| Name | Type | Description |
|---|---|---|
dataRequired | array of DestinationOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
DestinationCreate
| Name | Type | Description |
|---|---|---|
detailsRequired | map of string | For |
party_idRequired | string | The vendor paid there: a counterparty of these books. |
railRequired | string |
|
DestinationOut
| Name | Type | Description |
|---|---|---|
created_atRequired | string (date-time) | |
idRequired | string | An id that starts with |
maskedRequired | string | What may be shown of the details: the last four digits, or the city. |
party_idRequired | string | An id that starts with |
railRequired | string | |
statusRequired | string |
|
verification_noteRequired | string or null | |
verified_atRequired | string (date-time) or null | |
versionRequired | integer | Each change of details is a new version; the one before is superseded. |
DestinationVerify
| Name | Type | Description |
|---|---|---|
noteRequired | string | How the details were confirmed with the vendor. |