---
title: Pay per check (x402): Lorg Check docs
description: How an AI agent pays for each check in USDC on Base with x402: no account, no key. The prices, the three steps, working code, and when it is never charged.
url: https://lorglabs.com/docs-pay-per-check.html
---

# Pay per check (x402)

For an agent that holds a wallet. It pays for each check in USDC, inside the call itself, using the open **x402** payment standard. No account, no sign-up, no key.

## Prices

| Check | Endpoint | Price |
| --- | --- | --- |
| Token check | `POST https://api.lorglabs.com/v1/check/token` | $0.03 |
| Address check | `POST https://api.lorglabs.com/v1/check/quick` | $0.01 |

Paid in USDC on Base. Your agent's wallet needs USDC only: the payment is a signed authorisation, so it needs no ETH for gas.

## How it works

1. **Ask**: Send the request with no payment. The reply is `402 Payment Required`, and its `PAYMENT-REQUIRED` header says the price, the network and where to pay.
2. **Pay**: Your agent signs a USDC payment for that amount with its own wallet, and sends the same request again with the payment in a `PAYMENT-SIGNATURE` header.
3. **Receive**: The signed answer comes back, with the payment's receipt in the `PAYMENT-RESPONSE` header.

An x402 client library does all three in one call.

## The code

In JavaScript or TypeScript, with the x402 libraries (`npm install @x402/fetch @x402/evm viem`):

```
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// the agent's own wallet, holding USDC on Base
const wallet = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:*", client: new ExactEvmScheme(wallet) }],
});

// before the trade: ask, pay and receive, in one call
const reply = await fetchWithPayment("https://api.lorglabs.com/v1/check/token", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ chain: "base", address: token, amount_usd: 500 }),
});
const answer = await reply.json();

// act on one word
if (reply.status !== 200 || answer.action === "do_not_proceed") stop(answer.summary);
```

This exact code was run against the sandbox on 14 Oct 2026: paid, answered, receipt returned.

Clients for other languages (Python, Go and others) are listed by the x402 project. Any client that speaks x402 version 2 with the `exact` scheme works.

## Try it free first

The sandbox takes the same payment in **test USDC** on Base Sepolia, which costs nothing (Circle's faucet gives it out). Point the same code at `https://staging.lorglabs.com`, and your wallet at Base Sepolia. The answers are real: the checks run on live mainnet data either way.

## When you are never charged

- **A mistake**: A malformed request is refused before any payment is asked for.
- **An error**: Any reply with status 400 or above. The payment is settled only when we return an answer.
- **Unknown**: When a check we need can't finish, the reply is `503 CHECKS_INCOMPLETE`: no verdict, no charge. Ask again after `Retry-After`.
- **A refund**: If you believe you were charged wrongly, write to [info@lorglabs.com](mailto:info@lorglabs.com) with the receipt.

## Limits

Without a key, one IP address can make 30 requests a minute, price questions and paid checks together. Beyond that the reply is `429` with `Retry-After`. An agent that needs more should [hold a key](https://lorglabs.com/docs-api-keys.md).

Payments are verified and settled by Coinbase's x402 facilitator. Each one is public on the Base blockchain, like any other USDC transfer.
