Sandbox guide
Use test keys to integrate without going live. Same API paths as production.
Quick start
- Open Dashboard → Developers and create a test key (pp_test_…). Copy it once.
- Call /api/v1/account with Authorization: Bearer pp_test_… to verify auth — stats are test-only.
- Create an invoice via POST /api/v1/invoices (tagged as test). Live dashboard and live keys will not see it.
- Simulate payment: POST /api/v1/invoices/{publicId}/simulate-pay with the same test key — no real PSP, no wallet credit.
Sandbox isolation (this slice)
Test keys only create and read test-tagged invoices and customers. Live keys and the merchant dashboard only see live data. Wallet endpoints return empty stubs for test keys. There is no separate sandbox database — isolation is by environment tag on the same DB.
Sample curls
# Health + test-scoped stats
curl -s "https://paypola.com/api/v1/account" \
-H "Authorization: Bearer pp_test_YOUR_KEY"
# Create a test invoice
curl -s -X POST "https://paypola.com/api/v1/invoices" \
-H "Authorization: Bearer pp_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Sandbox invoice","amountEgp":10,"customerName":"Test Buyer"}'Simulate a paid invoice
curl -s -X POST "https://paypola.com/api/v1/invoices/PUBLIC_ID/simulate-pay" \ -H "Authorization: Bearer pp_test_YOUR_KEY"