Skip to main content

Security

1. Protect Your API Keys

Never expose API keys in frontend code or public repositories!

2. Backend Only

Always call Navio API from your backend, never from frontend:

3. Validate Inputs

4. Verify Before Fulfillment

Always verify payment status on backend before fulfilling orders!

Error Handling

Handle API Errors

Testing

Use Sandbox

Test with sandbox keys before production:

Test Scenarios

Test these cases:
  • ✅ Successful payment
  • ✅ Failed payment
  • ✅ Expired payment link (20 min)
  • ✅ Customer returns without paying
  • ✅ API errors

Production Checklist

Before going live:

Security

  • API keys in environment variables
  • No frontend API calls
  • Input validation implemented
  • HTTPS enabled

Functionality

  • Order creation works
  • Payment links generate correctly
  • Status checking works
  • Order fulfillment only on CONFIRMED
  • Cron job running

Testing

  • Sandbox testing complete
  • All edge cases tested
  • Error handling verified

Monitoring

  • Error logging enabled
  • Can view pending orders
  • Can manually check status

Common Mistakes

Avoid these:
  • ❌ Hardcoding API keys
  • ❌ Calling API from frontend
  • ❌ Not saving paymentRef
  • ❌ Fulfilling without verification
  • ❌ No error handling
  • ❌ Checking too frequently (respect rate limits)
  • ❌ Not testing in sandbox first

Database Best Practices

Add indexes for performance:

Logging

Log important events:

Next Steps

API Reference

Complete API documentation

Contact Support

Get help from our team

Dashboard

Monitor your payments

Security Guide

Advanced security practices

You’re Ready! 🎉

You now have everything to accept payments with Navio. Start with sandbox, test thoroughly, then go live!