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.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Payout batch ID.
Response Body
application/json
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.getPayoutBatch({ path: { batchId: 'batch_abc123', },});console.log(data);{ "batch": { "id": "string", "campaignId": "string", "status": "awaiting_payment", "method": "card", "amountCents": 0, "feeCents": 0, "totalCents": 0, "items": [ { "id": "string", "participantId": "string", "creator": { "displayName": "string" }, "amountCents": 0, "feeCents": 0, "totalCents": 0, "status": "pending", "failureReason": "string", "transferId": "string" } ], "paidAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z" }}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 a top-up receipt
The receipt for a paid top-up or creator payout payment (`purpose: payout_batch`). `format: pdf` is the Stripe invoice PDF; `format: page` is Stripe's receipt page, for payments that have no invoice. The link is short-lived, so fetch it when you need it. A profile-scoped key answers 403.