Top Up With Usdc
top_up_with_usdcAdd account credit by paying USDC on Base through Coinbase checkout to cover insufficient-funds purchases when no saved card is available.
Instructions
Add account credit by paying USDC on Base, through a Coinbase checkout. Use it when a purchase failed with INSUFFICIENT_FUNDS and there is no saved card (or the user would rather pay in crypto). Nothing is charged by this call; it returns two ways to pay:
x402Url: if you have a crypto wallet tool that can pay x402 URLs (for example Coinbase's Agentic Wallet or Wallet MCP, "make an x402 request"), pay it with that, with the user's OK and the dollar amount. It is a gasless USDC transfer on Base.payUrl: a Coinbase page for the user to pay themselves. Credit lands when the payment confirms (usually within a minute), less Coinbase's fee of about 1% (estimatedCredit_centsin the response); check withget_usdc_topup_statusand then retry the purchase.amount_centsis integer US cents, $1 to $500. To cover an INSUFFICIENT_FUNDS shortfall exactly (a $2.50 domain, say), use that error'susdcAmountToCover, which allows for the fee. Payments are on-chain and cannot be reversed. Not available on sandbox keys (usesandbox_topup). Fails with CRYPTO_NOT_AVAILABLE for accounts that cannot use crypto (bank-transfer-only accounts); they add credit on porkbun.com instead. Credit added over the API counts toward the account's monthly top-up limit ($100 a month unless the account holder set their own; TOPUP_LIMIT_EXCEEDED), and unpaid checkouts from the last day count as if paid. Guide: https://porkbun.com/llms/guides/pay-with-usdc-x402
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, check eligibility only; creates no checkout. | |
| amount_cents | Yes | Checkout amount in integer US cents (100 = $1.00, max 50000 = $500.00); credit is this less about 1%. For a shortfall, pass INSUFFICIENT_FUNDS's `usdcAmountToCover`. Integer US cents: 803 means $8.03, not $803. |