# Withdraw Unspent Prepaid Balance (memory.withzero.xyz)

> Withdraw Unspent Prepaid Balance (memory.withzero.xyz) is a free API for AI agents from memory.withzero.xyz, Free, status unknown (last checked 2026-09-15).

Withdraws a specified amount of unspent USDC prepaid balance from the memory.withzero.xyz agent memory service and refunds it on-chain.

## Facts

- Endpoint: DELETE https://memory.withzero.xyz/api/v1/deposits
- Price: Free
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 3
- Provider: memory.withzero.xyz
- Website: https://memory.withzero.xyz
- Canonical page: https://www.zero.xyz/c/memory-withzero-xyz-withdraw-unspent-prepaid-balance-memory-withzero-3fd1f9a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X8tO2esM1LJcmJRIbUrK-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability memory-withzero-xyz-withdraw-unspent-prepaid-balance-memory-withzero-3fd1f9a7 -d '<json body>'
```

Example prompt: Withdraw 1,000,000 micros (1 USDC) of my unspent prepaid balance from my memory.withzero.xyz account and send it back to me on-chain.

## When to prefer this

Use this endpoint when an AI agent or user wants to reclaim unspent USDC that was previously deposited into the memory.withzero.xyz prepaid memory balance, either partially or fully, and wants the funds returned on-chain. Prefer this over simply stopping usage when the user explicitly wants funds back rather than letting the balance sit.

## Known failure modes

- amount_micros exceeds available balance — insufficient funds error
- amount_micros is zero or negative — rejected by pattern validation (must be positive integer)
- amount_micros is not a valid string-encoded positive integer — schema validation failure
- No active deposit exists to withdraw from — empty balance error
- On-chain transaction failure — refund_tx_hash may be null and retry may be needed
- Authentication/authorization failure — caller is not the account owner

## How this service works

Withdraw unspent prepaid balance.

## Output

Returns the account owner identifier, the amount withdrawn in USDC micros, the remaining prepaid balance in USDC micros after the withdrawal, and the on-chain USDC refund transaction hash (or null if not yet settled).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "amount_micros"
 ],
 "properties": {
  "amount_micros": {
   "type": "string",
   "pattern": "^[1-9]\\d*$",
   "description": "Amount of unspent balance to withdraw, in USDC micros. Positive integer."
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "owner",
  "withdrawn_micros",
  "balance_micros",
  "refund_tx_hash"
 ],
 "properties": {
  "owner": {
   "type": "string"
  },
  "balance_micros": {
   "type": "string",
   "description": "Prepaid balance after the withdrawal."
  },
  "refund_tx_hash": {
   "anyOf": [
    {
     "type": "string"
    },
    {
     "type": "null"
    }
   ],
   "description": "On-chain USDC refund transaction hash."
  },
  "withdrawn_micros": {
   "type": "string"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/memory-withzero-xyz-withdraw-unspent-prepaid-balance-memory-withzero-3fd1f9a7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from memory.withzero.xyz](https://www.zero.xyz/host/memory.withzero.xyz/llms.txt)
