POST https://mybundlepay.com/ng/api/v1/card/issue-card
KEY USAGE POLICY
Important: You must always begin your integration using your
test_secret_key
. This ensures you can simulate requests and validate
your flows without creating real cards.
- Use
test_secret_key
for all development, testing, and sandbox calls. - Only switch to
secret_key
(Live Key) after your integration has been fully tested and approved. - You must fund your
USD wallet
before requesting live card issuance. - You must create a
customer
first using the/api/v1/card/customers/enroll
endpoint before issuing a card.
⚠️ Skipping test mode or not funding your USD wallet will cause failed card issuance.
HEADERS
Authorization * string
Pass your {secret_key}
as a Bearer token in the request header.
Content-Type * application/json
All requests must be sent in JSON format.
BODY PARAMS
MyBundlePay Customer ID (returned from customer enrollment endpoint).
Must be USD
for card issuance.
Currently supported: VIRTUAL
.
Set to true
if you want card issuance approved automatically.
Card network brand (e.g. MASTERCARD
).
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://mybundlepay.com/ng/api/v1/card/issue-card",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"customer_id" => "f743070f-d37f-4e7e-bddc-4865fe069927",
"currency" => "USD",
"type" => "VIRTUAL",
"auto_approve" => true,
"brand" => "MASTERCARD"
]),
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 = {
customer_id: "f743070f-d37f-4e7e-bddc-4865fe069927",
currency: "USD",
type: "VIRTUAL",
auto_approve: true,
brand: "MASTERCARD"
};
axios.post("https://mybundlepay.com/ng/api/v1/card/issue-card", 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,
"message": "Card issued successfully",
"data": {
"id": "9f6dcea0-3ca5-41db-9d89-b66e971ed9b0",
"name": "Customer Test",
"card_number": "4651896757142455",
"masked_pan": "465189******2455",
"expiry": "08/27",
"cvv": "123",
"status": "ACTIVE",
"type": "VIRTUAL",
"issuer": "VISA",
"currency": "USD",
"balance": 0,
"auto_approve": true,
"address": {
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US"
},
"created_at": "2022-08-22T22:30:37.422929-05:00",
"updated_at": "2022-08-22T22:30:37.422929-05:00"
}
}
Common Error Responses
Missing token — 401
{
"status": "failed",
"code": "TOKEN_REQUIRED",
"message": "Authorization token is required."
}
Invalid token / business not found — 401 / 404
{
"status": "failed",
"code": "BUSINESS_NOT_FOUND",
"message": "Business not found for this secret key."
}
Customer not found — 404
{
"status": "failed",
"code": "CUSTOMER_NOT_FOUND",
"message": "Customer not enrolled or does not exist."
}
Wallet not funded — 400
{
"status": "failed",
"code": "INSUFFICIENT_FUNDS",
"message": "Please fund your USD wallet before issuing a card."
}
Invalid currency — 400
{
"status": "failed",
"message": "Only USD is supported for card issuance"
}
Validation errors — 400
{
"status": "failed",
"message": {
"customer_id": ["The customer_id field is required."],
"brand": ["The brand field must be one of: MASTERCARD."]
}
}