Mock Provider
This local provider lets you test the ASAP PAY Gateway without touching the real provider. It returns JSON showing the request method, path, query string, redacted headers, and body received by the provider side.
Base URL: http://127.0.0.1:9090
Routes
| Route | Behavior |
|---|---|
GET /healthz | Returns mock provider health. |
POST /v1/payments | Returns 201, a mock provider reference, and request details. |
ANY /echo | Returns request details for any method. |
ANY /* | Returns a generic echo response. |
Direct Provider Test
curl -X POST http://127.0.0.1:9090/v1/payments \
-H "Content-Type: application/json" \
-d '{"amount":1000,"currency":"NGN"}'
Gateway Test
curl -X POST http://127.0.0.1:8080/provider \
-H "X-Gateway-Public-Key: your-gateway-public-key" \
-H "X-Provider-URL: http://127.0.0.1:9090/v1/payments" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: local-test-001" \
-d '{"amount":1000,"currency":"NGN"}'