0 · Before you code
- Laptop + GitHub account
- Cursor / Claude Code / VS Code — install Collect skill if you use an agent:
npx skills add Vybe-Finance/vybe-collect -g -yIf /app opens “Create your first spend key” and you only need Collect tonight: click Skip for now (or switch to Business in the sidebar). You can finish agent spend keys later.
1 · Seller setup (~10 min)
- Sign up → verify email → claim
@username - Open Business → Products, add an offering (price locked), publish your service page
- Enable Accept payments from AI agents (Vybe Collect)
- Confirm catalog:
GET https://www.vybe.finance/api/agent/collect/YOUR_USERNAME - Optional API key: Business → Developers → issue
vybe_col_…(webhooks / offerings API)
Human page: /s/@you · Agent docs: /a/@you
2 · Gate your API (Track A)
Fastest code path for the room: npm i express-vybe-402 on a tiny Express app.
# Clone / paste into a new folder
npm install express express-vybe-402
export VYBE_ORIGIN=https://www.vybe.finance
export VYBE_USERNAME=YOUR_USERNAME
export VYBE_OFFERING_ID=svc_YOUR_OFFERING
export PORT=4050
node node_modules/express-vybe-402/example.js
# → GET http://localhost:4050/v1/report (expect 402 until paid)Point VYBE_USERNAME / VYBE_OFFERING_ID at your catalog (ids look like svc_…).
const { requireVybePayment } = require("express-vybe-402");
app.get(
"/v1/report",
requireVybePayment({
username: process.env.VYBE_USERNAME,
offeringId: process.env.VYBE_OFFERING_ID,
origin: "https://www.vybe.finance",
}),
(req, res) => res.json({ ok: true, payment: req.vybePayment }),
);3 · Pay + unlock
Unpaid → HTTP 402 + payment details. Settle, then retry with X-Vybe-Public-Id.
# 1) Create intent against a catalog offering
curl -sS -D - -X POST \
"https://www.vybe.finance/api/agent/collect/YOUR_USERNAME/svc_YOUR_OFFERING" \
-H "Accept: application/json"
# Note X-Vybe-Public-Id and PAYMENT-REQUIRED from the 402 response.
# 2) After settle (human /r/{publicId} or agent x402 / txHash), retry your API:
curl -sS http://localhost:4050/v1/report \
-H "X-Vybe-Public-Id: pr_…"
# 3) Confirm seller catalog is public
curl -sS "https://www.vybe.finance/api/agent/collect/YOUR_USERNAME" | headOptional webhook for fulfillment:
// Minimal payment.paid handler (verify signature in production)
app.post("/webhooks/vybe", express.raw({ type: "application/json" }), (req, res) => {
const event = JSON.parse(req.body.toString());
if (event.type === "payment.paid") {
// credit quota / unlock content — idempotent on event.id or publicId
}
res.status(200).json({ ok: true });
});
// Configure URL + secret: Business desk → Developers → Webhooks
// Header: X-Vybe-Signature: sha256=…Success criteria for judges: catalog JSON live, 402 on unpaid call, 200 after pay, credit visible on seller balance / webhook.
Demo catalog (read-only)
Explore a live Collect seller while you finish setup — replace with your @username for the build.
- Agent docs: https://www.vybe.finance/a/@vybepro
- Human page: https://www.vybe.finance/s/@vybepro
- Catalog API: https://www.vybe.finance/api/agent/collect/vybepro
Set NEXT_PUBLIC_COLLECT_DEMO_USERNAME in deploy if you want a different public demo handle.
Stuck? Top failures
| Symptom | Fix |
|---|---|
| Catalog 404 / empty | Publish page + enable Collect + at least one active offering |
| 402 forever after pay | Retry with header X-Vybe-Public-Id: pr_… from the intent |
| 401 on Business API | Use Authorization: Bearer vybe_col_… (server only — never NEXT_PUBLIC_) |
| TLS / fetch errors to apex | Use https://www.vybe.finance — not bare https://vybe.finance |
| Wallet / spend-key screen | Skip for Collect; open Business → Products / Developers |
More depth: Integration guide · OpenAPI · support@vybe.finance