Pre-release: the public API is not live yet and has no base URL. Routes and fields are in the OpenAPI contract, at /openapi.yaml.

Skip to Content
xaseDocumentation

Balance

What your sales left in the environment: what can be paid out, what is still pending, what a dispute holds and what is on its way out.

The balance is what the paid charges left in the environment, after fees, refunds, disputes and payouts. It is never stored: it is the sum of the ledger at the moment you read it.

Operations

Operation in the contractWhat it does
getBalanceReturns the four balances of the environment. Requires the balance:read scope

The route and the fields are in the OpenAPI contract, under this name. It is the same balance the dashboard shows in Saldo.

The four balances

Every amount is an integer number of cents.

FieldWhat it is
available_centsWhat can leave in a payout now: what was paid, minus the fees, the refunds, the payouts, what a dispute holds and what is still pending
pending_centsThe part of the balance that cannot leave in a payout yet: what the charges paid less than the release period ago left
blocked_centsWhat the bank holds because a payer disputed the payment, until it decides: the amount of the charges in dispute
outgoing_centsWhat already left the balance and the bank has not confirmed yet: the refunds on their way to the payers and the payouts on their way to you

The four are read at the same instant: one is never from before an entry of the ledger and another from after it.

The release period

What a paid charge leaves is yours at once, and it can be paid out only after the release period of your account.

  • Every account starts with a release period of 2 days, counted from the moment each charge was paid. The period is a setting of your account.
  • A paid charge enters pending_cents first. When its period ends, its amount moves to available_cents by itself, charge by charge. No event tells you: read the balance again.
  • available_cents plus pending_cents is what you have. A refund and a dispute take from the two together, so a charge can be refunded before its period ends.
  • Only a charge that is still paid counts. A refunded or disputed charge is not pending, and neither is one with a refund on its way: its amount already left the balance.
  • pending_cents is never more than what the balance has. When a refund or a dispute of an older charge takes part of it, it shrinks, and available_cents stays at zero until what is left is released.

What changes it

What happensavailable_cents plus pending_centsblocked_centsoutgoing_cents
A charge becomes paidGrows by the amount, minus the fee, in pending_cents
The release period of a charge endsStays the same: the amount moves from pending_cents to available_cents
A refund is asked forShrinks by what the refund takesGrows by the amount of the refund
The refund reaches the payerShrinks by the amount of the refund
The bank does not make the refundGrows backShrinks by the amount of the refund
The payer disputes a chargeShrinks by what the dispute takesGrows by the amount of the charge
The bank refuses the disputeGrows backShrinks by the amount of the charge
The bank accepts the disputeShrinks by the amount of the charge
  • What a refund or a dispute takes from the balance depends on the fee rule of your account. See The amount and Disputes.
  • A payout, asked for in the dashboard, moves its amount from available_cents to outgoing_cents until the bank confirms it. A payout never takes from pending_cents.
  • available_cents can be negative. A dispute takes its amount even when you already withdrew it, and the next sales cover it.
  • Read the balance again instead of keeping it. A refund.created or a charge.paid webhook tells you it changed. See Webhooks.

What a key needs

  • balance:read. No other scope includes it: a key that creates and reads charges does not read the balance. See What a key can do.
  • A key created before the balance was in the API does not have it. A scope is never added to a key that exists: create another key in the dashboard.
  • Without the scope the answer is 403 with the insufficient_scope code.

What is not in the API

The statement, with each entry that changed the balance, and the payouts are in the dashboard, under Saldo. A payout asks for your passkey, and an API key cannot ask for one.

The balance of another environment

The balance is always the one of the environment of your key. There is no parameter to read another: a test key reads the test balance, and a live key the live one.

On this page