How a paid call works
PowaAgent pays for an API call in a few steps, using the open x402 payment standard. Your agent never handles a wallet or a key. PowaAgent signs the payment from your wallet, and only after the call passes your source policy.
The steps
- Your agent calls the API. A paid API answers with
402 Payment Requiredand its payment terms: the price, the network, the asset (USDC) and the address to pay. - PowaAgent picks a payment option it can use: USDC on Base. An API may offer several options, and PowaAgent only pays with USDC on Base.
- PowaAgent checks your source policy: your deny list, your allow list, which seller tiers you allow, and your spend caps. If any check fails, nothing is signed and nothing is spent.
- PowaAgent signs the payment from your wallet, using the signing access you granted when you created it. The signature authorizes one transfer of the exact amount to the exact address, and it expires within two minutes.
- The call is sent again with the signed payment attached. The API's payment processor submits the transfer on the Base network and returns the data.
- Your agent gets the data and a receipt, including the on-chain transaction hash.
- Your agent to PowaAgentAsk for data
- PowaAgent to Paid APICall the API
- Paid API to PowaAgent402 Payment Required, with payment terms
- PowaAgentPick USDC on Base and check your source policy
If your policy refuses
- PowaAgent to Your agentRefused. Nothing signed, nothing spent
If your policy allows
- PowaAgentSign one payment from your wallet, valid for about 2 minutes
- PowaAgent to Paid APICall again with the signed payment
- Paid API to PowaAgentData, with the payment settled on Base
- PowaAgent to Your agentData and a receipt with the transaction hash
The connector and the Skill do all of this for you. From your agent's point of view, it asks one question and gets one answer.
What you pay
You pay the price the seller publishes. PowaAgent adds nothing to it.
Who holds what
- Your wallet key is held by Coinbase in a secure enclave. PowaAgent asks Coinbase to sign on your behalf and never sees the key. You can export your recovery key at any time.
- Your funds stay in your wallet until a signed payment is used. PowaAgent never moves money into an account of its own on your behalf.
- The decision to pay is made by your source policy, every time.
What a payment can and can't do
- It pays one seller, one amount, once. Each signature carries a unique random number, so it can't be used twice.
- It expires: a signature not used within about two minutes can no longer be used.
- It pays in USDC only, on Base mainnet. In the sandbox it uses test USDC on Base Sepolia.
Related
- Delegated Signing grant
- Source policy
- x402 + EIP-3009: the protocol details