From 04ef31d88c109297be6ff45161be23a4273de5ad Mon Sep 17 00:00:00 2001 From: 0xreflexivity Date: Wed, 25 Feb 2026 13:32:42 -0500 Subject: [PATCH] docs(fxrp): convert x402 payments flow diagram to Mermaid --- .../token-interactions/03-x402-payments.mdx | 42 +++++++------------ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/docs/fxrp/token-interactions/03-x402-payments.mdx b/docs/fxrp/token-interactions/03-x402-payments.mdx index 0441da87..6d638d5a 100644 --- a/docs/fxrp/token-interactions/03-x402-payments.mdx +++ b/docs/fxrp/token-interactions/03-x402-payments.mdx @@ -42,34 +42,20 @@ The x402 implementation consists of four components: ## EIP-3009 Payment Flow -``` -┌─────────┐ 1. Request Resource ┌─────────────┐ -│ Agent │ ─────────────────────────────▶│ Server │ -│ │ ◀───────────────────────────── │ │ -│ │ 2. 402 + Payment Req │ │ -│ │ │ │ -│ │ 3. Sign EIP-712 Auth │ │ -│ │ (off-chain signature) │ │ -│ │ │ │ -│ │ 4. Request + X-Payment │ │ -│ │ ─────────────────────────────▶│ │ -│ │ ┌───────────┴─────────────┤ -│ │ 5. settlePayment() │ -│ │ │ │ -│ │ ▼ │ -│ │ ┌─────────────┐ │ -│ │ │ Facilitator │ │ -│ │ └──────┬──────┘ │ -│ │ │ │ -│ │ 6. transferWithAuthorization │ -│ │ │ │ -│ │ ▼ │ -│ │ ┌─────────────┐ │ -│ │ │ MockUSDT0 │ │ -│ │ └─────────────┘ │ -│ │ │ │ -│ │ ◀───────────────────────────── │ │ -└─────────┘ 7. 200 OK + Resource └─────────────┘ +```mermaid +sequenceDiagram + participant Agent + participant Server + participant Facilitator + participant MockUSDT0 + + Agent->>Server: 1. Request Resource + Server-->>Agent: 2. 402 + Payment Req + Agent->>Agent: 3. Sign EIP-712 Auth
(off-chain signature) + Agent->>Server: 4. Request + X-Payment header + Server->>Facilitator: 5. settlePayment() + Facilitator->>MockUSDT0: 6. transferWithAuthorization() + Server-->>Agent: 7. 200 OK + Resource ``` The flow works as follows: