DepositError instance with a machine-readable code property. The error class is the same as the web SDK, but the mobile SDK has additional error codes for browser and deep link failures.
DepositError
Error codes
Mobile-specific codes
| Code | Meaning | User-facing message |
|---|---|---|
BROWSER_FAILED | Failed to open the in-app browser (e.g. openUrl threw an error). | ”Unable to open the payment browser. Please try again.” |
BROWSER_DISMISSED | User dismissed the in-app browser before completing the payment. | ”The payment browser was closed before the transfer completed.” |
DEEP_LINK_INVALID | The callback deep link was malformed or missing required parameters. | ”The payment callback was malformed. Please try again.” |
Shared codes (same as web SDK)
| Code | Meaning | User-facing message |
|---|---|---|
SIGNER_REQUEST_FAILED | Signer returned a non-2xx response. | ”Unable to start the payment. Please try again.” |
SIGNER_NETWORK_ERROR | Network failure reaching the signer. | ”Unable to reach the payment server. Check your connection and try again.” |
SIGNER_RESPONSE_INVALID | Signer response missing required fields (merchantId, payload, signature, preview). | ”The payment server returned an unexpected response.” |
SIGNER_TIMEOUT | Signer did not respond within signerTimeoutMs. | ”The payment server took too long to respond. Please try again.” |
FLOW_TIMEOUT | Entire flow exceeded flowTimeoutMs. | ”The payment flow timed out. Please try again.” |
INVALID_REQUEST | Bad input (missing amount, invalid address, destroyed instance, etc.). | ”Invalid payment request. Please check your input.” |
getDisplayMessage
Returns a user-friendly display string for aDepositError. You can show this directly in your UI.