This API will help to get Virtual Cards Details.
Introduction
The PruPal Create Card API enables you to get Virtual Cards Details. This documentation offers comprehensive guidance on utilizing this API effectively.
Request Parameters
The API expects the following parameters in the request:
Property | Presence | Type | Description |
---|---|---|---|
api_key | Mandatory | string | Collect API KEY From Account |
card_id | Mandatory | string | Card ID |
Success Response Parameters
Property | Type | Description |
---|---|---|
status | string | true |
message | string | Card Info Get Successfully |
card_holder | string | My Name |
card_type | string | Visa |
card_number | string | 16 Digit |
card_expiry | string | 05/29 |
card_cvc | string | 123 |
balance | string | 0 |
Error Response Parameters
Property | Type | Description |
---|---|---|
status | string | false |
message | string | The message associated with the status, explains the status. |
Sample Request
<?php
$curl = curl_init();
$data = [
'api_key' => 'YOUR_API_KEY',
'card_id' => '7445'
];
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.prupal.com/card-details',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'accept: application/json',
'content-type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
]);
$response = curl_exec($curl);
if (curl_errno($curl)) {
$error_msg = curl_error($curl);
}
curl_close($curl);
if (isset($error_msg)) {
// Handle error here
echo "cURL Error: " . $error_msg;
} else {
// Handle response here
echo "Response: " . $response;
}
Sample Response
{
"status": "true",
"message": "Card Info Get Successfully",
"card_holder": "My Card",
"card_type": "Visa",
"card_number": "495867648575684565845",
"card_expiry": "04/25",
"card_cvc": "123",
"balance": "15"
}