Skip to content

Exchange Rates & Conversion

Exchange Rates & Conversion

SanPay handles real-time fiat-to-crypto conversion automatically. Set prices in your local currency, and we calculate the exact crypto amount at checkout.

How Conversion Works

  1. You Set Fiat Price

    Create a payment with amount in EUR, USD, or another fiat currency.

  2. Customer Selects Crypto

    At checkout, customer chooses their preferred cryptocurrency.

  3. Rate is Locked

    The exchange rate is locked for the payment duration (typically 30 minutes).

  4. Exact Amount Calculated

    We display the precise crypto amount required, including any fees.

Spread & Effective Rates

A small spread is applied to market rates to ensure reliable settlement:

Term Description
Raw Rate Market exchange rate from aggregated sources
Spread Small percentage (typically 0.5%) added for price protection
Effective Rate The actual rate used for conversion (raw + spread)

Price Locking

Once the customer selects a cryptocurrency, the rate is locked for a configurable period:

Default: 30 minutes

  • Customer knows exactly how much to send
  • Merchant receives the expected fiat value
  • Protected from short-term volatility

Fetch Current Rates

Get real-time exchange rates via the assets API:

Request
curl -X GET "https://api.sanpay.io/api/sdk/v1/assets?currency=EUR" \
-H "X-Public-Key: pk_live_xxxx"
Response
{
"assets": [
{
"symbol": "BTC",
"chain": { "id": "BTC", "name": "Bitcoin" },
"rate": {
"raw": 89385.00,
"effective": 88938.28
},
"spread": 0.5,
"fee": { "type": "PERCENTAGE", "value": 1 }
}
]
}

Handling Volatility

Cryptocurrency prices can move significantly. Our system handles these scenarios:

Rate Locked

Once checkout starts, the rate is fixed regardless of market movement.

Expired Payment

If the lock period expires, customer must restart with current rates.

Underpayment

If customer sends less than required, we notify you to handle appropriately.