1app
Create Boldd AccountLogin
  • Introduction
  • Authentication
  • Balance
  • Get Exchange Rate
  • Response Code
  • RECEIVE PAYMENTS
    • Payments
      • Initialize Payment
      • Verify Payment
      • Payment List
      • Payment Details
    • Inline/Popup Checkout
    • Payouts / Settlements
      • Payouts List
      • Settlement Transactions
    • Dispute Management
      • Fetch Disputes
      • Accept a Dispute
      • Decline a Dispute
    • Customers List
    • Webhook Notifications
    • Repush Notification
  • Virtual Accounts
    • Get Available Banks
    • Setup Preferred Bank
    • Generate Account
    • Virtual Account List
    • Account Transactions
    • Virtual Account Webhook
      • Notifications history
  • MAKE PAYMENTS
    • Airtime Purchase
    • Send Money
      • Verify Account Number
      • Make Transfer
    • Data Purchase
      • Data Plans
      • Data Bundle
    • Electricity
      • Electricity Billers
      • Verify Meter Number
      • Vend Electricity
    • Cable TV
      • Cable TV List
      • Verify IUC
      • Vend CableTv
    • Bank List
    • Payment Status
  • CUSTOMERS
    • Create Customer
  • VIRTUAL CARDS
    • Create Card Account
    • Cards Issuance
    • Card Funding
    • Card Transactions
    • Get all Cards
    • Cards Details
    • Cards Pan
    • Freeze and Unfreeze Card
  • USD Account
    • Create USD Account
  • IDENTITY
    • BVN Check
    • NIN Checks
  • SUB-ACCOUNTS
    • Create a Sub-Account
    • Attach Bank to a Sub-Account
    • Attach Payout Account
    • Get All Sub-Accounts
    • Sub-Accounts History
    • Sub-Accounts Wallet
  • Miscellaneous
    • Create Wallet
    • Universal Blacklist
  • Contact
    • Contact Us
Powered by GitBook
On this page

Was this helpful?

  1. VIRTUAL CARDS

Cards Details

This endpoint is used to get details of a card without full card number

POST {{base_url}}/business/vcard-details

Headers

Name
Type
Description

Authorization*

String

SECRET_KEY

Request Body

Name
Type
Description

cardid*

Sting

Card ID

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/vcard-details' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer SECRET_KEY' \
--data '{
    "cardid": "021109a9-4bfa-4321-02ca-dc91e9a7b4"
}'
const axios = require('axios');
let data = JSON.stringify({
  "cardid": "021109a9-4bfa-4321-02ca-dc91e9a7b4"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '{{base_url}}/business/vcard-details'
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer SECRET_KEY'
  },
  data : data
};

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/vcard-details',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "cardid": "021109a9-4bfa-4321-02ca-dc91e9a7b4"
}',
  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/vcard-details'));
request.body = json.encode({
  "cardid": "021109a9-4bfa-4321-02ca-dc91e9a7b4"
});
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 info retrieved",
    "billingAddress": {
        "line1": "Oyo State",
        "line2": "",
        "city": "Ibadan",
        "state": "Oyo",
        "country": "NG",
        "postalCode": "201231"
    },
    "is2FAEnrolled": "",
    "current_bal": 112.27,
    "available_bal": 112.27,
    "cardicon": "https://oacloud.oneappgo.com/media_library/oneapp-personal/65b0dc7a31f253.37195213.png",
    "responsecode": "01",
    "cardstatus": "active",
    "holdertype": "individual",
    "cardbrand": "MASTERCARD",
    "cardtype": "Virtual",
    "cardpan": "583007********0000",
    "expiryyr": "27",
    "expirymnt": "06",
    "holdername": "John Doe",
    "usertype": "partner",
    "customerid": "01057-e48b-4e45-ddc1-0c91ec1988",
    "card_id": "021109a9-4bfa-4321-02ca-dc91e9a7b4",
    "currency": "USD",
    "created_at": "Sat, 22-06-2024 09:08 pm",
    "lastupdate": "Sat, 22-06-2024 09:08 pm",
    "dstatus": "1",
    "defaultpin": "****",
    "cvv": ""
}
PreviousGet all CardsNextCards Pan

Last updated 7 months ago

Was this helpful?

Page cover image