Get Quote
POST /api/v1/pay/quote
Quote endpoint — after the user selects a chain and token, check how much they need to pay.
- Direct chain (same chain, same token): 1:1, no cross-chain quote needed
- Cross-chain: fetches real-time exchange rate via CyberPay cross-chain routing
Request
{
"pay_blockchain": "eth",
"pay_token": "ETH",
"settle_chain": "eip155:8453",
"settle_token": "USDC",
"settle_amount": "10000000"
}| Field | Type | Description |
|---|---|---|
pay_blockchain | string | Payment chain (e.g. eth, base, ton) |
pay_token | string | Payment token symbol |
settle_chain | string | Settlement chain (CAIP-2, e.g. eip155:8453) |
settle_token | string | Settlement token |
settle_amount | string | Settlement amount (smallest unit) |
Response — Direct
{
"method": "Direct",
"pay_amount": "10000000",
"pay_amount_formatted": null,
"pay_amount_usd": null,
"receive_amount": "10000000",
"receive_amount_formatted": null,
"receive_amount_usd": null,
"estimated_time": 5,
"exchange_rate": "1",
"slippage_bps": 0,
"expires_at": "2026-03-23T12:30:00Z"
}Response — CrossChain
{
"method": "CrossChain",
"pay_amount": "4200000000000000",
"pay_amount_formatted": "0.0042",
"pay_amount_usd": "10.50",
"receive_amount": "10000000",
"receive_amount_formatted": "10.00",
"receive_amount_usd": "10.00",
"estimated_time": 120,
"exchange_rate": "2500.00",
"slippage_bps": 50,
"expires_at": "2026-03-23T12:30:00Z"
}| Field | Type | Description |
|---|---|---|
method | "Direct" | "CrossChain" | Routing method |
pay_amount | string? | Amount to pay (smallest unit) |
pay_amount_formatted | string? | Human-readable amount (available for cross-chain) |
estimated_time | u32? | Estimated settlement time in seconds |
exchange_rate | string? | Exchange rate |
slippage_bps | u32 | Slippage (basis points, 50 = 0.5%) |
expires_at | string | Quote expiration time (ISO 8601) |
Errors
{ "error": "Quote failed: insufficient liquidity" }HTTP 502 — Cross-chain quote failed (route unavailable or insufficient liquidity).
