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

# x402 Quickstart

> Install the x402 Facilitator SDK and make your first call.

## Prerequisites

* A XentFi account with a WAAS `apiKey` and `orgId` ([dashboard.xentfi.com](https://dashboard.xentfi.com) — see [Authentication](/api-reference/authentication))
* Node.js 20+
* `viem` if you'll be signing payments as a payer (installed automatically as a dependency)

## Step 1: Install

```bash theme={null}
npm install @xentfi/x402-facilitator
```

## Step 2: Set your environment variables

```bash theme={null}
export WAAS_API_KEY="your-waas-api-key"
export WAAS_ORG_ID="your-waas-org-id"
```

## Step 3: Construct the client and check supported configurations

```ts theme={null}
import { X402FacilitatorClient } from "@xentfi/x402-facilitator";

const facilitator = new X402FacilitatorClient({
  apiKey: process.env.WAAS_API_KEY!,
  orgId: process.env.WAAS_ORG_ID!,
});

const supported = await facilitator.getSupported();
console.log(supported);
```

```json Example response theme={null}
{
  "protocolVersion": "1.0.0",
  "facilitatorAddress": "0xa639b98096c4293e507727a296cb6cb862a9ca8d",
  "supportedConfigurations": [
    {
      "network": { "id": "base-mainnet", "name": "Base", "type": "mainnet" },
      "gasSponsorship": { "enabled": true, "maxSponsorshipValueUsd": "5.00" },
      "tokens": [
        {
          "id": "asset_usdc",
          "name": "USD Coin",
          "symbol": "USDC",
          "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "decimals": 6,
          "version": "2",
          "supportedSchemes": [{ "type": "eip3009", "methods": ["transferWithAuthorization"] }]
        }
      ]
    }
  ]
}
```

`getSupported()` requires no authentication and is the fastest way to confirm the SDK is wired up correctly and to discover valid `blockchainId`/`assetId` pairs and token domain parameters for signing.

<Note>
  The facilitator URL (`https://api.xentfi.com/v1/x402`) and relayer wallet are fixed on the backend — they are not configurable in the client. `apiKey` and `orgId` are the only two options `X402FacilitatorClient` takes.
</Note>

## Next: pick your role

<CardGroup cols={2}>
  <Card title="I'm getting paid" icon="server" href="/x402/resource-server">
    Set up `verify()` + `settle()` on a resource server.
  </Card>

  <Card title="I'm making a payment" icon="bot" href="/x402/payer">
    Sign an EIP-3009 authorization and attach it as `X-PAYMENT`.
  </Card>
</CardGroup>
