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.
<?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
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:
- Dashboard API Keys - Create and manage your keys
- Dashboard Webhooks - Configure webhook endpoints
- Developer Hub - Complete developer tools
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"
}'
<?php
$ch = curl_init('https://vumba.wasmer.app/api/v1/payments');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer sk_live_...',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode([
'amount' => '25.00',
'currency' => 'USD',
'reference' => 'ORDER-1001',
'description' => 'Product purchase'
])
]);
$response = curl_exec($ch);
$payment = json_decode($response);
// Redirect customer to checkout
header('Location: ' . $payment->data->checkout_url);
const response = await fetch('https://vumba.wasmer.app/api/v1/payments', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_live_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: '25.00',
currency: 'USD',
reference: 'ORDER-1001',
description: 'Product purchase'
})
});
const payment = await response.json();
// Redirect customer to checkout
window.location.href = payment.data.checkout_url;
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.
Authorization: Bearer sk_live_your_secret_key_here
| Key Prefix | Use Case | Environment |
|---|---|---|
sk_live_... | Secret key for production payments | Server-side only, never expose to clients |
pk_live_... | Public key for client-side integrations | Safe to use in browser/mobile apps |
Creating API Keys
- Log in to your VumbaCash Dashboard
- Navigate to Developers → API Keys
- Click "Create API Key" and give it a descriptive name
- Copy the key immediately - it won't be shown again
- Store it securely in your environment variables
Responses & errors
Every response has a success flag. Successful responses carry a data object, and failures carry an error object.
{
"success": true,
"data": {
...
}
}
{
"success": false,
"error": {
"code": "invalid_request",
"message": "Amount must be greater than zero",
"details": {}
}
}
Payments API
Create a payment to get a hosted checkout URL, then track its status as your customer pays.
Create a payment
| Field | Type | Description |
|---|---|---|
amountrequired | string | Positive decimal amount, for example "25.00". |
currencyrequired | string | Currency code: USD or ZiG. |
referenceoptional | string | Your own reference or order ID. |
descriptionoptional | string | What the payment is for. |
customer_idoptional | string | A Vumba Cash customer ID. |
metadataoptional | object | Custom 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"
}
}
{
"success": true,
"data": {
"id": "pay_abc123...",
"status": "pending",
"amount": "25.00",
"currency": "USD",
"reference": "ORDER-1001",
"checkout_url": "https://pay.vumbacash.co.zw/c/cs_token...",
"expires_at": "2026-10-02T21:00:00Z",
"created_at": "2026-10-01T21:00:00Z"
}
}
Other endpoints
List your payments. Supports limit (default 50, max 100), offset, status and currency query parameters.
Retrieve a single payment and its current status.
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.
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
- Go to Dashboard → Webhooks
- Click "Add Endpoint" and enter your webhook URL
- Select which events to subscribe to (or choose "All Events")
- Save the signing secret securely - you'll need it to verify webhook signatures
Events
| Event | Sent when |
|---|---|
payment.completed | The payment was successful. |
payment.failed | The payment failed or was declined. |
payment.pending | The payment is awaiting confirmation. |
refund.completed | A refund was processed successfully. |
Webhook payload example
{
"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
$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']);
}
Testing & Sandbox Mode
Test your integration without real money using VumbaCash sandbox mode. All test payments use simulated payment providers.
Test payment methods
When testing payments in the checkout, use these test credentials:
| Payment Method | Test Details | Result |
|---|---|---|
| EcoCash | Phone: 0777 123 456 | Success |
| OneMoney | Phone: 0719 123 456 | Success |
| Card | Number: 4242 4242 4242 4242CVV: Any 3 digits Expiry: Any future date | Success |
| Card (Decline) | Number: 4000 0000 0000 0002 | Declined |
Testing webhooks
To test webhooks locally during development:
- Use a service like ngrok to expose your local server
- Add your ngrok URL as a webhook endpoint in the dashboard
- Create a test payment and complete it in the checkout
- Verify your local server receives the webhook event
Viewing test data
All test payments, customers, and transactions are visible in your dashboard:
- Payments Dashboard - View all test payments
- Customers Dashboard - View test customers
- Wallet - View your test wallet balance and transactions
Ready to start building?
Create a free account, grab your test keys and take your first sandbox payment in minutes.
Create account