OverviewProductsPlatformsAPI ReferenceResources
Treasury

Cancel a top-up

POSThttps://zernio.com/api/v1/balance/top-ups/{topupId}/cancel

Ends the payment of a pending top-up (3D Secure left unfinished), so it stops counting toward pendingTopupCents, and returns it as expired.

  • When Stripe reports it already paid, the top-up is credited and comes back succeeded.
  • A top-up that is no longer pending comes back unchanged.
  • A creator payout payment (purpose: payout_batch) answers 409; cancel it from its campaign.

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

Authentication

AuthorizationBearer tokenRequired

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

Path parameters

topupIdstringRequired

Responses

Success· the request worked

Errors· the request failed

POST/v1/balance/top-ups/{topupId}/cancel
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.treasury.cancelTopup({  path: {    topupId: 'topup_abc123',  },});console.log(data);
{  "id": "string",  "method": "card",  "purpose": "balance",  "payoutBatch": {    "id": "string",    "campaignId": "string"  },  "feeCoveredByZernio": true,  "amountCents": 0,  "feeCents": 0,  "taxCents": 0,  "chargedCents": 0,  "stripeFeeCents": 0,  "netCents": 0,  "status": "pending",  "createdAt": "2019-08-24T14:15:22Z",  "succeededAt": "2019-08-24T14:15:22Z",  "hasInvoice": true}
OpenAPI specification
Was this page helpful?