| title | Payment Error Handling |
|---|---|
| description | Handling errors in payments |
This guide provides information about error handling in payments in UMA as a Service.
When creating quotes or executing payments, you may encounter errors related to amount limits, currency mismatches, or provider-level constraints. Understanding these errors helps you build a robust payment experience.
This error occurs when the transaction amount falls outside the allowed limits. The allowed range is determined by the min and max values returned in the receiver lookup response for the target currency.
For example, if the provider requires a minimum trade of 0.0001 BTC and the current BTC/EUR rate makes that approximately €7, the min for EUR will be at least 700 (in cents), even if the platform's configured minimum is 100 (€1.00).
To avoid this error:
- Always check the
minandmaxvalues from the receiver lookup response before presenting amount options to your users - Validate amounts client-side before creating a quote
- If locking the sending side, estimate the receiving amount using the
estimatedExchangeRateand verify it falls within range
{
"status": 400,
"code": "AMOUNT_OUT_OF_RANGE",
"message": "Amount is outside the allowed min/max range"
}This error indicates a retryable issue during the quote process. You can safely retry the request.