OverviewProductsPlatformsAPI ReferenceResources
Treasury

Cancel an unpaid payout batch

POSThttps://zernio.com/api/v1/payout-batches/{batchId}/cancel

Ends the payment of a batch that is still awaiting_payment (3D Secure left unfinished) and makes every amount payable again right away.

  • When Stripe reports the charge already made, the batch is paid out instead.
  • A batch that was already paid is returned unchanged.

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

batchIdstringRequired

Payout batch ID.

Responses

Success· the request worked

Errors· the request failed

Update auto top-up settings

Changes the auto top-up rule. Omitted fields keep their value. A declined auto top-up is retried 1 hour, 1 day and 3 days later, with an email each time. After the last retry fails, auto top-up switches off (`disabledReason: payment_failed`) until the card is updated. Adding funds yourself resets the retries. A bank asking for 3D Secure counts as a decline: the charge happens while you are away, so the email asks you to add funds in Billing. A pay-per-use request that finds the balance at $0 runs the auto top-up first (with the rule on, a saved card and no retry pending) and goes through when the charge lands, so a new balance at $0 is charged on first use. When this month's auto top-ups plus the next one would pass `monthlyLimitCents`, the card is not charged and you get one email that month. At $0, pay-per-use then answers 402 `usage_limit_reached`. - 400: a field is out of range, `toCents` is not at least $5 above `belowCents`, or, while auto top-up is on, `monthlyLimitCents` is lower than the back-to amount `toCents` (one top-up from $0 would pass it, so it could never charge). Omitted fields are checked with their stored values. - 409 `balance_billing_required`: the account is not on the prepaid balance, nor moved onto it at a date still ahead. An account moved onto it can read and change its rule before that date; nothing is charged until it. Needs an owner, admin or billing admin, signed in or through a full-access key they created.

Cancel a top-up

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.

POST/v1/payout-batches/{batchId}/cancel
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.treasury.cancelPayoutBatch({  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",        "refundedCents": 0      }    ],    "paidAt": "2019-08-24T14:15:22Z",    "releasesAt": "2019-08-24T14:15:22Z",    "finishedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z"  }}
OpenAPI specification
Was this page helpful?