Developers

Developer guide

Start with the public read-only API. Follow the guides for deeper integration.

Start here

No account or payment is needed to read public discovery. Check each capability before using it.

GET /.well-known/luncagent.json
GET /api/v1/capabilities
GET /openapi.json

Merchant integration

The live StatsBin connection is authenticated and uses no money. Invited integrations use a versioned resource contract; the website never receives their credentials.

  1. Define the resource schema and stable resource key.
  2. Authenticate requests with scoped, expiring credentials and replay protection.
  3. Record delivery identity, request digest, and outcome durably.
  4. Expose authoritative status for recovery. An unknown outcome never permits another charge.

Tested StatsBin contract · Resource schema

SDK examples and private test setup

The repository package is private and unpublished. Its discovery client validates responses against canonical contracts.

import { createDiscoveryClient } from 'luncagent/discovery';
const api = createDiscoveryClient();
const status = await api.read('product');

Discovery example · Client example · Merchant interface

npm ci
npm test
python tools/test-machine-sandbox.py

Source access is required. These commands exercise private fixtures, not production payments.

Payment protocols and errors

x402 · MCP · A2A

Public paid execution is disabled for every protocol. Honor Retry-After on HTTP 429. For an unknown payment outcome, reconcile the original identity.

Error catalogue (JSON)