How atum-labs/examples works
Atum Examples demonstrates three payment routes: x402 and MPP each pair a merchant that challenges and fulfills requests with a payer that retries a purchase while settlement is pending; PGC shows direct gateway payment without a merchant. Each route supports local stubs and opt-in real settlement. The graph preserves the separate challenge, payment, settlement, collection, and fulfillment stages. Some merchant internals are unsampled, so those links reflect README descriptions rather than inferred calls.
Main entry points: src/merchant.ts x402 merchant · src/merchant.ts MPP merchant · src/client.ts x402 payer client · src/client.ts MPP payer client
Components 17
x402 examples
- x402 merchant
x402-accept-payments/src/merchant.ts - Delivery ledger
x402-accept-payments/src/payments.ts - x402 payer client
x402-make-payments/src/client.ts - Purchase retries
x402-make-payments/src/purchase.ts
MPP examples
- MPP merchant
mpp-accept-payments/src/merchant.ts - Delivery ledger
mpp-accept-payments/src/payments.ts - MPP payer client
mpp-make-payments/src/client.ts - Purchase retries
mpp-make-payments/src/purchase.ts
Direct PGC
- Gateway payer
pgc-make-payments/src/client.ts - Status collection
pgc-make-payments/src/purchase.ts - Stub gateway
pgc-make-payments/src/stub-gateway.ts
Settlement services
- x402 facilitator
- Payment Gateway
- Settlement networks
Other components
- Buyer / payer
- Merchant
- Paid resource
Connections 26
- Buyer / payer → x402 payer client: initiates purchase
- x402 payer client → Purchase retries: drives retries
- Purchase retries → x402 payer client: invokes attempt
- x402 payer client → x402 merchant: requests resource
- x402 merchant → x402 payer client: returns 402 challenge
- x402 payer client → x402 merchant: presents payment
- x402 merchant → x402 facilitator: facilitates payment
- x402 merchant → Delivery ledger: reads and records delivery
- x402 merchant → Paid resource: serves fulfillment
- Buyer / payer → MPP payer client: initiates purchase
- MPP payer client → Purchase retries: drives retries
- Purchase retries → MPP payer client: invokes attempt
- MPP payer client → MPP merchant: requests resource
- MPP merchant → MPP payer client: returns 402 challenge
- MPP payer client → MPP merchant: submits credential
- MPP merchant → Payment Gateway: loads corridor and submits
- MPP merchant → Delivery ledger: reads and records delivery
- MPP merchant → Paid resource: serves fulfillment
- Buyer / payer → Gateway payer: initiates payment
- Gateway payer → Payment Gateway: prepares and submits
- Gateway payer → Status collection: collects outcome
- Status collection → Payment Gateway: checks payment status
- Gateway payer → Stub gateway: uses in-process stub
- Stub gateway → Gateway payer: returns payment status
- x402 facilitator → Settlement networks: settles payment
- Payment Gateway → Settlement networks: settles payment