OverviewProductsPlatformsAPI ReferenceResources
Treasury

Add funds

POSThttps://zernio.com/api/v1/balance/top-ups

Charges the billing owner's saved card (the default one, or paymentMethodId) amountCents plus tax, while the payer is present, and credits your balance amountCents. There is no card fee.

Tax is added on top of the amount (taxCents, totalCents): VAT at 21% in Spain, at the customer's country rate for EU consumers; an EU business whose VAT id VIES confirms is reverse charged (no VAT, reverseCharge: true); outside the EU there is none.

The invoice also states the VAT in euros at the ECB rate of its date. Usage paid from the balance carries no further VAT. Get the figures before paying with POST /v1/balance/top-ups/preview.

Each top-up has an invoice, with VAT where it applies (GET /v1/balance/top-ups/{topupId}/invoice), and a card receipt (GET /v1/balance/top-ups/{topupId}/receipt).

  • status: succeeded: the card was charged. amountCents is credited to availableCents within seconds. Transfers to payees can use it from 7 days after the charge.
  • status: requires_action: the bank asked for 3D Secure. Complete it with Stripe.js handleNextAction({ clientSecret }), then call POST /v1/balance/top-ups/{topupId}/confirm. One left unconfirmed is cancelled after 30 minutes.

Authentication

AuthorizationBearer tokenRequired

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

Body

application/json

What every request needs

amountCentsintegerRequired

Amount to credit to your balance, in cents: $5 to $100,000. Tax is charged on top; no card fee.

methodstringRequiredOne of card | bank_transfer

Only card is available. bank_transfer returns 400 "Bank transfers are not available yet."

Optional parameters1 field
paymentMethodIdstring

A saved card of the billing owner's (pm_...). Defaults to the default payment method.

Headers

Optional
Idempotency-Keystring, max 255

Optional client-generated unique key (e.g. a UUID) that makes retries safe.

  • Same key + same body: replays the original response.
  • Same key + different body: 422.
  • Key still processing: 409.

A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.

On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Errors

  • 402 payment_required: no saved card.
  • 402 card_declined: the bank's reason.
  • 400: method: bank_transfer (bank transfers are not available yet).
  • 400 invalid_billing_address: the billing address gives no tax location. Add it in Billing, then retry.
  • 400 billing_address_required: the total with tax is over EUR 400 (at the day's ECB rate) and the billing details hold no name and street address. An invoice over that amount must name the buyer and their address. Add them in Billing > Billing details, then retry. Nothing is charged.
  • 429 payment_attempts_limited: five card payments were declined in 24 hours. Nothing reaches the bank until Retry-After runs out.

Needs an owner, admin or billing admin, signed in or through a full-access key they created.

POST/v1/balance/top-ups
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.treasury.createTopup({  body: {    amountCents: 500,    method: 'card',  },});console.log(data);
{  "topupId": "string",  "amountCents": 0,  "taxCents": 0,  "totalCents": 0,  "taxLabel": "string",  "reverseCharge": true,  "feeCents": 0,  "chargedCents": 0,  "feeIsExact": true,  "status": "succeeded",  "clientSecret": "string"}
OpenAPI specification
Was this page helpful?