Retrieve Bills
Fetch bills for linked accounts, filter by date and status, check sync progress, and trigger on-demand synchronization.
Fetch Bills for a Linked Account
Once link exchange returns an account_link_id, call GET /v1/bills with the account_link_id to retrieve bills. Because this is a billable read, send an Idempotency-Key. Reuse it only when retrying the same page.
GET /v1/bills
const response = await fetch(
'https://sandbox.api.billerapi.com/v1/bills?account_link_id=' + linkId,
{
headers: {
'Authorization': `Bearer ${process.env.BILLERAPI_API_KEY}`,
'Idempotency-Key': crypto.randomUUID(),
},
}
);
const data = await response.json();
console.log(data.bills);
// Returns: array of bills with merchant_name, status, canonical total_amount
// ({ value, currency }) and due_date_iso (YYYY-MM-DD).
// This REST endpoint also still returns the deprecated amount/currency/due_date
// trio; read the canonical fields (the 2.0 Node SDK no longer exposes the trio).
// Pagination: has_more, next_cursorNote
account_link_id. Link-scoped access tokens are accepted only by supported single-resource operations such as bill detail and statements. See the Getting Started guide for the full Link flow.Filter by Date and Status
Narrow results using query parameters. All filters are optional and can be combined.
Query Parameters
| Field | Type | Description |
|---|---|---|
| account_link_id* | string | ID of the linked account |
| start_date | string | ISO 8601 date — only return bills on or after this date |
| end_date | string | ISO 8601 date — only return bills on or before this date |
| status | string | Filter by bill status: PENDING, PAID, OVERDUE, CANCELLED |
| source | string | Filter by data source: BILLER_DIRECT, SCRAPING, OCR, EMAIL |
| limit | number | Max bills per page (default 25, max 100) |
| cursor | string | Pagination cursor from a previous response |
Filtered request
const params = new URLSearchParams({
account_link_id: linkId,
start_date: '2026-01-01',
end_date: '2026-03-31',
status: 'PENDING',
limit: '50',
});
const response = await fetch(
`https://sandbox.api.billerapi.com/v1/bills?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.BILLERAPI_API_KEY}`,
},
}
);
const { bills, has_more, next_cursor } = await response.json();Tip
has_more is true, pass next_cursor as the cursor parameter in the next request.Check Sync Status
The Bill Sync API this step used to walk through — GET /v1/bills/sync and POST /v1/bills/sync/trigger — is not callable on either host today, so this guide no longer shows it. The sandbox host matches /v1/bills/sync against its single-bill route and answers 404, and on production both operations reach a backend gap rather than a working handler. The two per-link routes below do the same jobs and are served.
To see what changed on a link since your last read, call GET /v1/account-links/{link_id}/bills/sync. It answers with three buckets — added, modified and removed — plus next_cursor and has_more, so you can reconcile without diffing your whole store. The webhooks guide walks the full reconciliation loop with runnable samples.
Trigger a Sync
To force an out-of-cadence retrieval for one link, call POST /v1/account-links/{link_id}/refresh. It answers 202 with a refresh_id and a status_url to poll, and it is idempotent under load: a duplicate refresh while one is already in flight is a safe no-op. It is rate limited to roughly twelve refreshes per link per minute, and answers 429 RATE_LIMITED over that.
Note
Webhook Events
Instead of polling, register a webhook to receive real-time notifications when bills change. The key bill-related events are:
bill.created— a new bill was retrievedbill.updated— an existing bill changed (status, amount, due date)connection.ready— a linked account finished its first sync; the payload carriesfirst_sync_completed_atlink.disconnected— the link stopped syncing and needs attention. This is the event to watch for expired credentials and for links dropped by the biller;data.changesays whichsync.started— a sync cycle began for a linked accountsync.completed— a sync cycle finished. This fires on every terminal cycle, including one that found nothing new, so it doubles as a heartbeat;bills_created,bills_updatedandbills_deletedtell you whether anything actually changed, andstatusissuccess,partialorfailedsync.failed— a sync cycle could not run.error_codecarries the reason, such asCREDENTIALS_UNAVAILABLEorBILLER_UNHEALTHY
Note