POST https://mybundlepay.com/ng/api/v1/virtual-card/enroll
KEY USAGE POLICY
Important: Always begin your integration using your
test_secret_key. This allows you to simulate customer enrollments without affecting live data.
- Use
test_secret_keyfor development and sandbox testing. - Switch to
secret_key(Live Key) only after approval. - Test calls return simulated responses and do not create real customers.
- Live calls will create real customers and enroll.
⚠️ Going live without testing may cause failed enrollments or blocked API keys.
HEADERS
Authorization * string
Send your {secret_key} as a Bearer token.
Content-Type * application/json
All requests must use JSON.
IP WHITELISTING
For security, ensure your server IP is whitelisted in your dashboard.
CF-Connecting-IPX-Forwarded-For$request->ip()fallback
BODY PARAMS
| Parameter | Required | Description |
|---|---|---|
customerEmail | ✅ | Customer email address. |
idNumber | ✅ | Government-issued ID number (e.g. BVN, PASSPORT, NIN). |
idType | ✅ | Type of ID. Must be uppercase, e.g. PASSPORT, NIN, BVN. |
firstName | ✅ | Customer’s first name. |
lastName | ✅ | Customer’s last name. |
phoneNumber | ✅ | Customer phone number (with country code, e.g. +234). |
city | ✅ | City of residence. |
state | ✅ | State of residence. |
country | ✅ | Country (full name, e.g. Nigeria). |
zipCode | ✅ | Postal code. |
line1 | ✅ | Address line. |
houseName | - | Optional house or apartment name. |
bvn | ✅ | bvn (BVN number, required if customer is Nigerian ) |
idImage | ✅ | URL of uploaded ID image. |
userPhoto | ✅ | userPhoto (Can be same as idImage) |
dateOfBirth | ✅ | Date of birth in YYYY-MM-DD format. |
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://mybundlepay.com/ng/api/v1/virtual-card/enroll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"customerEmail" => "john.doe@example.com",
"idNumber" => "A12345678",
"idType" => "PASSPORT",
"firstName" => "John",
"lastName" => "Doe",
"phoneNumber" => "+2348012345678",
"city" => "Lagos",
"state" => "Lagos",
"country" => "Nigeria",
"zipCode" => "100001",
"line1" => "12 Allen Avenue",
"houseName" => "Doe Villa",
"bvn" => "22334455667",
"idImage" => "https://example.com/id-image.jpg",
"userPhoto" => "https://example.com/photo.jpg",
"dateOfBirth" => "1990-05-10"
]),
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Bearer {secret_key}"
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
const axios = require('axios');
const data = {
customerEmail: "john.doe@example.com",
idNumber: "A12345678",
idType: "PASSPORT",
firstName: "John",
lastName: "Doe",
phoneNumber: "+2348012345678",
city: "Lagos",
state: "Lagos",
country: "Nigeria",
zipCode: "100001",
line1: "12 Allen Avenue",
houseName: "Doe Villa",
bvn: "22334455667",
idImage: "https://example.com/id-image.jpg",
userPhoto: "https://example.com/photo.jpg",
dateOfBirth: "1990-05-10"
};
axios.post("https://mybundlepay.com/ng/api/v1/virtual-card/enroll", data, {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer {secret_key}"
}
}).then(res => console.log(res.data))
.catch(err => console.error(err.response ? err.response.data : err.message));
Success Response
{
"status": "success",
"code": "USER_ENROLLED",
"message": "Virtual card user successfully enrolled for MyBundlePay.",
"mode": "TEST",
"data": {
"business_id": "xxxxxxx-b3f1-4759-8bb7-xxxxxxxx",
"customer_email": "andry.rakotos@example.com",
"reference": "xxxxxxx-6f13-4b8f-8ed5-xxxxxxxx"
}
}
Error Response (Validation)
{
"status": "failed",
"message": {
"bvn": ["The bvn field is required."]
}
}
Error Response
{
"status": "failed",
"message": "Failed to enroll virtual card user.",
"details": {
"error": "ID type not supported",
"statusCode": 400
}
}