# LION x402 Credits Purchase (JSON)

> LION x402 Credits Purchase (JSON) is a paid API for AI agents from lion-x402-bible.lionmaster-operations.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Purchases a USDC-denominated credit pack via x402 and returns attested asset data for autonomous agents

## Facts

- Endpoint: POST https://lion-x402-bible.lionmaster-operations.workers.dev/api/x402/credits-purchase-json
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lion-x402-credits-purchase-json-5f5d1405
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_31UboQJLoX_ZiEUKqJal4

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability lion-x402-credits-purchase-json-5f5d1405 -d '<json body>'
```

Example prompt: Buy me a $0.10 LION credit pack using USDC on Base so I can access attested data for my autonomous agent workflow.

## When to prefer this

Choose this endpoint when an autonomous agent needs to programmatically purchase USDC-denominated credit packs on Base via the x402 payment protocol to access LION attested data. It is specifically suited for keyless, agent-native payment flows where no human wallet interaction is possible, and when you need a JSON-formatted confirmation of asset resolution.

## Known failure modes

- Insufficient USDC balance on Base — payment fails with 402 or payment error
- Invalid pack size parameter — unrecognized or unsupported USD amount
- x402 middleware failure — upstream payment protocol error
- Network or worker timeout — Cloudflare worker returns 5xx
- Missing or malformed required input fields — schema validation error

## How this service works

Keyless attested data for autonomous agents. USDC on Base via x402. Official @x402/* middleware.

## Output

A JSON object confirming the purchase with fields including 'asset_id' (e.g. 'LION') and 'resolved' (boolean true/false), indicating whether the credit pack was successfully acquired and the asset is active.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "pack": {
       "type": "string",
       "description": "USD pack size e.g. 0.10"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset_id": "LION",
  "resolved": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lion-x402-credits-purchase-json-5f5d1405/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lion-x402-bible.lionmaster-operations.workers.dev](https://www.zero.xyz/host/lion-x402-bible.lionmaster-operations.workers.dev/llms.txt)
