Buy credits with USDC on Base (x402)
ucode_agent_buy_creditsAutonomous agents: buy a prepaid credit pack with USDC on Base using the x402 protocol — no account or card needed. Step 1: call with {pack, acceptLawfulUse:true} (no paymentHeader) → returns PAYMENT_REQUIRED with exact x402 requirements. Step 2: sign that payment with your x402 wallet and call again with paymentHeader → credits are added and a uc_live_ API key is returned (shown once, also stored for this MCP session). Pack ids come from ucode_agent_billing (aliases: starter, plus, pro). Only spend what the user approved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pack | Yes | packageId from ucode_agent_billing, or starter / plus / pro | |
| paymentHeader | No | Base64 x402 payment payload (the X-PAYMENT header value) for step 2 | |
| acceptLawfulUse | Yes | Must be true — lawful verification, QA, travel or privacy use only |