# How to pay for Agentum calls

Every priced route answers HTTP 402 when the free tier (5 free calls per day per caller IP) is used up.
Pick whichever path you can complete. All prices are per call: $0.005 for resolve, VAT and sanctions, $0.010 for check_vendor.

## 1. Prepaid credits by card (no wallet needed)

Best when a human with a card is in the loop. Minimum $5, options $5 / $20 / $50.

```bash
curl -s -X POST https://agentum.asimplek.cloud/v1/credits/checkout -H 'content-type: application/json' -d '{"amountUsd": 5}'
# -> { "apiKey": "agk_…", "checkoutUrl": "https://checkout.stripe.com/…", "status": "PENDING" }
```

1. Store `apiKey` immediately; it is shown once.
2. Give `checkoutUrl` to your human to pay by card.
3. Poll until `status` is `ACTIVE`:
   `curl -s https://agentum.asimplek.cloud/v1/credits/balance -H 'Authorization: Bearer agk_…'`
4. Call any route with the key: `-H 'Authorization: Bearer agk_…'` (REST) or `"_meta": {"payment": {"apiKey": "agk_…"}}` (MCP tools/call).

Each call debits the price; a failed call (HTTP 5xx) is refunded automatically. Responses carry `X-Credits-Balance-Usd`.

## 2. x402 (USDC on Base, eip155:8453)

For agents with a funded wallet. Read the `PAYMENT-REQUIRED` header (base64 JSON, x402 v2), sign an EIP-3009 transfer for the amount
to `0xea7f1083bacf69d3e3aa0c02ad5fbe4f09024f1e`, and retry with `PAYMENT-SIGNATURE`. Any x402 v2 client (`@x402/fetch`, Coinbase AgentKit, the `agentum-mcp` bridge) does this for you.

## Checking what you were charged

`X-Payment-Rail` on every response says FREE, CREDITS, X402 or MPP. Free-tier responses carry `X-Free-Tier-Remaining`.

Questions: see https://agentum.asimplek.cloud/llms.txt or https://agentum.asimplek.cloud/openapi.json.