One API for payments in Zimbabwe. Built for builders.

Create a payment, send your customer to checkout, and get a webhook when it is paid. No separate integration for every payment rail.

Sandbox included REST + webhooks Idempotent requests
PHP
<?php

$gateway = new VumbaCash\Gateway([
    'secret_key' => 'sk_test_...'
]);

$payment = $gateway->payments()->create([
    'amount'    => '25.00',
    'currency'  => 'USD',
    'reference' => 'ORDER-1001'
]);

// Send your customer here
echo $payment->checkout_url;

Getting started

Vumba Cash gives you a simple REST API for accepting payments in Zimbabwe. Requests and responses are JSON, and every request is authenticated with an API key.

Base URL

URL
https://vumba.wasmer.app/api/v1

All API endpoints are relative to this base URL. For example, to create a payment, POST to https://vumba.wasmer.app/api/v1/payments.

Get your API keys

Sign in to your dashboard and navigate to Developers → API Keys to generate your keys:

Create your first payment

Once you have your API key, creating a payment is straightforward. Here's a complete example:

curl -X POST 'https://vumba.wasmer.app/api/v1/payments' \
  -H 'Authorization: Bearer sk_live_your_secret_key_here' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": "25.00",
    "currency": "USD",
    "reference": "ORDER-1001",
    "description": "Product purchase"
  }'

The response includes a checkout_url. Redirect your customer there to complete the payment. When they pay, we'll notify your server with a webhook.

Authentication

Authenticate by sending your API key as a Bearer token in the Authorization header. You can create and manage your keys from your dashboard.

HTTP header
Authorization: Bearer sk_live_your_secret_key_here
Key PrefixUse CaseEnvironment
sk_live_...Secret key for production paymentsServer-side only, never expose to clients
pk_live_...Public key for client-side integrationsSafe to use in browser/mobile apps

Creating API Keys

  1. Log in to your VumbaCash Dashboard
  2. Navigate to Developers → API Keys
  3. Click "Create API Key" and give it a descriptive name
  4. Copy the key immediately - it won't be shown again
  5. Store it securely in your environment variables
Keep secret keys secure! Never commit them to version control, include them in client-side code, or share them publicly. Use environment variables to store them safely.

Responses & errors

Every response has a success flag. Successful responses carry a data object, and failures carry an error object.

{
    "success": true,
    "data": {
        ...
    }
}

Payments API

Create a payment to get a hosted checkout URL, then track its status as your customer pays.

Create a payment

POSThttps://vumba.wasmer.app/api/v1/payments
FieldTypeDescription
amountrequiredstringPositive decimal amount, for example "25.00".
currencyrequiredstringCurrency code: USD or ZiG.
referenceoptionalstringYour own reference or order ID.
descriptionoptionalstringWhat the payment is for.
customer_idoptionalstringA Vumba Cash customer ID.
metadataoptionalobjectCustom key-value data stored with the payment.
{
    "amount": "25.00",
    "currency": "USD",
    "reference": "ORDER-1001",
    "description": "Garden Tags",
    "metadata": {
        "order_id": "1001",
        "customer_name": "John Doe"
    }
}

Other endpoints

GEThttps://vumba.wasmer.app/api/v1/payments

List your payments. Supports limit (default 50, max 100), offset, status and currency query parameters.

GEThttps://vumba.wasmer.app/api/v1/payments/{id}

Retrieve a single payment and its current status.

POSThttps://vumba.wasmer.app/api/v1/payments/{id}/cancel

Cancel a payment that has not been completed yet.

Idempotency

Network requests fail. To retry a request without creating a duplicate payment, send a unique Idempotency-Key header. Repeating the same key returns the original result.

HTTP header
Idempotency-Key: ORDER-1001-ATTEMPT-1

Webhooks

Webhooks notify your server in real time when a payment changes status. Always confirm a payment from a webhook, not from the customer returning to your site.

Setting up webhooks

  1. Go to Dashboard → Webhooks
  2. Click "Add Endpoint" and enter your webhook URL
  3. Select which events to subscribe to (or choose "All Events")
  4. Save the signing secret securely - you'll need it to verify webhook signatures

Events

EventSent when
payment.completedThe payment was successful.
payment.failedThe payment failed or was declined.
payment.pendingThe payment is awaiting confirmation.
refund.completedA refund was processed successfully.

Webhook payload example

JSON
{
    "event": "payment.completed",
    "data": {
        "id": "pay_abc123...",
        "status": "successful",
        "amount": "25.00",
        "currency": "USD",
        "reference": "ORDER-1001",
        "customer_id": "cus_xyz789...",
        "created_at": "2026-11-07T10:30:00Z",
        "completed_at": "2026-11-07T10:35:22Z"
    },
    "timestamp": "2026-11-07T10:35:23Z"
}

Verify the signature

Each webhook carries an X-VumbaCash-Signature header, an HMAC-SHA256 of the raw request body made with your webhook secret. Always verify this signature before processing the event.

PHP
<?php

$payload   = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_VUMBACASH_SIGNATURE'] ?? '';
$secret    = 'whsec_your_webhook_secret';

$expected = hash_hmac('sha256', $payload, $secret);

if (hash_equals($expected, $signature)) {
    // Webhook is valid - process the event
    $event = json_decode($payload, true);
    
    if ($event['event'] === 'payment.completed') {
        // Update your database
        $paymentId = $event['data']['id'];
        $reference = $event['data']['reference'];
        
        // Mark order as paid in your system
        markOrderAsPaid($reference);
    }
    
    // Always respond with 200 OK
    http_response_code(200);
    echo json_encode(['received' => true]);
} else {
    // Invalid signature - reject the webhook
    http_response_code(400);
    echo json_encode(['error' => 'Invalid signature']);
}
Respond quickly. Your webhook endpoint should respond with a 200 status code within 5 seconds. Process the event asynchronously if needed. We'll retry failed webhooks up to 3 times with exponential backoff.

Testing & Sandbox Mode

Test your integration without real money using VumbaCash sandbox mode. All test payments use simulated payment providers.

Automatic sandbox mode. The platform automatically runs in sandbox mode for testing. No real money is processed. Use the dashboard normally to create test payments.

Test payment methods

When testing payments in the checkout, use these test credentials:

Payment MethodTest DetailsResult
EcoCashPhone: 0777 123 456Success
OneMoneyPhone: 0719 123 456Success
CardNumber: 4242 4242 4242 4242
CVV: Any 3 digits
Expiry: Any future date
Success
Card (Decline)Number: 4000 0000 0000 0002Declined

Testing webhooks

To test webhooks locally during development:

  1. Use a service like ngrok to expose your local server
  2. Add your ngrok URL as a webhook endpoint in the dashboard
  3. Create a test payment and complete it in the checkout
  4. Verify your local server receives the webhook event

Viewing test data

All test payments, customers, and transactions are visible in your dashboard:

Ready to start building?

Create a free account, grab your test keys and take your first sandbox payment in minutes.

Create account