ZyloPaydocs

Settlement and your balance

Where your money is after a payment, how to read the balance, and how to withdraw it.

Each payment is settled on Monad by the ZyloPay settlement contract. The contract pulls the USDC from the customer's wallet, keeps your share in your merchant balance, and pays the fees. The transaction is final in about 800 ms.

Your balance

Your balance is held for you in the settlement contract, per network. Read it live from the chain:

const balance = await zp.balance.retrieve();
// { object: 'balance', livemode: true, available: [{ amount: 125000000, currency: 'usdc' }], network: 'mainnet', as_of: '…' }

The balance goes up with each payment (amount) and down with each refund and withdrawal.

Withdrawals

Withdraw from the dashboard (Withdraw). The settlement contract pays only your settlement wallet, the wallet registered for your merchant, and only when that wallet sends the withdrawal transaction itself: the dashboard asks your wallet to sign and send it, so the wallet needs a little MON for gas. ZyloPay cannot withdraw on your behalf. Changing the settlement wallet needs a signature from the new wallet, made in the dashboard.

The API does not expose withdrawals or payouts today. Keep enough balance to cover refunds: a refund is paid from the balance.

Proof on-chain

Every payment carries its tx_hash, block_number and log_index. You can look it up on the explorer (monadscan.com for mainnet). The settlement contract:

NetworkSettlement contract
Mainnet (143)0xc2F316Dd2e3250c844830F8674D86E184c36D6Fa
Testnet (10143)0x81616A7e1b92F9FDc6B4Ae1bD8905084fA6bcc67

Your order_id is written on-chain with each settlement, which lets you match a payment to your order from the chain alone. See Reconciling payments.

Timing

  • A payment appears in GET /v1/payments once its settlement is indexed, about a second after the tap.
  • settled_at is the block time. created is when ZyloPay indexed it.
  • The balance is read from the chain at request time (as_of), so it can be ahead of the indexed payments for a moment.

On this page