Balances & reconciliation
Read balances, and reconcile every settled pay-in, payout, deposit, refund, and conversion against your books.
Read what you hold, then pull the settled ledgers to reconcile against your own records. Each read is
least-privilege scoped: balances and deposits need balances:read, checkouts checkouts:read,
invoices invoices:read, refunds payments:read, conversions convert:read, and the reconciliation
endpoints ledger:read.
Balances
Per-currency available and locked amounts, as { items }:
const { items } = await ap.balances.list();
// [{ currency: "USDT", available: "842.500000", locked: "0.000000" }]result = ap.balances.list()
items = result["items"]
# [{ currency: "USDT", available: "842.500000", locked: "0.000000" }]page, err := ap.Balances.List(ctx)
if err != nil {
log.Fatal(err)
}
// page.Items: []absolutepay.Balance{{Currency: "USDT", Available: "842.500000", Locked: "0.000000"}}
fmt.Println(page.Items)curl https://api.absolutepay.io/v1/balances \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET /v1/balances "")available is what you can pay out now; locked is reserved against in-flight operations and clears
when they settle. All amounts are decimal strings — parse them with a decimal type, never floats.
Reconcile money-in
There's no single "everything" ledger. Reconcile from the resource that produced each movement — each
is a settled, authoritative list. For pay-ins, /v1/reconciliation/payments is the accounting-grade
feed across all kinds (checkouts and invoices); use the per-resource lists when you want just one
product. Checkouts and invoices are separate resources — /v1/invoices returns
invoices only, /v1/checkouts returns checkouts only.
| Source of truth | Method | Endpoint |
|---|---|---|
| Settled pay-ins — all kinds, keyed for accounting (use this to reconcile) | ap.reconciliation.payments({ from, to }) | GET /v1/reconciliation/payments |
| Settled hosted checkouts | ap.checkouts.list({ status: "PAID" }) | GET /v1/checkouts?status=PAID |
| Settled invoices | ap.invoices.list({ status: "PAID" }) | GET /v1/invoices?status=PAID |
| On-chain deposits credited to your balance | ap.deposits.list() | GET /v1/deposits |
| Settled refunds you issued | ap.refunds.list() | GET /v1/refunds |
| Settled conversions | ap.conversions.list() | GET /v1/conversions |
Every list returns { items, nextCursor } and pages the same way (limit + before → nextCursor,
see Pagination). The reconciliation, refunds, and conversions lists additionally
carry a total. The history endpoints accept a time range (from/to, epoch milliseconds,
inclusive); refunds/conversions also take a currency filter.
const range = { from: 1717200000000, to: 1719792000000, limit: 100 };
const payments = await ap.reconciliation.payments(range); // all pay-ins (checkouts + invoices)
const checkouts = await ap.checkouts.list({ status: "PAID", limit: 100 }); // checkouts only
const invoices = await ap.invoices.list({ status: "PAID", limit: 100 }); // invoices only
const deposits = await ap.deposits.list({ ...range });
const refunds = await ap.refunds.list(range);
const converts = await ap.conversions.list(range);range_ = {"from_": 1717200000000, "to": 1719792000000, "limit": 100}
payments = ap.reconciliation.payments(**range_) # all pay-ins (checkouts + invoices)
checkouts = ap.checkouts.list(status="PAID", limit=100) # checkouts only
invoices = ap.invoices.list(status="PAID", limit=100) # invoices only
deposits = ap.deposits.list(from_=range_["from_"], to=range_["to"]) # deposits: no limit param
refunds = ap.refunds.list(**range_)
converts = ap.conversions.list(**range_)rq := absolutepay.ReconciliationQuery{From: 1717200000000, To: 1719792000000, Limit: 100}
payments, err := ap.Reconciliation.Payments(ctx, rq) // all pay-ins → page.Items, page.Total, page.NextCursor
checkouts, err := ap.Checkouts.List(ctx, absolutepay.ListQuery{Status: "PAID", Limit: 100}) // checkouts only
invoices, err := ap.Invoices.List(ctx, absolutepay.ListQuery{Status: "PAID", Limit: 100}) // invoices only
deposits, err := ap.Deposits.List(ctx, absolutepay.DepositHistoryQuery{From: rq.From, To: rq.To})
refunds, err := ap.Refunds.List(ctx, absolutepay.LedgerQuery{From: rq.From, To: rq.To, Limit: 100})
converts, err := ap.Conversions.List(ctx, absolutepay.LedgerQuery{From: rq.From, To: rq.To, Limit: 100})
_ = err
fmt.Println(payments, checkouts, invoices, deposits, refunds, converts)R="from=1717200000000&to=1719792000000&limit=100"
# All pay-ins (checkouts + invoices), keyed for accounting — use this to reconcile
curl "https://api.absolutepay.io/v1/reconciliation/payments?$R" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/reconciliation/payments?$R" "")
# Or list a single product — each is kind-scoped
curl "https://api.absolutepay.io/v1/checkouts?status=PAID&limit=100" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/checkouts?status=PAID&limit=100" "")
curl "https://api.absolutepay.io/v1/invoices?status=PAID&limit=100" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/invoices?status=PAID&limit=100" "")
curl "https://api.absolutepay.io/v1/deposits?$R" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/deposits?$R" "")
curl "https://api.absolutepay.io/v1/refunds?$R" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/refunds?$R" "")
curl "https://api.absolutepay.io/v1/conversions?$R" \
-H "Authorization: Bearer $APP_TOKEN" $(sign GET "/v1/conversions?$R" "")- Settled pay-ins (
/v1/reconciliation/payments) key onmerchantTradeNo+paidAt. - Payouts reconcile from
/v1/reconciliation/withdrawals(keyed onmerchantBatchNo+suborderId+txId) — see Payouts.
Reconcile against your own records
Match merchantTradeNo (pay-ins) and merchantBatchNo (payouts) — the ids you set or received at
creation — against your ledger. Run it on a schedule (e.g. hourly/daily) using the time range, and
treat the settled lists as authoritative over webhook timing.
Next
- Webhooks — the real-time complement to scheduled reconciliation.
- Accept payments and Payouts — where
merchantTradeNoandmerchantBatchNoare set. - Pagination — every list pages by
limit+before→nextCursor. - API reference — full query params and response fields for each endpoint.