Skip to main content
GET
/
checkout
/
quote
curl "https://api.maash.io/checkout/quote?amount_usd=100&token=USDC&chain=polygon" \
  -H "x-api-key: mk_live_1234567890abcdef1234567890abcdef" \
  -H "x-maash-user-type: checkout"
{
  "data": {
    "quote_id": "qt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "amount_usd": 100,
    "token": "USDC",
    "chain": "polygon",
    "token_amount": "100.000000",
    "rate": 1,
    "fee_usd": 0.1,
    "fee_token": "0.100000",
    "total_token_amount": "100.100000",
    "expires_at": "2024-01-31T15:30:00Z",
    "valid_for_seconds": 300,
    "created_at": "2024-01-31T15:25:00Z"
  }
}
Returns a price quote including fees and the total token amount the customer needs to send. Quotes are valid for 5 minutes.

Authentication

x-api-key
string
required
Your merchant API key (e.g., mk_live_1234567890abcdef1234567890abcdef).
x-maash-user-type
string
required
Must be set to checkout.

Query parameters

amount_usd
number
required
Amount in USD. Must be between 0.01 and 1000000.
token
string
required
Token symbol. Accepted values: USDC, USDT.
chain
string
required
Chain identifier. Accepted values: ethereum, polygon, arbitrum, optimism, base, bsc, solana, tron.

Response

data
object
quote_id
string
Unique quote identifier (e.g., qt_01ARZ3NDEKTSV4RRFFQ69G5FAV).
amount_usd
number
Requested USD amount.
token
string
Token symbol.
chain
string
Chain identifier.
token_amount
string
Token equivalent of the USD amount (before fees).
rate
number
USD-to-token exchange rate used.
fee_usd
number
Fee amount in USD.
fee_token
string
Fee amount in tokens.
total_token_amount
string
Total tokens the customer must send (amount + fee).
expires_at
string
ISO 8601 timestamp when this quote expires.
valid_for_seconds
number
Number of seconds until this quote expires (default: 300).
created_at
string
ISO 8601 timestamp when the quote was created.
curl "https://api.maash.io/checkout/quote?amount_usd=100&token=USDC&chain=polygon" \
  -H "x-api-key: mk_live_1234567890abcdef1234567890abcdef" \
  -H "x-maash-user-type: checkout"
{
  "data": {
    "quote_id": "qt_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "amount_usd": 100,
    "token": "USDC",
    "chain": "polygon",
    "token_amount": "100.000000",
    "rate": 1,
    "fee_usd": 0.1,
    "fee_token": "0.100000",
    "total_token_amount": "100.100000",
    "expires_at": "2024-01-31T15:30:00Z",
    "valid_for_seconds": 300,
    "created_at": "2024-01-31T15:25:00Z"
  }
}