accountCredit
Adds prepaid credit to an account, in USDC. Past the period's units a keyed call or a linked box's watch hit draws it (see Overage under Accounts), and it never expires.
Cost: The
amountin the body, at least 1 USDC, paid over x402. Anyone may pay, not only the owner. No key and no signature.Inputs:
address(path), any letter case, andamount(body), whole USDC base units as a string: "1000000" is 1 USDC. The 402 asks for exactly that. A missingamountis priced at the minimum, and anamountunder it is refused with 400 before anything settles.Returns:
accountIdandcredit:addedand thebalanceafter this payment, in base units.Errors:
400
invalid_request:amountis missing, not a whole number, or under 1 USDC. Nothing settles.404
account_not_found: the address has no account. Create one withaccountCreate. Nothing settles.
Next:
accountStatus: read the credit balance and what 1,000 units cost from it.boxStatus: a linked box that was paused for want of units is active again.
Costs at least 1 USDC, the amount in the body; the exact amount comes back in the payment-required result. Payment goes in params._meta["x402/payment"]; use an x402-aware MCP client (see https://docs.arcgate.dev/#arcgate/description/mcp-for-agents).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | How much credit to buy, in USDC base units (6 decimals) as a whole-number string: "1000000" is 1 USDC. At least the deployment's minimum (the 400 names it); the payment-required amount is exactly this. Left out, the 402 quotes the minimum. | |
| address | Yes | The account owner's address, any letter case. One account per address, and a signed request must be signed by it. |