Appearance
Initiate Charge
Create a payment invoice and return a checkout URL.
| Method | POST |
| URL | /api/m1/initiate-charge |
| Auth | Bearer ZMPRO-… (live) or ZMDEV-… (test) |
Body parameters
| Field | Required | Example | Description |
|---|---|---|---|
tx_ref | Yes | tewrdvweerrr-04 | Your unique invoice reference. Must be unique per merchant. |
amount | Yes | 100 | Amount to charge or transfer. |
currency | Yes | NGN | ISO currency code (e.g. NGN, USD). |
payment_options | No | all | Comma list of rails, or all. Null uses merchant defaults. |
expired_time | Yes | 0 | Invoice TTL in minutes. 0 = no expiry. |
redirect_url | No | https://example.com/payment-status | Checkout return URL (overrides merchant setting). |
meta | No | — | Optional JSON metadata. |
customer | Yes | — | Customer object. Required for some payment options. |
customizations | No | — | Checkout title, description, logo. |
Headers
| Header | Value |
|---|---|
Authorization | Bearer ZMPRO-your-live-api-key |
Content-Type | application/json |
Request
bash
curl -X POST 'https://api.vizo.app/api/m1/initiate-charge' \
-H 'Authorization: Bearer ZMPRO-your-live-api-key' \
-H 'Content-Type: application/json' \
-d '{
"tx_ref": "tewrdvweerrr-04",
"amount": 100,
"currency": "NGN",
"payment_options": "all",
"expired_time": 0,
"redirect_url": "https://example.com/payment-status",
"meta": "",
"customer": "",
"customizations": ""
}'ts
const response = await fetch('https://api.vizo.app/api/m1/initiate-charge', {
method: 'POST',
headers: {
Authorization: 'Bearer ZMPRO-your-live-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"tx_ref": "tewrdvweerrr-04",
"amount": 100,
"currency": "NGN",
"payment_options": "all",
"expired_time": 0,
"redirect_url": "https://example.com/payment-status",
"meta": "",
"customer": "",
"customizations": ""
}),
});
const data = await response.json();
console.log(data);py
import requests
url = "https://api.vizo.app/api/m1/initiate-charge"
headers = {
"Authorization": "Bearer ZMPRO-your-live-api-key",
"Content-Type": "application/json",
}
payload = {
"tx_ref": "tewrdvweerrr-04",
"amount": 100,
"currency": "NGN",
"payment_options": "all",
"expired_time": 0,
"redirect_url": "https://example.com/payment-status",
"meta": "",
"customer": "",
"customizations": ""
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.status_code)
print(response.json())php
<?php
$ch = curl_init('https://api.vizo.app/api/m1/initiate-charge');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ZMPRO-your-live-api-key',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'tx_ref' => 'tewrdvweerrr-04',
'amount' => 100,
'currency' => 'NGN',
'payment_options' => 'all',
'expired_time' => 0,
'redirect_url' => 'https://example.com/payment-status',
'meta' => '',
'customer' => '',
'customizations' => ''
], JSON_UNESCAPED_SLASHES),
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;Responses
Fail Initiate Charge — 200 OK
json
{
"status": "FAILED",
"data": null,
"message": "Unique tx_ref required"
}Initiate Charge — 200 OK
json
{
"status": "SUCCESS",
"data": {
"mode": "redirect",
"url": "https://dev.vizo.app:8086/i/g9KkkA38Ygn9"
},
"message": "Charge initiated"
}