Universal Payment API

Accept any supported token on any supported chain. MeterCall auto-swaps to USDC on Base and credits the paying address. Pay in PCP for a tiered 10-40% discount.

Base URLhttps://metercall.ai   Authnone for quote/accepted; signed receipts for submit

Accepted pairs

GET /v1/pay/accepted Live rates to USDC, cached 60s.

curl -s https://metercall.ai/v1/pay/accepted # => # { # "accepted": [ # { "token":"USDC", "chain":"base", "rate_to_usdc":1.00, "fee_bps":0, "finality_s":2 }, # { "token":"ETH", "chain":"base", "rate_to_usdc":2340.15, "fee_bps":15, "finality_s":12 }, # { "token":"PCP", "chain":"base", "rate_to_usdc":0.05, "fee_bps":0, "finality_s":2, "discount_bps":4000 } # ... # ], # "last_updated": "2026-04-17T..." # }

Quote a payment

POST /v1/pay/quote Returns how much of your token to send.

curl -s -X POST https://metercall.ai/v1/pay/quote \ -H 'content-type: application/json' \ -d '{ "amount_usd": 5.00, "paying_with_token": "ETH", "paying_on_chain": "base", "user_address": "0xYOUR_ADDRESS" }' # => # { # "quote_id": "q_ab12cd34...", # "required_amount_in_token": 0.00214127, # "rate_to_usdc": 2340.15, # "swap_path": ["ETH@base -> USDC@base via Universal Bridge"], # "estimated_ms": 13500, # "total_fee_bps": 45, # "discount_bps": 0, # "effective_cost_usdc": 5.00, # "expires_at": 1744905012345, # "signature": "hmac-sha256..." # }

Submit payment

POST /v1/pay/submit After you send the on-chain tx, post the hash. Server auto-confirms and swaps to USDC.

curl -s -X POST https://metercall.ai/v1/pay/submit \ -H 'content-type: application/json' \ -d '{ "quote_id":"q_ab12cd34...", "tx_hash_on_source_chain":"0xdeadbeef..." }' # => # { # "payment_id": "p_xyz...", # "status": "confirmed", # "credited_usdc": 5.00, # "pcp_discount_applied": "0%", # "receipt_signed": "hmac-sha256..." # }

Check balance

GET /v1/pay/balance/:user_address

curl -s https://metercall.ai/v1/pay/balance/0xYOU # => # { # "usdc_credit": 4.75, # "pcp_balance": 1500, # "recent_payments": [ ... up to 10 ... ], # "total_paid_usd_all_time": 125.30 # }

Withdraw to any chain

POST /v1/pay/withdraw Convert USDC balance to any supported token on any supported chain.

curl -s -X POST https://metercall.ai/v1/pay/withdraw \ -H 'content-type: application/json' \ -d '{ "user_address":"0xYOU", "amount_usdc": 3.00, "destination_chain":"solana", "destination_token":"SOL" }'

Calling a module, paying inline

Any endpoint under /v1/module/:slug/call, /v1/bridge/*, /v1/route/* accepts an X-Payment header.

curl -s https://metercall.ai/v1/module/btc-balance/call \ -H 'X-Payment: ETH:base:0xTX_HASH:0.00001' \ -H 'X-User-Address: 0xYOU' \ -H 'content-type: application/json' \ -d '{ "address":"bc1q..." }'

Format: TOKEN:chain:tx_hash:amount. Legacy USDC:base:0xtx:amount keeps working. On insufficient or missing payment, you get HTTP 402 with the full accepted list.

402 challenge shape

{ "error": "payment_required", "accepted": [ { "token":"USDC", "chain":"base", "amount":"0.001" }, { "token":"ETH", "chain":"base", "amount":"0.00000043" }, { "token":"PCP", "chain":"base", "amount":"0.012", "discount":"10-40% (tiered by stake)" }, { "token":"USDT", "chain":"tron", "amount":"0.001" }, { "token":"BTC", "chain":"bitcoin", "amount":"0.0000000095" } ], "instructions_url": "/agent-pay.html", "quote_ttl_s": 60 }

PCP discount tiers

PCP heldDiscount
10010%
1,00020%
10,00030%
100,00040%

Discount is applied at quote time; the effective USDC cost already reflects it. Works only when paying_with_token=PCP.

SDK

One-liner JS client: /sdks/pay.js

<script src="/sdks/pay.js"></script> <script> const list = await Pay.accepted(); const q = await Pay.quote({ amount_usd:5, paying_with_token:'ETH', paying_on_chain:'base', user_address:'0xYOU' }); const sub = await Pay.submit({ quote_id:q.quote_id, tx_hash_on_source_chain:'0xTX' }); const bal = await Pay.balance('0xYOU'); const out = await Pay.callWith('ETH','base','0xTX', 0.00001, '/v1/module/btc-balance/call', { address:'bc1q...' }); </script>

Landing · Pay · PCP · Bridge