buy_verification_credits
Purchase verification credits to process payments beyond the free tier when Stripe billing is not configured. Pay on-chain with USDC to enable continued verification services.
Instructions
Buy x402 verification credits with USDC on-chain. Paywall owners need credits to process verifications beyond the free tier (1,000/month) when they don't have Stripe billing configured. Returns 402 payment instructions — pay on-chain and retry with proof.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of verification credits to purchase (min 100, default 1000) |
Implementation Reference
- src/index.ts:1156-1159 (handler)Handler function for buy_verification_credits tool that makes a POST API call to /billing/verification-credits with the count parameter and returns JSON response
async ({ count }) => { const data = await api('/billing/verification-credits', 'POST', { count }); return jsonResponse(data); }, - src/index.ts:1152-1155 (schema)Zod schema definition for buy_verification_credits tool parameters: count (number, integer, min 100, default 1000)
{ count: z.number().int().min(100).default(1000) .describe('Number of verification credits to purchase (min 100, default 1000)'), }, - src/index.ts:1146-1160 (registration)Tool registration for buy_verification_credits using server.tool() with name, description, schema, and handler
server.tool( 'buy_verification_credits', 'Buy x402 verification credits with USDC on-chain. ' + 'Paywall owners need credits to process verifications beyond the free tier (1,000/month) ' + 'when they don\'t have Stripe billing configured. ' + 'Returns 402 payment instructions — pay on-chain and retry with proof.', { count: z.number().int().min(100).default(1000) .describe('Number of verification credits to purchase (min 100, default 1000)'), }, async ({ count }) => { const data = await api('/billing/verification-credits', 'POST', { count }); return jsonResponse(data); }, );