Hi Diana,
Sorry I couldn't reach back to you on time. Please find the details you asked for.
End Point -
https://sandbox.api.visa.com/dcas/cardservices/v3/cards/${cardId}?lookUpBalances=trueRequest Header -
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic ' + Buffer.from(`${process.env.VISA_USER_ID}:${process.env.VISA_USER_PASSWORD}`).toString('base64')
}
Request Body = is nothing but the cardID. Since we are in test environment, we are not able to generate a cardID other than - f71bc5f0-3c54-43c1-8ead-a92e01001fd2. We tried to generate a cardID for a specific credit card on Visa Network but it returns the same cardID.
Response Header -
response: {
status: 401,
statusText: '',
headers: AxiosHeaders {
server: 'nginx',
date: 'Thu, 14 Sep 2023 23:47:11 GMT',
'content-type': 'application/json;charset=UTF-8',
'content-length': '112',
connection: 'close',
'x-served-by': '-5d47468-6f9l',
'x-correlation-id': '1694735231_017_1731227077_-5d47468-6f9l_VDP_WS',
'x-error-origin': '9200',
'x-app-status': '401',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0',
'x-content-type-options': 'nosniff',
'strict-transport-security': 'max-age=31536000;includeSubdomains',
'cache-control': 'no-cache, no-store, must-revalidate',
pragma: 'no-cache',
expires: '-1',
'content-security-policy-report-only': "default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com
https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;",
'x-content-security-policy-report-only': "default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com
https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;",
'x-webkit-csp-report-only': "default-src 'self' https://*.v.me https://*.visa.com;script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.visa.com https://*.v.me;img-src 'self' https://*.v.me https://*.visa.com https://*.unica.com
https://ad.doubleclick.net;style-src 'self' 'unsafe-inline' https://*.visa.com;object-src https://*.v.me https://*.visa.com data:;report-uri /logging/logCSPReport;"
},
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [AxiosHeaders],
httpsAgent: [Agent],
method: 'get',
url: '
https://sandbox.api.visa.com/dcas/cardservices/v3/cards/f71bc5f0-3c54-43c1-8ead-a92e01001fd2?lookUpB...',
data: undefined
}
Response Body -
{
"fundingIndicator": true,
"accountIndicatorCode": "Y",
"institutionId": "59416892006",
"accountTypeCode": "DDA",
"isFundingComputed": false,
"accountNumber": "10041899274",
"accountId": "4218245d-6a53-4472-a2ba-d19078d2b00a",
"accountIndicatorDescription": "Primary",
"accountTypeDescription": "DemandDeposit",
"accountOpenedDate": "2022-07-12T00:00:00.000Z",
"currencyCode": "840"
}