Skip to main content

Sandbox Environment

Use your sk_test_ API key to access the sandbox. The same production endpoint is used — the key determines the environment.

MOCK Operator

The MOCK operator simulates the full mobile money payment flow without real charges. Use it for:
  • Development and testing
  • CI/CD pipelines
  • Demo environments
{
  "amount": 10000,
  "operator": "MOCK",
  "operatorPhone": "+2389001234"
}

Simulating Payment Flows

In sandbox mode, payments are created in CREATED status. Use the confirm endpoint to simulate the customer approving the payment:
# Create a payment
POST /v1/payments
 status: "CREATED"

# Simulate customer confirmation
POST /v1/payments/{id}/confirm
 status: "DEBITED"
The confirm endpoint is only available in sandbox mode. In production, payments are confirmed by the customer through their mobile money app.

Testing Webhooks

Webhooks work the same way in sandbox and production. Set up a webhook endpoint and you’ll receive events for sandbox payments too.
Use a tool like ngrok to expose your local development server for webhook testing.

Moving to Production

When you’re ready to go live:
  1. Create a sk_live_ API key in the dashboard
  2. Replace MOCK with the real operator (CVMOVEL or UNITEL_TMAIS)
  3. Ensure your webhook endpoints are accessible from the internet
  4. Test with a small real payment before going live