Treasury

Charges the billing owner's saved card (the default one, or paymentMethodId) for amountCents while the payer is present.

  • status: succeeded: the card was charged. The top-up is credited to availableCents within seconds, net of Stripe's processing fee. 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.

Errors

  • 402 payment_required: no saved card.
  • 402 card_declined: the bank's reason.
  • 400: method: bank_transfer (bank transfers are not available yet).

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

post/v1/balance/top-ups

Request

  • Base URL
    https://zernio.com/api
  • URL
    https://zernio.com/api/v1/balance/top-ups
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

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.

Request body

amountCentsinteger required

Amount in cents, minimum $10

method'card' | 'bank_transfer' required

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

paymentMethodIdstring

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

Response

The card was charged, or the bank asked for 3D Secure

topupIdstring required
status'succeeded' | 'processing' | 'requires_action' required
clientSecretstring nullable required

PaymentIntent client secret for Stripe.js handleNextAction; set only when status is requires_action

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property became optional for the status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      the response property became required for the status

    • info

      removed the PAYMENT_REQUIRED enum value from the response property for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added