Modules

Treasury

Money accounts (banks, petty cash) with their balance, movements and transfers.

Overview

Requires the Treasury module. Payments received, refunds, vendor payments, work order payments and expenses become movements of the account chosen when they are recorded (or the account linked to the bank, or the default account of the payment method). Accounts are set up in the dashboard.

Endpoints

MethodPathPermissionDescription
GET/v1/treasury-accountsreadAccounts with balance and income/expense of the period (from, to)
GET/v1/treasury-accounts/{id}readRetrieve an account
GET/v1/treasury-movementsreadMovements, most recent first (account_id, from, to, limit)
POST/v1/treasury-movementswriteManual income or expense (as_expense also creates the expense)
POST/v1/treasury-transferswriteTransfer between accounts (amount_in when currencies differ)

Transfer Between Accounts

1curl -X POST "https://api.corebill.io/v1/treasury-transfers" \
2 -H "Authorization: Bearer sk_live_your_api_key" \
3 -H "Content-Type: application/json" \
4 -d '{ "from_account_id": "tac_pen", "to_account_id": "tac_usd", "amount_out": 3436, "amount_in": 1000 }'
  • source of a movement: manual, transfer, invoice_payment, invoice_refund, bill_payment, work_order_payment or expense, with the document it comes from
  • A transfer creates two movements with the same transfer_id; with different currencies the exchange_rate is kept