REFUNDED
and includes a failReason
field that explains why the refund occurred. Understanding these reasons helps you build better error handling and improve user experience.
For a complete reference of all fail reason codes with detailed explanations, see Error Codes.
How Refund Reasons Work
When you check the status of a quote using the Get Execution Status endpoint, refunded quotes include additional context:Implementation Patterns by Category
Balance and Allowance Issues
Handle insufficient funds and token approval problems:Price and Market Issues
Handle slippage, expired orders, and market conditions:Signature and Authentication Issues
Handle wallet and signing problems:Solana-Specific Issues
Handle Solana blockchain specific problems:Automatic Retry Logic
Implement smart retry mechanisms for recoverable errors:User Experience Patterns
Progress Indicators
Show users what’s happening during retry flows:Error Recovery UI
Provide clear next steps for users:Analytics and Monitoring
Track fail reason patterns to optimize your integration:Best Practices Summary
- Categorize Error Handling: Group similar fail reasons and handle them with consistent patterns
- Implement Smart Retries: Automatically retry recoverable errors with adjusted parameters
- Provide Clear UI: Show users exactly what went wrong and what they need to do
- Monitor Patterns: Track fail reasons to identify optimization opportunities
- Progressive Enhancement: Start with basic error handling and add sophistication over time
Related Resources
Error Codes Reference
Complete reference of all fail reason codes with detailed explanations
Transaction Lifecycle
Understand the complete journey of a quote from creation to completion
Quote Examples
Working examples of quote generation and execution with proper error handling
Slippage Guide
Deep dive into slippage tolerance and price impact management