Live on Stellar mainnet · x402

TIA Remittance API

Pay-per-call USD/MXN remittance data for AI agents, settled in USDC on Stellar via x402.

Built on Stellar
The problem

Remittances are expensive and opaque

US-to-Mexico remittances are costly and hard to compare, yet families depend on these transfers. At the same time, AI agents have no simple way to fetch live USD/MXN rates and compare remittance rails.

Opaque pricing

Fees and exchange-rate spreads make it hard to know what a transfer really costs.

Families depend on it

Every cent lost to fees is money that doesn't reach a household in Mexico.

No agent-native access

AI agents lack a simple, pay-as-you-go way to get live rates and compare rails — no accounts, no API keys.

How it works

HTTP 402, paid in USDC on Stellar

TIA uses the x402 protocol with the exact scheme on Stellar mainnet (stellar:pubnet). No sign-up, no API keys — each call is paid individually in USDC.

1

Call

The agent requests a paid endpoint such as GET /v1/quote.

2

Get 402

The API replies 402 Payment Required with payment requirements (amount, USDC asset, pay-to account, network) in the PAYMENT-REQUIRED header.

3

Sign & retry

The agent signs a USDC payment on Stellar and retries the request with the PAYMENT-SIGNATURE header (x402 v2).

4

Get data

Payment is settled via the OpenZeppelin x402 facilitator and the API returns the data, with the settlement receipt in the PAYMENT-RESPONSE header.

Each payment is single-use: replaying the same payment returns 409 payment_replayed.

Endpoints & pricing

Simple per-call pricing

Base URL: https://remesa-tia-backend.vercel.app · Prices in USDC on Stellar.

EndpointDescriptionPrice
GET/v1/quoteUSD/MXN remittance quote$0.10 USDC
GET/v1/route?amount=USDCompare remittance routes / rails for a given USD amount$0.25 USDC
POST/v1/alertCreate a USD/MXN rate alert$0.10 USDC
GET/healthService status and x402 configurationFree

Try it: an unpaid call returns 402

# Request a quote without paying
$ curl -i https://remesa-tia-backend.vercel.app/v1/quote

HTTP/2 402
content-type: application/json; charset=utf-8
payment-required: eyJ4NDAyVmVyc2lvbiI6Mi...  # base64-encoded JSON

# Decoded PAYMENT-REQUIRED header:
{
  "x402Version": 2,
  "error": "Payment required",
  "accepts": [{
    "scheme": "exact",
    "network": "stellar:pubnet",
    "amount": "1000000",        // 0.10 USDC (7 decimals)
    "asset": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75",
    "payTo": "GBRMBOEGDTF72FP72D7OQLICBXVTSG25GYWZ3W7TNCLD47NEYVU7JUBS",
    "maxTimeoutSeconds": 300,
    "extra": { "areFeesSponsored": true }
  }]
}
On-chain proof

Verifiable on Stellar mainnet

Soroban escrow contract CBCWBOZBCKJ4FSCMQ2OJUI3UDDNT7QSPURTSAELKESPY6D7DUA22M5MP
  • Bound to the Circle USDC Stellar Asset Contract (SAC)
  • 25 bps treasury fee on cashout
  • Functions: initialize_reservation, mark_verified, validate_cashout, cancel_reservation, register_merchant
First verified paid mainnet call · Sept 25, 2026 b5fc310f086d3e4e170384fec0ccd1485c9b348559a12f61aa1ec9f2b5695e0d
  • Replaying the same payment returned 409 payment_replayed
Built with

Stack

TypeScriptNode / Expressx402 (@x402/stellar)Rust / SorobanUSDC on StellarUpstash RedisVercel