Skip to main content
Waftpay provides two environments:
  • Sandbox - a safe, isolated environment for development and QA.
  • Production - live traffic and real money movement.
Functionality and payload shapes are parity-aligned between environments. Any differences are noted below.

Base URLs

Use the correct host per environment when composing endpoints.
Note: All APIs are served through the Waftpay gateway. Service paths are identical across environments — the only difference is the host. Sandbox is served from dev.waftpay.io and Production from api.waftpay.io. For example, /auth/v1/generate-token is the same path in both; only swap the host.

Service examples

Authentication (Consumer credentials):
  • Sandbox: https://dev.waftpay.io/auth/v1/generate-token
  • Production: https://api.waftpay.io/auth/v1/generate-token
Payments / Payouts:
  • Sandbox: https://dev.waftpay.io/payments/v1/payouts
  • Production: https://api.waftpay.io/payments/v1/payouts

Switching environments

We recommend parameterizing the base URL and credentials.
Switch to Production by setting:
Heads up: Paths are the same in both environments. When composing full URLs, use /<service>/v1/... and only change the host — api.waftpay.io for Production, dev.waftpay.io for Sandbox.

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
  • 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.reference is 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