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

# Self-serve dashboard

> Sign up, create a service, and start charging AI agents for your API in a few minutes — no bridge to run, no marketplace registry entry to file.

AiFinPay is payment infrastructure for AI agents — the "Stripe for AI
agents" rail. The fastest way to start charging agents for your API is the
self-serve dashboard: sign up, create a service, get a `merchant_id` and
API secret, and verify signed payment receipts statelessly on your own
server. No bridge to deploy, no `services.json` entry to file.

<CardGroup cols={2}>
  <Card title="Non-custodial" icon="lock">
    You set your own payout wallet on Polygon. Settlement lands there
    directly — AiFinPay never takes custody of your funds.
  </Card>

  <Card title="Stateless verification" icon="key">
    Receipts are signed JWTs. Verify them against AiFinPay's public JWKS —
    no shared secret required on the verification path.
  </Card>
</CardGroup>

<Info>
  Looking for the bridge / marketplace-registry path instead? That's for
  providers who want their API auto-discoverable in the AiFinPay registry
  — see [Become a provider](/charge/onboarding).
</Info>

<Steps>
  <Step title="Create an account">
    Go to [dash.aifinpay.io](https://dash.aifinpay.io) and sign up with an
    email and password. You're signed in immediately — a verification
    email is also sent, but it doesn't block you from continuing. The same
    account manages your AI agents (if you have any) at `/me`.
  </Step>

  <Step title="Create your first service">
    In the dashboard, create a service with:

    * **A service name** — how agents and the dashboard identify it.
    * **A payout wallet** — a public `0x…` address on **Polygon**.
      Settlement lands here non-custodially; AiFinPay never holds your
      funds.

    On creation you receive:

    | Value | Format | Notes |
    | - | - | - |
    | `merchant_id` | `mrch_…` | Public identifier — use it in quote requests and as the JWT `audience`. |
    | secret | `msec_…` | Your server-side API key. **Shown once.** |

    <Warning>
      The secret is shown only at creation time and is hashed server-side
      — AiFinPay cannot show it to you again. Store it securely. If you
      lose it, rotate it from Settings (this invalidates the old one).
    </Warning>
  </Step>

  <Step title="Integrate the paywall in your API">
    Install the merchant middleware — it answers unpaid requests with a
    `402` payment challenge, verifies receipts statelessly against our
    public JWKS, and meters the prepaid quota down per request. No call
    back to AiFinPay on the hot path.

    ```bash theme={null}
    npm install @aifinpay/gate
    ```

    ```ts theme={null}
    import { AifpMerchant, ResourceRegistry, aifpGate } from "@aifinpay/gate";

    // env: AIFP_MERCHANT_ID=mrch_…  AIFP_MERCHANT_SECRET=msec_…
    const merchant = new AifpMerchant();
    const registry = new ResourceRegistry({ merchant });
    await registry.start();

    app.use("/api", aifpGate({ merchantId: merchant.merchantId, registry }));
    ```

    Routes and prices come from the registry you edit in the Paywall
    Builder — or declare them in code with `ensureResources`. Both write
    the same registry; pick **one** owner per site (code registration
    replaces on every deploy). The full decision, plus a Fastify adapter:
    [Integration paths](/integration).

    <Accordion title="No-SDK path: verify the receipt JWT yourself">
      The receipt is a plain Ed25519-signed JWT — any JWT library works,
      which is also why the middleware has no runtime dependency on us:

      ```js theme={null}
      import { jwtVerify, createRemoteJWKSet } from "jose";

      const JWKS = createRemoteJWKSet(
        new URL("https://api.aifinpay.io/.well-known/jwks.json")
      );
      const { payload } = await jwtVerify(receipt, JWKS, {
        issuer: "https://api.aifinpay.io",
        audience: "mrch_…",
      });
      ```

      What the SDK adds on top of this snippet is the part that costs money
      when hand-rolled: atomic post-increment metering (read-then-write
      overspends a batch under concurrency), receipt **type** checking, scope
      matching, and a quota counter whose TTL dies with the receipt — plus the
      `402` challenge itself. If you build your own gate, build those four.
    </Accordion>

    <Info>
      Verification only needs the public JWKS — your `msec_…` secret is
      never involved in checking a receipt. The secret is the *management*
      credential (routes, prices, payout wallet); treat it accordingly.
    </Info>
  </Step>

  <Step title="Manage everything from the dashboard">
    Once your service is live, the dashboard is where you run it day to
    day:

    <CardGroup cols={2}>
      <Card title="Pricing" icon="tag">
        Set a unit price per tier (e.g. `standard`, `premium`) — this is
        what quotes are generated against.
      </Card>

      <Card title="Webhook" icon="webhook">
        Add a settlement webhook URL. AiFinPay sends an HMAC-signed `POST`
        on every settlement so you can react in real time instead of
        polling.
      </Card>

      <Card title="Settings" icon="rotate">
        Rotate your secret if it's ever exposed. The old secret is
        invalidated immediately; the previous value can't be re-viewed.
      </Card>

      <Card title="Receipts & activity" icon="chart-line">
        Watch receipts, usage stats, and live activity as agents pay —
        useful for reconciling against your own metering.
      </Card>
    </CardGroup>
  </Step>
</Steps>

<Note>
  The dashboard's per-merchant management views (pricing, webhook config,
  secret rotation, receipts) are part of the dashboard UI itself, not a
  public API endpoint you call directly from your backend. Your backend
  only needs `POST /v1/quote` and the JWKS endpoint above.
</Note>

## What you get

<CardGroup cols={2}>
  <Card title="No bridge to run" icon="server">
    Skip standing up and hosting a separate x402 bridge process — the
    quote + receipt flow talks directly to your existing API.
  </Card>

  <Card title="No registry entry to file" icon="list-check">
    You don't need a `services.json` PR or a redeploy to start
    charging — create a service in the dashboard and you're live.
  </Card>

  <Card title="No token, no credits" icon="circle-check">
    There is nothing for you or the agent to buy, hold or trade. The protocol
    credit that used to be earned on paid calls was retired on 2026-08-06 — it
    cost an extra chain call per payment and was never minted.
  </Card>

  <Card title="Real-time visibility" icon="eye">
    Receipts, stats, and live activity in one place, without building
    your own on-chain indexer.
  </Card>
</CardGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Become a provider (bridge path)" icon="store" href="/charge/onboarding">
    Want your API auto-discoverable in the AiFinPay registry too? See the
    config-only bridge path.
  </Card>

  <Card title="Networks reference" icon="link" href="/reference/networks">
    Live contract addresses and network details for the settlement side of
    a payment.
  </Card>
</CardGroup>


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