Rate Locked
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
- You Set Fiat Price
Create a payment with amount in EUR, USD, or another fiat currency.
- Customer Selects Crypto
At checkout, customer chooses their preferred cryptocurrency.
- Rate is Locked
The exchange rate is locked for the payment duration (typically 30 minutes).
- 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:
curl -X GET "https://api.sanpay.io/api/sdk/v1/assets?currency=EUR" \ -H "X-Public-Key: pk_live_xxxx"{ "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:
Expired Payment
Underpayment