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

RouteBehavior
GET /healthzReturns mock provider health.
POST /v1/paymentsReturns 201, a mock provider reference, and request details.
ANY /echoReturns 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"}'