> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbbit.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Pay With x402

> Call any paid endpoint without an account and pay per call in USDC on Base or Arc.

An agent with its own crypto wallet can call any paid endpoint without an account or API key. It pays for each call in USDC, on Base or Arc, using x402: the open standard for paying for an HTTP request with the `402 Payment Required` status code.

Each endpoint costs the same as with an API key. See the [price list](https://docs.orbbit.co/pricing.md#price-per-call) for each endpoint's price, and read the exact amount from the price quote before you pay. The two free endpoints, `GET /v1/commodities` and `GET /v1/branded-foods/categories`, need no key and no payment.

## How a paid call works

**1. Call the endpoint with no Authorization header**

The API replies `402` with a price quote. The quote is in the `PAYMENT-REQUIRED` response header (base64-encoded JSON) and, as the same JSON, in the response body.

**2. Sign one of the quoted options**

Pick the network your wallet holds USDC on and sign a transfer for that option's `amount` to its `payTo` address. Nothing moves yet: the signature only authorizes the transfer.

**3. Send the same request again with the signature**

Put the encoded signed payment in the `PAYMENT-SIGNATURE` request header.

**4. Receive the data and a receipt**

The API checks the payment, runs the request, and settles the transfer on chain. Only then does it reply `200` with the data. The `PAYMENT-RESPONSE` response header (base64-encoded JSON) holds the receipt, including the transaction hash.

An x402 client library does steps 2 to 4 for you. See the [x402 documentation](https://docs.x402.org) for client libraries.

## The price quote

```bash theme={null}
curl --request GET \
  --url 'https://data-api.orbbit.co/v1/branded-foods?limit=1'
```

```json 402 Payment required theme={null}
{
  "x402Version": 2,
  "error": "Payment required",
  "resource": {
    "url": "https://data-api.orbbit.co/v1/branded-foods?limit=1",
    "mimeType": "application/json",
    "description": "Search for packaged food products by name, brand, category, barcode, or ingredient."
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "10000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0xF48968e7C33E8Ad45259D1b28D3B44124Fa68f58",
      "maxTimeoutSeconds": 60,
      "extra": { "name": "USD Coin", "version": "2" }
    },
    {
      "scheme": "exact",
      "network": "eip155:5042",
      "amount": "10000",
      "asset": "0x3600000000000000000000000000000000000000",
      "payTo": "0xF48968e7C33E8Ad45259D1b28D3B44124Fa68f58",
      "maxTimeoutSeconds": 60,
      "extra": { "name": "USDC", "version": "2" }
    }
  ],
  "extensions": { "bazaar": { "info": { "input": { "...": "..." }, "output": { "example": { "...": "..." } } } } }
}
```

| Field | Description |
| - | - |
| `accepts` | One option per network. Pay any one of them. |
| `network` | The chain, as a CAIP-2 ID. See [Networks](#networks). |
| `amount` | This endpoint's price in USDC's smallest unit. USDC has 6 decimal places, so divide by 1,000,000: `10000` is \$0.01. |
| `asset` | The USDC contract on that chain. |
| `payTo` | Orbbit Data's receiving wallet. It is the same on both chains. |
| `maxTimeoutSeconds` | How long a signed payment stays valid: 60 seconds. Sign it and send the request again within that time. |
| `extensions.bazaar` | The endpoint's inputs and an example response, so an agent can see what it gets before it pays. The example's values are illustrative. |

## Networks

| Network | `network` | USDC contract (`asset`) | Network fee |
| - | - | - | - |
| Base | `eip155:8453` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | Paid by Orbbit |
| Arc | `eip155:5042` | `0x3600000000000000000000000000000000000000` | Paid by Orbbit |

Your wallet needs only USDC on the network it pays from. Orbbit's payment services, Coinbase on Base and Circle on Arc, submit the transfer and pay the network fee.

## What you're charged for

* Only calls that return data. The transfer is settled after the request succeeds. A call that fails, such as a `400` or a `404`, settles nothing and costs nothing.
* The endpoint's price per call, the same as with an API key.
* A request that sends an API key is always charged to that key's balance, even if it also sends a payment.

## Limits and errors

A wallet caller with no key can make up to 60 calls a minute from one IP address, free or paid. Past that, calls are refused with `429` until the minute is up.

| Status | Body | Why | What to do |
| - | - | - | - |
| `402` | The price quote | No payment was sent, or the payment was invalid, expired, didn't match an option, or didn't settle. The `error` field says which. Nothing was charged. | Sign one of the quoted options and send the request again. |
| `429` | `error.type` `rate_limited` | More than 60 calls in a minute from one IP address. | Wait and try again. |
| `503` | `error.type` `service_unavailable` | The payment service for the network could not be reached. Nothing was charged. | Retry, or pay on the other network. |

See [Errors](https://docs.orbbit.co/errors.md) for every error the API returns.

## Find Orbbit Data as an agent

Orbbit Data's paid endpoints are listed in Coinbase's x402 Bazaar, the directory agents search for paid APIs. Each listing carries the same inputs and example response as the quote.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.