home
docs
EconDash

Agent payments (x402 & MPP)

Pay-per-call API access for AI agents via x402 and Machine Payments Protocol

Overview

Human subscribers use API keys. AI agents can read the same economic data without a dashboard account and pay per request with x402 or MPP.

One URL serves everyone:

  • Free trial data (10 countries, 50 core indicators, 300 requests/day, 30/minute) answers right away, no key, no payment.
  • Everything else, meaning another country or indicator or more requests than the free quota, answers 402 Payment Required with payment challenges. Pay for that one call, or use an API key.

Official protocol documentation:

The Python SDK does all of this for you: pip install "econdash[x402]", "econdash[tempo]" or "econdash[solana]". LangChain, LlamaIndex and CrewAI wrappers are in Agent frameworks.


Request flow

  1. Send GET to https://econdash.org/api/v1/... (see Endpoints).
  2. Inside the free trial you get 200 with data. Otherwise the server responds with 402 Payment Required and includes challenges for all supported rails in one response: x402 (Base), MPP Tempo, MPP Solana. Over the free quota the 402 also carries Retry-After if you prefer to wait.
  3. Pay using one of the rails, then retry the same request with the matching credential header.

Base URL for agents

https://econdash.org/api/v1

https://econdash.org/api/v1/m2m serves the same routes with every call paid, including trial data. EconDash is listed under this address in x402 catalogs (x402scan, CDP Bazaar and others), and it is fully supported.

Do not use /api/proxy. It is an internal site endpoint, not an integration API, and it does not forward payment credential headers.


x402 (Base mainnet)

FieldValue
NetworkBase mainnet (eip155:8453)
AssetUSDC
Token contract0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
ExplorerBasescan — USDC on Base

Challenge: Decode the PAYMENT-REQUIRED header (base64 JSON). Use the payTo, amount, asset, and network fields from that payload — do not hardcode them in clients.

Typical server configuration charges 0.02 USDC per call (20000 minimal units, 6 decimals). Exact values always come from the challenge.

Credential on retry: PAYMENT-SIGNATURE header.

Signing: Follow x402 client documentation. For USDC on Base, the EIP-712 domain name and version must match the on-chain token (e.g. "USD Coin" and "2"), not the ticker shorthand.


MPP (Tempo mainnet)

FieldValue
NetworkTempo mainnet
AssetpathUSD
Token contract0x20C0000000000000000000000000000000000000
ExplorerTempo Explorer — pathUSD

Challenge: Parse WWW-Authenticate: Payment per MPP HTTP 402.

Typical charge is about 0.02 USD per call; exact terms come from the challenge / server configuration.

Credential on retry: Authorization: Payment <token>.

Receipt: Successful responses may include a Payment-Receipt header.

Use an MPP client SDK (e.g. TypeScript mppx, Python pympp) to build and verify credentials.


MPP (Solana mainnet)

Solana USDC payments via MPP use pay.sh. The 402 challenge includes method="solana" next to Tempo.

FieldValue
NetworkSolana mainnet (methodDetails.network is mainnet)
AssetUSDC (SPL token)
Token mintEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Decimals6
ExplorerSolscan — USDC on Solana

Challenge: Parse WWW-Authenticate: Payment method="solana" per MPP Solana. The challenge includes amount, currency (USDC mint), recipient, and methodDetails (network is mainnet for Solana mainnet-beta, decimals is 6, tokenProgram is the SPL Token program). The challenge id is an HMAC of that request.

Typical charge is about 0.02 USDC per call (20000 base units, 6 decimals). Exact values always come from the challenge.

Credential on retry: Authorization: Payment <token>. Echo the challenge, including expires. The transfer is SPL TransferChecked for the exact amount to the recipient's USDC associated token account, and the memo must contain the challenge id.

The server returns data only after the transfer is confirmed on Solana. That is usually a few seconds and can take about 40 seconds.

  • Pull (payload.type transaction): send a fully signed transaction. You pay the network fee. The server broadcasts it, waits for confirmation, checks the USDC balance change, then responds.
  • Push (payload.type signature): broadcast the same transfer yourself, then send the transaction signature. The server reads it from the cluster and applies the same checks.

One signature pays for one response. Sending it again returns 402.

Receipt: A successful response includes a Payment-Receipt header.

Use an MPP client SDK (TypeScript mppx, Python pympp) with the solana method to build and verify credentials. See pay.sh/docs for Solana-specific integration details.


Minimal curl outline

# First request — expect 402; read PAYMENT-REQUIRED and WWW-Authenticate
curl -i "https://econdash.org/api/v1/m2m/stats"

After you obtain a valid x402 or MPP proof with your wallet or SDK, retry the same URL with PAYMENT-SIGNATURE or Authorization: Payment ... as required by the protocol.


Rate limiting

Responses with 402 may be rate-limited per IP on the backend (e.g. M2M_402_PER_IP_PER_MINUTE). Use backoff and avoid hammering unpaid endpoints.


  • Endpoints — full route list (M2M mirrors these paths under /api/v1/m2m).
  • Quick Start — trial and API-key access for humans.