Overview
What the Treasury API does, how a call is built, and the statuses of a transaction, a match and a payment proposal.
On this page
The Treasury API reads the lines of a bank statement, proposes the invoice, bill or ledger entry each line belongs to, reconciles an account month by month and prepares payments for approval. The base path is /banking/v1.
Client credentials, your base address and a test company are issued with your account. Accounts are opened by our team: ask for one through the contact form and we set it up with you.
Request an accountHow a call is built
Get a token
Request a bearer token with the scope
banking.accessand send it in theAuthorizationheader. See Authentication.Choose the company
Every bank account belongs to a company of your account. List the companies with
listCompanies, take theidof yours and pass it ascompanyIdtolistAccounts. Keep theidof the bank account you work on.Import a statement
Send the lines of a statement file exported from your bank with
importStatement. Treasury stores them and proposes a match for every new line.Match
Read the matches with
listMatches. Each one carries itsmethodand a one-sentencereason. Accept it, split it, book it to an entry, match a transfer or leave it.Pay
Prepare a payment proposal for a bill, send it for approval and export the approved payments as one table.
Listen to events
Register one HTTPS endpoint with
createSubscriptionand Treasury tells you when a statement is imported, a match is suggested or accepted, and a payment is approved, exported, confirmed or rejected.
Every change carries an operationId you choose and, on an existing record, the expectedRevision you read. Both are explained in Idempotency and concurrency.
Status of a transaction
The status of a transaction says what the bank did with the line.
| Status | Meaning |
|---|---|
pending | The bank has not booked the line yet. It has no match until a later statement books it. |
booked | The bank booked the line. It has a match. |
returned | The line returns a payment, or it is the payment line that the bank returned. |
State of a match
The state of a match says where the decision about a booked transaction stands. An accepted match is final.
| Status | Meaning |
|---|---|
open | Treasury has no suggestion for the transaction. |
suggested | Treasury proposes a match and waits for a decision. |
split | A person divides the transaction between several invoices, bills or entries. |
accepted | The allocations add up to the transaction. The match is final. |
left | A person put the transaction aside. It can be reopened. |
Status of a payment proposal
The status of a payment proposal follows it from preparation to the statement that shows it booked or returned.
| Status | Meaning |
|---|---|
draft | Prepared and not yet sent. A declined proposal returns here. |
awaiting_approval | Sent to an approver whose authority covers the amount. |
approved | Approved by someone other than the person who prepared it. |
exported | Part of a payment file. Your bank executes it. |
confirmed | A later statement shows the payment booked. |
rejected_by_bank | The bank rejected or returned the payment and gave its own reason. The bill is open again. |
Where next
- Quickstart: accept a suggested match and read the account again.
- Import a statement and Reconcile a month.
- Prepare and approve payments and Handle a returned payment.
- Accounts and the rest of the API reference, and Error codes.