Hosted Stack

We deploy a public facilitator on Solana devnet and publish the client SDK on npm. Use these directly — no need to clone the repo or run Kora locally to try IncoPay's session payments.

Live facilitator

URL: https://inco-facilitator-production.up.railway.app

| Endpoint | Method | Purpose | |---|---|---| | /health | GET | Liveness + facilitator pubkey + token mint | | /supported | GET | x402 v1+v2 supported kinds (scheme: session) | | /sessions | POST | Open a new session (the SDK calls this for you) | | /sessions/:id | GET | Inspect session state (cap, spent, expiration) | | /verify | POST | Verify a session payment header | | /settle | POST | Settle a per-call payment against an open session | | /pay/{getAmount,verify,settle} | POST | Single-payment x402 flow (no sessions) |

The facilitator pays the SOL fee for every settle — gasless for the end user. Devnet config:

| | | |---|---| | Network | solana:devnet | | Token mint | 7crFMbJN7hxVhUPNcRRxTGr9nD3TnvpZ8pNZepA19wuB (Inco-issued "USDC", 6 decimals) | | Facilitator pubkey | 55LEmvuVgujxEvbrYBiDXBZmMxu3dMofVvT6uCq4q2xK | | IncoToken program | 9Cir3JKBcQ1mzasrQNKWMiGVZvYu3dxvfkGeQ6mohWWi | | Inco Lightning program | 5sjEbPiqgZrYwR31ahR6Uk9wf5awoX61YGg7jExQSwaj |

Published SDK

npm: solana-x402-sessions

npm install solana-x402-sessions @solana/web3.js
import { createSession } from "solana-x402-sessions";

const session = await createSession({
  facilitatorUrl: "https://inco-facilitator-production.up.railway.app",
  network: "solana:devnet",
  asset: "7crFMbJN7hxVhUPNcRRxTGr9nD3TnvpZ8pNZepA19wuB",
  recipient: "55LEmvuVgujxEvbrYBiDXBZmMxu3dMofVvT6uCq4q2xK",
  cap: "1",
  expirationSeconds: 3600,
  signer: { /* Phantom / Solflare adapter */ },
});

// Subsequent calls auto-attach payment headers — no extra wallet popups
await session.fetch("/api/your-endpoint", { method: "POST", body: ... });

What this means for integrators

  • Don't run a facilitator locally unless you're modifying it. Point your dev Next.js at the Railway URL above and you're done.
  • Don't run Kora. The hosted facilitator pays gas itself with its own funded keypair — no separate paymaster service required.
  • No env config required for the demo path — the published SDK + hosted facilitator come pre-wired for devnet.

Self-hosting

The facilitator source lives at IncoPay/inco-facilitator. To run your own:

git clone https://github.com/IncoPay/inco-facilitator
cd inco-facilitator && npm install && npm run build
FACILITATOR_KEYPAIR='[1,2,...]' TOKEN_MINT=... npm start

Required env: FACILITATOR_KEYPAIR (inline JSON array or base64), TOKEN_MINT, SOLANA_RPC_URL. Optional: FACILITATOR_PORT (defaults 4021, also honors PORT for Railway/Render/Fly).