API Reference

Fiber Payment Gateway

Spindle documents the gateway layer for the current MVP: authentication, route scopes, invoice creation, and payment reconciliation built for Fiber testnet operations.

Overview

Spindle is a policy-enforcement gateway for agent backends. It makes automated payment intents explicit and auditable before they touch owned Fiber testnet nodes.

Gateway Role
Auth, scope, policy, and reconciliation.
Target
Agent backends & automated operators.
Boundary
Testnet MVP for submission review.

Authentication

All requests require an x-api-key header with the spnd_ prefix.

Active Scopes
invoices:read
invoices:write
payments:read
payments:write
audit:read
keys:read
keys:write
Rejection Logic

Missing or invalid keys return 401. Correct keys with insufficient scope return 403. All auth events are recorded in the audit registry.

Invoices

Entry point for Fiber-backed payment state. Supports creation and tenant-scoped lookups.

POST /api/v1/invoices
POST /api/v1/invoices
x-api-key: spnd_***
content-type: application/json

{
  "amount": "50",
  "assetSymbol": "USDT",
  "description": "Agent payout",
  "externalReference": "ord_1001"
}

Payments

Execution is invoice-based. The gateway resolves ownership and enforces policy before calling Fiber.

POST /api/v1/payments
POST /api/v1/payments
x-api-key: spnd_***
content-type: application/json

{
  "invoice": "fibt1q..."
}
GET /api/v1/payments/{paymentHash}
GET /api/v1/payments/{paymentHash}
x-api-key: spnd_***

Policy Checks

Active checks performed before Fiber execution.

Approved Recipients
Address allowlist enforcement.
Max Per Action
Per-request spending caps.
24h Spend Limit
Rolling volume limits.

Audit & Query

Tenant-scoped access to execution history and reconciliation state.

GET /api/v1/audit
GET /api/v1/audit?paymentHash=0xabc...&limit=20
x-api-key: spnd_***
Safe Claims

- API gateway for agent payments

- Policy enforcement for Fiber testnet

- Scoped audit and reconciliation history

Non-Claims

- Mainnet settlement or proof verification

- Live telemetry or public service status

- Broader wallet or explorer product depth