Skip to main content

Authentication

Store Credentials Securely

Never hard-code API credentials in your source code!

Implement Token Refresh

Don’t wait for tokens to expire. Refresh them before expiration.
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

Don’t wait! Acknowledge right after importing.
If you don’t acknowledge orders, they will repeat in every /get-current call, causing duplicate imports!

Use Correct IDs

Display: Use id (integer) for showing to users
API Calls: Use payment_key (UUID) for all operations

Handle All Statuses

Your POS should gracefully handle orders in any status:

Polling Strategy

Respect Rate Limits

/orders/get-current and /foods/get-foods have 30-second cooldowns.

Implement Exponential Backoff

Cache Menu Data

Don’t fetch the full menu on every order! Cache it locally.

Error Handling

Implement Comprehensive Error Handling

Log Errors with Context

Data Validation

Validate Before Sending

Validate Received Data

Performance

Use Connection Pooling

Implement Request Timeouts

Batch Operations When Possible

Testing

Test All Scenarios

  • Place test order
  • Accept order
  • Mark on the way
  • Complete order
  • Verify status at each step
  • Invalid credentials
  • Expired token
  • Rate limiting
  • Network timeouts
  • Invalid order IDs
  • Missing required fields
  • 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

  • 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.