buy_credits
Purchase credits for edge library and AI research. Pay via Stripe Checkout card link or send USDC on Base and confirm payment for instant credit.
Instructions
Buy credits for the edge library and AI research. Default $5 minimum. Free — no credits consumed to call this.
TWO PAYMENT METHODS: card (default): Returns a Stripe Checkout link for your user to click and pay. After payment, call check_balance to confirm credits were added. crypto: USDC on Base. Fully autonomous — no human needed. Three steps: 1. buy_credits(payment_method='crypto') → returns deposit address + payment_intent_id 2. Send USDC to the deposit address (use your wallet tool) 3. buy_credits(payment_intent_id='pi_...') → confirms payment, credits added instantly If you have wallet access, this is the fastest path — fully machine-to-machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount_cents | No | Amount in cents (default 500 = $5.00). Minimum $5. | |
| payment_method | No | Payment method: 'card' (default, Stripe Checkout) or 'crypto' (USDC on Base). | card |
| payment_intent_id | No | For crypto: Stripe PaymentIntent ID from a previous buy_credits call. Pass after sending USDC to confirm. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deposit | No | USDC deposit address for crypto payment | |
| checkout_url | No | Stripe Checkout link for card payment | |
| current_balance_cents | No |