Skip to content

iitianpushkar/C2F.Pay

Repository files navigation

🟥 C2F.Pay

Bridging crypto to everyday commerce through AI-powered payment orchestration.


🧩 Problem

Purchasing real-world goods with crypto is still clunky. Users bounce between wallets, payment pages, and exchanges; merchants don’t get instant, trusted fiat settlement.
AI agents can find products, but there’s no standardized, auditable way for them to complete a crypto→fiat purchase end-to-end while preserving user custody and merchant finality.


💡 Solution

C2F.Pay enables an AI agent (Claude Desktop) to complete a full crypto→fiat purchase through MCPs:

  • Merchant MCP: product discovery + Stripe PaymentIntent creation
  • Relayer MCP: payment facilitation, Stripe verification, email notification
  • Sei Wallet MCP: on-chain escrow (Locker contract) and event emission

Flow summary: user tells Claude to buy → Claude creates a PaymentIntent via Merchant MCP → Claude asks Relayer MCP to facilitate → Relayer gets the Resolver to accept and quotes SEI to lock → Claude locks SEI in Locker contract via Sei Wallet MCP → Locker emits Locked event → Relayer confirms fiat capture with Resolver/Stripe → Relayer verifies paymentIntentId → Relayer calls unlock to transfer SEI to Resolver → Relayer emails user a receipt.
User funds remain in escrow until fiat finality is proven. Every step is auditable (on-chain events + Stripe state).


🏗️ Architecture

architecture

flowchart TD
    A[User] -->|Find product| M[Merchant MCP]
    M -->|Return price, product info| A
    A -->|Buy product| M
    M -->|Create PaymentIntent via Stripe| A
    A -->|Send PaymentIntentId| R[Relayer MCP]
    R -->|Forward to Resolver for acceptance| Res[Resolver]
    Res -->|Accepted| R
    A -->|Lock SEI| W[Sei Wallet MCP / Locker Contract]
    W -->|Emit Locked Event| R
    R -->|Request Resolver to Pay Now| Res
    Res -->|Payment Success| R
    R -->|Verify PaymentIntent & Unlock Funds| W
    R -->|Send Confirmation Email| A

Loading

🧩 Architecture in Steps

  1. Product Discovery – User queries Merchant MCP for products.

  2. Checkout – Merchant MCP creates a Stripe PaymentIntent.

  3. Relay to Resolver – Relayer MCP forwards PaymentIntent to Resolver for acceptance.

  4. SEI Lock – User locks equivalent SEI in Locker Contract.

  5. Event Handling – Relayer listens for lock event.

  6. Final Settlement – Relayer triggers Resolver to execute payment.

  7. Contract Release – Relayer calls paymentToResolver function in the Locker Contract to release funds to the resolver.

  8. Confirmation – Relayer sends email confirmation to user.


📹 Demo Video

▶️ Watch Demo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors