← Back

Open402 (Bitso Stablecoin Conference)

System that enables AI agents to execute autonomous payments in the real economy of LATAM — Mexican services, CETES investment with Etherfuse, and x402 protocol on Arbitrum — without the user touching a wallet. 3rd place Arbitrum track and Etherfuse Pool Prize at Bitso's 2026 Stablecoin Conference.

July 2026...10 min read
x402 • AI Agents • Arbitrum • LATAM • Telegram Bot • CETES • Etherfuse • Coinbase AgentKit • Next.js • TypeScript

Problem

AI agents can already write code, make decisions, and manage complex tasks. The only thing they cannot do alone is pay.

The x402 protocol — standardized by the Linux Foundation in 2026 with backing from Visa, Mastercard, Google, AWS, and Stripe — solved the technical problem of native HTTP payments. But it created new unanswered problems:

  • How does an agent manage its liquidity without human intervention for every transaction?
  • Who defines what it can spend and how much?
  • How does an agent pay for services that don't yet speak x402 — CFE, Telmex, Telcel?
  • How does a user in LATAM who has never touched a wallet do any of this?

All existing solutions targeted the same profile: the user who already has a wallet, understands gas fees, and lives in dollars. That is not the LATAM user. And that gap is where the opportunity lives.

Solution

open402 is the financial infrastructure that enables AI agents to operate in the real economy of LATAM — without the user touching a wallet, a private key, or an exchange.

The model is straightforward: the user buys credits via SPEI, and their agent burns them executing real actions. All the blockchain, wallet, and stablecoin complexity happens in the backend.

What the agent can do

  • Pay Mexican services: CFE, Telmex, Telcel, Izzi and +400 providers via Prontipagos
  • Invest in CETES: quote → order → CLABE for SPEI deposit → confirmation via webhook (Etherfuse)
  • Consume APIs with x402 protocol: native HTTP payment from an Agentic Wallet on Arbitrum
  • Read physical receipts: OCR with GPT-4o Vision to extract service, reference, and amount without the user typing anything

All from Telegram. No friction.

The credit model

Credits are the abstraction layer between the user and the blockchain:

User → MXN (SPEI) → Bitso FXaaS → MXNB/MXM (Arbitrum)
                                           │
                               Internal credits (1 credit = $0.01 MXN)
                                           │
                   Agent executes → deducts credits → record → on-chain settlement

The user never interacts with crypto. The SPEI → stablecoin conversion is asynchronous and transparent.

Policy Engine

Before executing any payment, the agent validates a set of rules defined by the user:

  • Maximum amount limit per service
  • Mandatory confirmation threshold (e.g., amounts > $500 MXN require Telegram approval)
  • Recurring schedule: monthly, weekly, or one-time
  • Whitelist of allowed services per agent

No payment is executed without first being persisted in the database. The rules are blocking, not suggestions.

Technical Approach

General architecture

User
  ├── Web Dashboard (Next.js 14) ──► API Routes ──► PostgreSQL (Prisma)
  └── Telegram Bot (grammy + GPT-4o)
              │
              ├── GPT-4o Vision → Receipt OCR
              ├── Function calling (9 tools)
              └── execute_payment
                      │
                      ├── x402 Client → Agentic Wallet (Arbitrum) → x402 API
                      └── Prontipagos → MX Services (CFE, Telmex, Telcel, Izzi)

Monorepo structure

open402/
├── apps/
│   ├── web/               # Dashboard (Next.js 14, App Router)
│   │   ├── dashboard/
│   │   ├── agents/
│   │   ├── credits/
│   │   ├── rules/
│   │   ├── transactions/
│   │   └── api/etherfuse/
│   └── bot/               # Telegram Bot
│       └── src/index.ts   # GPT-4o + function calling
│
└── packages/
    ├── db/                # Prisma schema + client
    ├── agent/             # Agent with AgentKit
    ├── agentkit/          # Custom action providers
    ├── sdk/               # @open402/agents (public SDK)
    └── api/               # Shared logic

Telegram Bot — 9 function calling tools

The bot uses GPT-4o-mini for intent understanding and GPT-4o Vision for OCR. The model autonomously decides which tool to invoke:

ToolDescription
get_balanceUser's credit balance
list_agentsActive agents
get_agent_detailRules, wallet, and latest transactions
create_agentCreate agent with Arbitrum wallet
create_ruleConfigure spending rule
get_transactionsTransaction history
execute_paymentValidate rules, deduct credits, execute payment
invest_in_cetesGenerate Etherfuse order + SPEI CLABE
check_investmentCheck investment status by orderId

x402 Protocol on Arbitrum

1. Agent makes HTTP request to protected API
2. API responds HTTP 402 (Payment Required)
3. Agent signs MXM transfer from its Agentic Wallet (Coinbase CDP / MPC)
4. Transaction is sent to Arbitrum One
5. Agent retries the request with payment proof

Wallets are created with Coinbase Developer Platform using MPC architecture — private keys are never exposed, not even to the product team.

Payment channels

ChannelWhat it paysMechanism
x402APIs (OpenAI, CoinGecko, Perplexity…)HTTP 402 → MXM on Arbitrum
ProntipagosCFE, Telmex, Telcel, Izzi (+400 services)REST API with internal credits
EtherfuseCETES (tokenized stablebonds)Order → CLABE → webhook

Etherfuse / CETES flow

User: "Invest $500 in CETES"
       ↓
Bot generates quote (nominal rate, fees)
       ↓
User confirms → Order created → CLABE generated
       ↓
User transfers MXN via SPEI to CLABE
       ↓
Etherfuse receives deposit → executes stablebond purchase
       ↓
Webhook updates DB status (completed + cetesReceived)
       ↓
Bot notifies user with confirmation

Fiat on-ramp — Bitso FXaaS

User generates order in dashboard
       ↓
Receives CLABE + SPEI reference
       ↓
Transfers MXN → Bitso converts MXN → MXNB
       ↓
MXNB deposited in open402 pool wallet (Arbitrum)
       ↓
Credits credited to user in DB

Results

  • 🥉 3rd place — Arbitrum General & Startup track at Bitso's 2026 Stablecoin Conference (50 participating projects)
  • 💰 Etherfuse Pool Prize for CETES investment integration
  • Functional demonstration of the complete loop: SPEI → credits → real service payment → Telegram notification
  • Validation of the x402 protocol on Arbitrum with MPC Agentic Wallets
  • End-to-end integration with Etherfuse in sandbox environment

Tech Stack

Frontend & Auth

  • Next.js 14 (App Router) + Tailwind CSS
  • Clerk — authentication (email, Google, GitHub) + Svix webhooks for PostgreSQL sync

Backend & Database

  • PostgreSQL + Prisma ORM
  • TypeScript throughout (pnpm workspaces monorepo)
  • BullMQ + Upstash Redis for scheduled jobs and retries

Bot & AI

  • grammy — Telegram bot framework
  • GPT-4o — function calling for intent interpretation
  • GPT-4o Vision — OCR for physical receipts

Blockchain & Payments

  • Arbitrum One / Arbitrum Sepolia — main network
  • Coinbase CDP AgentKit — Agentic Wallets with MPC architecture
  • x402 SDK (@coinbase/x402) — native HTTP payment protocol
  • MXM / MXNB — Mexican stablecoins on Arbitrum

Integrations

  • Bitso FXaaS — on-ramp SPEI → MXN → MXNB
  • Prontipagos — Mexican service payments (400+ providers)
  • Etherfuse — CETES investment (tokenized stablebonds)

Infrastructure

  • Vercel — web dashboard deployment
  • Railway — Telegram bot deployment

Key Takeaways

Building open402 for a hackathon left concrete lessons:

The hardest problem was not technical. Abstracting blockchain from the user — making the flow feel like any payment app — required more product decisions than engineering ones. The credit model (buy with SPEI, spend without touching crypto) was the most important design decision of the project.

The Policy Engine is what makes the agent trustworthy. Without blocking rules, no serious company or user will let an agent spend money autonomously. Trust in autonomy is built with granular controls, not promises.

LATAM is an underserved market in the agent economy. All projects in the x402 ecosystem target users already living in crypto. Integrating SPEI, Prontipagos, and CETES was not a localization detail — it was the core value proposition.

The public SDK (@open402/agents) changes the type of project. Moving from a product to infrastructure that others can build on was a conscious decision from the start. The separation into packages (agent, agentkit, sdk) made it possible without rewriting the core.


Presented at the Stablecoin Conference — Bitso Business, Mexico City, June 2026.

Open402 (Bitso Stablecoin Conference) · Irwing Duran