Stipendex

Rail adapters

Stipendex does not execute settlement itself — existing payment systems do, through adapters. The protocol fixes the adapter interface and the evidence format in Proof; everything else (licenses, KYC, currency conversion, anti-fraud) is the rail's domain.


Adapter interface (in the wallet)

RailAdapter {
  scheme: string                       // "account" | "stripe-mpp" | "stripe-connect" | "x402" | …
  pay(quote, railParams)      → evidence          // service: immediate capture
  hold(quote, railParams)     → evidence          // checkout: pre-auth of estimate+tolerance
  capture(evidence, amountFinal) → evidence'      // checkout: charge ≤ hold
  void(evidence)              → void              // release the hold without charging
  refund(evidence, amount)    → evidence'         // extension
}

Receiver-side, symmetrically: verify(proof) → ok | invalid (locally or by querying the facilitator/chain).

account — facilitator ledger (the out-of-the-box default)

A prepaid ledger at a hosted operator. Goal: zero entry barrier — the developer touches neither cards, nor crypto, nor regulation.

The facilitator additionally provides: the HITL pending queue, velocity anti-fraud, mandate revocation, receiver payouts (scheduled/threshold).

stripe-mpp — fiat machine payments

A bridge into the Stripe Machine Payments Protocol: session-aggregated billing on fiat rails. The natural choice for receivers already living in Stripe. evidence = the MPP session/charge identifier; Stipendex tab sessions map onto MPP sessions almost one-to-one.

stripe-connect — the checkout profile

The goods-purchase rail (the 4agents order-flow v2.1 model, decision D1):

Taxes, reserves, payouts, MoR are the orchestrating platform's configuration on top of Connect, outside Stipendex (see checkout-profile.md).

x402 — crypto per-call

For full autonomy and receivers without banking:

Compatibility is deliberate: a Stipendex Quote carries the same scheme fields as x402 paymentRequirements, so a receiver with a working x402 stack connects by renaming fields, not rewriting.

Rail selection by the wallet

  1. Intersect quote.rails[] with configured adapters.
  2. Priority from wallet configuration (default: account → stripe-* → x402).
  3. Empty → denied(no_common_rail) — the agent can report to the receiver/principal.

Requirements for any rail (normative)