- Sandbox — a safe, isolated environment for development and QA.
- Production — live traffic and real money movement.
Base URLs
Use the correct host per environment when composing endpoints.| Environment | Base URL |
|---|---|
| Sandbox | https://sandbox.waftpay.io/api |
| Production | https://api.waftpay.io |
Note: In Sandbox, endpoints are prefixed with/api. In Production, the/apiprefix is not used.
Service examples
Authentication (Consumer credentials):- Sandbox:
https://sandbox.waftpay.io/api/authentication-service/v1/api/generate-token - Production:
https://api.waftpay.io/authentication-service/v1/api/generate-token
- Sandbox:
https://sandbox.waftpay.io/api/payments-api-service/v1/payouts - Production:
https://api.waftpay.io/payments-api-service/v1/payouts
Switching environments
We recommend parameterizing the base URL and credentials.Quick start: per‑environment calls
1) Get an access token
2) Create a payout
Credentials & keys
- Maintain separate consumer keys/secrets and signing keys per environment.
- Keep private keys server‑side only and rotate regularly.
- Enforce least privilege: ensure the Production client has access only to the services it needs.
See Authentication and Signing Requests for how to generate and rotate RSA‑2048 PEM keys and how to compute X-Custom-Signature.
Webhooks
- Use distinct webhook endpoints per environment, e.g.:
- Sandbox →
https://staging.example.com/waftpay/callbacks - Production →
https://merchant.example.com/waftpay/callbacks
- Sandbox →
- Endpoints must be HTTPS and return a fast 2xx to acknowledge.
- Verify the webhook signature using the same signing scheme used for requests.
Behavioural differences
- Limits & throughput: Sandbox is throttled and may have lower throughput than Production.
- Third‑party integrations: In Sandbox, payouts and collections are simulated and will not move real funds.
- Errors: Error shapes and codes are identical across environments (see Errors).
Best practices
- Treat Production credentials and keys as secrets; keep them out of client apps and repos.
- Log the environment, request_id, and extended error code for every call.
- Use idempotency on POSTs and ensure
transaction.referenceis unique per attempt. - Run end‑to‑end tests in Sandbox before promoting changes to Production.
- Monitor webhooks separately per environment and alert on delivery failures.
See also
- Authentication — obtain a consumer-credentials token: /api-reference/auth/auth-token
- Signing Requests — compute and send
X-Custom-Signature: /api-reference/signatures/signature-generate - Errors — interpret extended error codes: /errors
