Cloak API

Refunds

If Cloak cannot complete a payout after repeated attempts, it automatically refunds the sender.

What the sender gets back

refund of the worked example

They deposited10,091.01amountIn
− pool withdrawal fee< 0.01unavoidable
Returned to sender10,091.01
Veilo keeps0.00
You keep0.00

A refund charges nothing. Neither our spread nor your share is taken on an unsuccessful order. The sender receives the deposit minus the pool withdrawal fee.

A swap refund returns the destination asset

On a private swap, if the conversion succeeded and only the payout failed, the sender is refunded in the destination asset, not the one they deposited. Veilo does not swap back. A cross-asset order that fails before its swap still holds the source note and refunds exactly like a send. Disclose this to your users before you enable swaps.

The deposit transaction cost is not returned

The sender's wallet already paid roughly 0.002 SOL to submit the deposit. That network and account cost cannot be refunded, so do not promise a full return.

What to do in your integration

  • Treat REFUNDED as a terminal failure of the transfer, not a success.
  • Do not count the order toward your revenue: partnerFee is not paid. See Revenue share.
  • The payoutTxSignature on a refunded order is the refund transaction, not a delivery. Do not surface it as proof of payment.
  • The sender may retry with a fresh quote. Nothing about the failed order blocks that.

Watch the status it passes through

While a refund is processing, status remains EXCHANGING. Only REFUNDED confirms the funds are back. See Order lifecycle.