Managing your wallet: revoke & refunds
Revoking (unlinking) a wallet
You can unlink a wallet from an application in the Business Portal at any time (Application → Linked wallets → remove). After unlinking:
- x402 requests signed by that wallet are rejected with
401 Wallet not linked: the wallet can no longer pay for new API calls. - A wallet can be linked to only one application at a time. Once unlinked, it is free to link to another application.
- Wallet addresses are mapped per application. Deleting an application unlinks the wallet(s) mapped to it. Map the wallet to another application to avoid discontinuing x402 service. Your prepaid on-chain balance is unaffected (it is bound to the wallet address, not the application).
- Any USDC you already prepaid into your payment channel stays safe on-chain in the escrow contract. It is bound to your wallet address, not to the application, and is never custodied by 1inch.
Unlinking stops spending but does not instantly return your prepaid balance. Recover it via one of the refund paths below.
Refunds: recovering your prepaid balance
Your residual channel balance (what you deposited minus what you have already spent on API calls) is always recoverable to your wallet. There are three ways:
| Path | When to use it | What you do |
|---|---|---|
| Automatic refund | Default: you took no other action. | Nothing. The gateway automatically refunds a channel that stays idle for 1 week back to your payer wallet, and pays the gas for you. |
| Cooperative refund (via SDK) | You want your funds back immediately and the wallet is still linked. | Request a refund through the SDK before unlinking. The server claims any outstanding vouchers and returns the unused balance in a single step. |
| On-chain self-withdraw | Guaranteed fallback: works even after unlinking and never depends on 1inch. | From your wallet, call initiateWithdraw on the escrow contract, wait the withdraw delay (~15 min), then call finalizeWithdraw to receive your USDC. Requires ETH on Base for gas. |
Idle refund timing: a channel is considered idle once it stops making paid calls, and the automatic refund is triggered after 1 week of inactivity. Use the cooperative SDK refund if you need your balance back sooner.
Recommended
- If you plan to keep using the wallet, link it to another application first: your channel and prepaid balance keep working, with no interruption.
- If you are done with the wallet, request a cooperative refund before unlinking (simplest), or simply leave it; the automatic refund returns idle balances after 1 week without any action.
- The on-chain self-withdraw (
initiateWithdraw→ wait →finalizeWithdraw) is the fallback that never depends on 1inch. The withdraw delay is advertised in the402challenge (extra.withdrawDelay, default 900 seconds).