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

# Direct HTTP

> Make paid HTTP requests to the API with an x402 client wrapper.

<Tip>
  **Building with Claude or Cursor?** The [MCP server](/integrate/mcp) is the easier path — it handles wallet, payment routing, and tool registration for you. This page is for non-MCP integrations (backend services, custom agents, raw HTTP clients).
</Tip>

This page covers the direct HTTP integration via the x402 protocol.

## 1. Pick a payment protocol

Syntalic accepts two payment protocols on every endpoint:

* **[x402](/payments/x402)** — USDC on Solana or Base. Best if your agent already holds a wallet.
* **[MPP/Tempo](/payments/mpp)** — Hosted micropayments via Tempo. Best if you don't want to manage wallets.

The server auto-detects which protocol you're using from request headers.

## 2. Discover endpoint metadata

Every endpoint advertises pricing and accepted payment methods via a `402 Payment Required` response. Hit any URL with no payment to see them:

```bash theme={null}
curl -i https://api.syntalic.com/v1/shopper/best-price?q=airpods+pro&country=us
```

The response body contains an `x-payment-info` block listing the price (e.g. `$0.01`) and the recipient address per protocol.

You can also browse the live endpoint catalog on **[x402scan](https://www.x402scan.com/server/fdf15e0c-8d66-49ae-acbb-d872c75e5147)**, which mirrors the same discovery metadata.

## 3. Integrate in code

Use the official `@x402/fetch` wrapper to make paid requests from any Node.js or edge runtime:

```bash theme={null}
npm install @x402/fetch @x402/svm
```

```ts theme={null}
import { wrapFetchWithPayment } from "@x402/fetch";
import { createSolanaSigner } from "@x402/svm";

const signer = createSolanaSigner(process.env.SOLANA_PRIVATE_KEY!);
const paidFetch = wrapFetchWithPayment(fetch, signer);

const res = await paidFetch(
  "https://api.syntalic.com/v1/shopper/best-price?q=airpods+pro&country=us"
);
const data = await res.json();
```

`paidFetch` handles the full handshake: discovery → sign authorization → resend with `X-Payment` header → return the 200 response. See **[x402 details](/payments/x402)** for the manual flow and Base/EVM equivalent.

## 4. Inspect the response

```json theme={null}
{
  "query": "airpods pro",
  "country": "US",
  "best": {
    "retailer": "amazon",
    "price": 189.00,
    "currency": "USD",
    "url": "https://amazon.com/...",
    "in_stock": true,
    "scraped_at": "2026-04-28T11:14:22Z"
  },
  "alternatives": [
    { "retailer": "walmart", "price": 199.00, "..." },
    { "retailer": "target", "price": 199.99, "..." }
  ]
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Browse endpoints" icon="list" href="/api-reference/shopper/best-price">
    All 13 endpoints with live request/response examples.
  </Card>

  <Card title="Coverage" icon="globe" href="/reference/coverage">
    Which retailers, which countries, and how fresh the data is.
  </Card>
</CardGroup>
