Custody

# Who holds the funds in an AI agent payment system? Custody, escrow and insolvency

Updated 26 Nov 2026. Sources read 26 Nov 2026.

Whoever a user needs in order to withdraw. If getting money out needs the operator to cooperate, the operator holds the funds, whether the product calls it custody, escrow or non-custodial. Most public descriptions do not say which.

What this lets you do: Write the failure case into your evaluation before you integrate.

## Five ways agent payments are set up today

| Set-up | Where the money sits | If the operator stops |
| --- | --- | --- |
| Prepaid credits with each seller | With the seller, as a balance it owes you | You are a creditor of that seller. Getting money back is the seller's decision or a legal process |
| One pooled balance with an operator | With the operator, in its own account or wallet | You wait for the operator, or for whoever takes it over |
| Payment channels | In a contract on a public blockchain, one deposit per channel | Either side can close the channel alone with the last signed balance, after a waiting period. Someone has to be watching the chain |
| One stablecoin transfer on a public blockchain per payment | In the payer's own wallet until each payment | Nothing is held in between. Each payment is final once the chain confirms it |
| Batches settled with a zero-knowledge validity proof | In a contract on a public blockchain | It depends on the design. In StarkEx, live since 2020, a user can send a withdrawal request to Ethereum directly. If the operator does not serve it in time, the contract freezes and users withdraw without the operator |

## Does "non-custodial" mean a user can always get money out?

No. The word usually describes a wallet where the user holds the key. It says nothing about money already committed to a channel, a pooled balance or a batch that has not settled.

## What happens to prepaid credits if the seller fails?

They become money the seller owes you, and you wait with its other creditors. Credits are often non-refundable even while the seller is healthy. OpenAI's prepaid API credits expire after a year.

## What is an escape hatch, or forced withdrawal?

A request the user sends to the chain itself. If the operator does not serve it in time, the contract freezes and users withdraw directly. When dYdX v3, an exchange built on StarkWare's StarkEx, wound down in October 2024, its users could still withdraw this way.

## Questions to ask any vendor

- If your company stopped operating tomorrow, which steps would my users take to get their money, and does any step need you?
- Where is that written: in the contract code, or in your terms of service?
- Has anyone done it on the live system?

## Sources

- [StarkEx documentation: forced operations overview](https://docs.starkware.co/starkex/spot/shared/forced-operations_overview.html), read 15 Nov 2026
- [OpenAI: Setting up and managing prepaid API billing](https://help.openai.com/en/articles/8264644-setting-up-and-managing-prepaid-api-billing), read 25 Nov 2026
- [L2BEAT: dYdX v3, shut down on 28 Oct 2024 and processing withdrawals through the escape hatch](https://l2beat.com/scaling/projects/dydx), read 26 Nov 2026

## Next

- Verification: [How do you verify batched micropayment totals without trusting the operator?](https://agentic.starkware.co/can-you-check-the-total)
- Disputes: [Who pays when an AI agent gets it wrong? Disputes and chargebacks](https://agentic.starkware.co/who-pays-when-an-agent-gets-it-wrong)

---

Page: https://agentic.starkware.co/who-holds-the-money
Updated: 26 Nov 2026
Published by StarkWare
