Zernio
APIFor you
Zernio
APIFor you
API Reference

Treasury

List payeesGETList top-upsGETList transfersGETCreate a payee onboarding linkPOSTCreate a top-upPOSTCreate a transferPOSTGet balanceGETGet a payout batchGETGet a top-up receiptGETGet a transferGETCancel an unpaid payout batchPOST
Dashboard
OverviewPlatformsAPI ReferenceResources
Treasury

Get balance

Returns the balance you can transfer, card top-ups still on hold, top-ups still waiting for payment, and your latest top-ups. Card top-ups become available after 7 days. A transfer debits its amount plus the fee added on top; the payee receives the full amount. A card dispute or refund on a top-up is debited from the available balance and can make it negative; transfers are refused until it is positive again. A profile-scoped key answers 403, since the balance belongs to the whole team.


GET
/v1/balance

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Response Body

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.treasury.getBalance();console.log(data);
{  "availableCents": 0,  "pendingCents": 0,  "pendingReleases": [    {      "topupId": "string",      "amountCents": 0,      "availableAt": "2019-08-24T14:15:22Z"    }  ],  "pendingTopupCents": 0,  "currency": "usd",  "recentTopups": [    {      "id": "string",      "method": "card",      "purpose": "balance",      "payoutBatch": {        "id": "string",        "campaignId": "string"      },      "feeCoveredByZernio": true,      "amountCents": 0,      "stripeFeeCents": 0,      "netCents": 0,      "status": "pending",      "createdAt": "2019-08-24T14:15:22Z",      "succeededAt": "2019-08-24T14:15:22Z"    }  ]}
Was this page helpful?

Create a transfer

Moves money from your balance to a payee. The payee receives the full `amountCents`; Zernio's fee (4%, 50 cent minimum) is added on top, so your balance is debited `totalCents` = `amountCents` + `feeCents`. Returns 402 when the balance does not cover the amount plus the fee, or when it is negative after a dispute or refund of a card top-up ("Your balance is negative after a dispute or refund of a card top-up. Add funds to cover it before sending transfers."), and 409 when the payee has not finished onboarding or the Idempotency-Key is still processing. Needs an owner, admin or billing admin, signed in or through a full-access key they created: a profile-scoped key answers 403. A same-key retry never makes the transfer twice within Stripe's 24-hour idempotency window and answers 409 while another request is still waiting on Stripe for it; a transfer Stripe has not confirmed after 24 hours answers 409 until the daily reconciliation marks it paid (Stripe made it) or failed (it did not).

Get a payout batch

One payout batch with its status and each creator's item. Poll it after the card payment to see when every creator is paid.