Best Practices for High Fault-Tolerance with Fiuu
Overview
To ensure a highly fault-tolerant integration with Fiuu Payment Services and avoid missing any payment status updates, merchants are advised to follow these best practices. Implementing these strategies helps maintain transaction integrity and reliability even during partial service outages.
General Best Practices
1. Frontend Status via Browser Redirection
- Most payment methods use frontend redirection, allowing both the merchant and customer to view real-time payment status updates.
- Do not rely solely on frontend notifications due to security risks (e.g., Man-in-the-Middle attacks).
- Always:
- Perform full integrity check and parameter validation.
- Enable Extended VCode to ensure data integrity and authenticity.
2. Backend Notification / Delayed Callback
- Backend notifications are triggered based on payment channel, method type, or conditions.
- This approach is more reliable as it establishes direct server-to-server communication.
- Merchants should:
- Validate that the source of the notification originates from Fiuu’s authorized servers.
- Update internal transaction status only after successful validation.
3. Status Re-query
- If a payment transaction exceeds the expected response time, use the Status Inquiry API to re-check and obtain the most up-to-date transaction status.
- Implement periodic checks until final status is confirmed.
✅ Final Recommendation
Confirm transaction status when at least two out of three sources (frontend, backend, inquiry) match.
Mobile SDK Fault-Tolerance Tips (Partial Outage Scenario)
To help mobile SDK achieve high fault-tolerance during partial service outages:
- Local Transaction Queue: Cache payment requests locally until confirmation is received or connectivity is restored.
- Retry Logic with Exponential Backoff: Retry failed API calls intelligently without spamming servers.
- Fallback to Status Inquiry: If callbacks don’t arrive, trigger a status re-query after a safe interval.
- Graceful Degradation: Show user-friendly messages like “Payment is being verified” instead of failing outright.
- Offline Mode Handling: Allow users to continue browsing and sync payment status later.
- Push Notifications or WebSocket: Use alternative channels for status updates when HTTP callbacks fail.
Updated 28 days ago
