Get all Cards
This endpoint is to retrieves a list of all cards created under your account
POST
{{base_url}}/business/getcards
Headers
Name
Type
Description
Authorization*
String
SECRET_KEY
Your secret keys are to be kept secret and only stored on your servers. Do not pass your secret key to the front-end language where it can be exploited.
Take a look at how you might do this:
curl --location '{{base_url}}/business/getcards' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SECRET_KEY' \
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: '{{base_url}}/business/getcards'
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer SECRET_KEY'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{base_url}}/business/getcards',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer SECRET_KEY'
};
var request = http.Request('POST', Uri.parse('{{base_url}}/business/getcards'));
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
Sample response
{
"status": true,
"message": "Card List Retrieved",
"mycards": [
{
"currency": "USD",
"cardid": "xfa2ae52b0b9-4b-a7fe3800e-3-9",
"holdername": "JOHN DOE",
"card_type": "Virtual",
"exp": "04/28",
"pan": "5088********2829",
"cardicon": "https://oacloud.oneappgo.com/media_library/oneapp-personal/65b0dc7a31f253.37195213.png",
"cardstatus": "active",
"cardbrand": "VISA",
"cardtype": "Virtual",
"cardpan": "5088********2829",
"expiryyr": "28",
"expirymnt": "04",
"customerid": "BLD2085440568",
"created_at": "Fri, 14-03-2025 02:58 pm",
"cvv": "890"
},
{
"currency": "USD",
"cardid": "0f7293bf9283a4-0-aeaeebx5b-0",
"holdername": "JOHN DOE",
"card_type": "Virtual",
"exp": "04/28",
"pan": "5088********2829",
"cardicon": "https://oacloud.oneappgo.com/media_library/oneapp-personal/65b0db7ee31931.79462866.png",
"cardstatus": "freezed",
"cardbrand": "MASTERCARD",
"cardtype": "Virtual",
"cardpan": "5088********2829",
"expiryyr": "28",
"expirymnt": "04",
"customerid": "BLD2085440568",
"created_at": "Fri, 14-03-2025 02:58 pm",
"cvv": "890"
}
]
}
Last updated
Was this helpful?