Overview
Best practices for polling API endpoints to track order status efficiently.Basic Polling Pattern
Service-Specific Polling
Mobile Top-Ups (5 minutes max)
Internet Top-Ups (5 minutes max)
Gift Cards (10 minutes max)
Best Practices
Set Timeouts
Always set maximum polling duration
Handle Errors
Catch and handle polling timeouts
Log Progress
Track polling attempts for debugging
Final States
Define clear terminal states
Recommended Settings
| Service | Interval | Max Duration | Final States |
|---|---|---|---|
| Mobile | 5s | 5 min | FULFILLED, REFUNDED, UNKNOWN_ERROR |
| Internet | 5s | 5 min | FULFILLED, REFUNDED, QUEUED |
| Gift Cards | 5s | 10 min | FULFILLED, PARTIALLY_FILLED, REFUNDED |

