Authentication
Store Credentials Securely
- ✅ Good
- ❌ Bad
Implement Token Refresh
Proactive Refresh Strategy
Proactive Refresh Strategy
Don’t wait for tokens to expire. Refresh them before expiration.
Handle 401 Errors
Handle 401 Errors
Always catch authentication errors and retry after refreshing token.
Order Management
Always Acknowledge Orders
1
Fetch Order
2
Import to POS
Store order in your local database/system
3
Acknowledge Immediately
Use Correct IDs
- ✅ Correct
- ❌ Wrong
Display: Use
API Calls: Use
id (integer) for showing to usersAPI Calls: Use
payment_key (UUID) for all operationsHandle All Statuses
Your POS should gracefully handle orders in any status:Polling Strategy
Respect Rate Limits
Implement Exponential Backoff
Cache Menu Data
Error Handling
Implement Comprehensive Error Handling
Log Errors with Context
Data Validation
Validate Before Sending
- Accept Order
- Cancel Order
Validate Received Data
Performance
Use Connection Pooling
Implement Request Timeouts
Batch Operations When Possible
Testing
Test All Scenarios
Happy Path Testing
Happy Path Testing
- Place test order
- Accept order
- Mark on the way
- Complete order
- Verify status at each step
Error Scenario Testing
Error Scenario Testing
- Invalid credentials
- Expired token
- Rate limiting
- Network timeouts
- Invalid order IDs
- Missing required fields
Edge Case Testing
Edge Case Testing
- Orders with no modifiers
- Orders with multiple modifier groups
- Scheduled orders
- Cash vs card payments
- Different courier types
- Order repetition after status change
Test Environment
Monitoring
Track Key Metrics
Set Up Alerts
Monitor for:- High error rates (> 5%)
- Slow response times (> 5 seconds)
- Missing orders (gaps in order IDs)
- Authentication failures
- Rate limit hits
Security Checklist
Complete Security Checklist
Complete Security Checklist
- API credentials stored in environment variables
- Credentials encrypted at rest
- HTTPS only (no HTTP fallback)
- SSL certificates validated
- Access tokens never logged
- Error messages don’t expose sensitive data
- Request/response logging excludes credentials
- Regular credential rotation policy
- Monitoring for unauthorized access
- Rate limiting handled gracefully
Summary
Do's
- Store credentials securely
- Acknowledge orders immediately
- Use payment_key for API calls
- Respect rate limits (30s)
- Cache menu data locally
- Implement error handling
- Validate all data
- Log errors with context
- Monitor API health
- Test thoroughly
Don'ts
- Hard-code credentials
- Forget to acknowledge orders
- Use integer ID for operations
- Poll more than every 30s
- Fetch menu on every request
- Ignore error responses
- Skip data validation
- Log sensitive data
- Deploy without monitoring
- Skip testing
Need Help?
Have questions about best practices? Contact our integration support team.