What is the ideal Response for Get Balance API for credit cards ?

What is the ideal Response for Get Balance API for credit cards ?

I am using this API - GET BALANCE - https://sandbox.api.visa.com/dcas/cardservices/v3/cards/{cardId}?lookupBalance=true

My requirement is to get available balance, available credit balance and creditline balance, ledger balance for a credit card. I am generating a card_id from a credit card number.

But anytime I am hitting this API with the default card_id returned by generate card id  is below - 

f71bc5f0-3c54-43c1-8ead-a92e01001fd2

its returning me the balance api with DemandDeposit but I want to check if this will work for credit cards or not. 

Can you please help ? Its really urgent.
6 REPLIES 6
jenn_kh
Community Moderator

Re: What is the ideal Response for Get Balance API for credit cards ?

Hi, @swapnil_sudhir! Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member has information that may help, feel free to reply here.

Re: What is the ideal Response for Get Balance API for credit cards ?

Hi @jenn_kh  

Still waiting for the agent to get connected. 

Thanks & Regards,
Swapnil.

API_Managers
Visa Developer Support Specialist

Re: What is the ideal Response for Get Balance API for credit cards ?

Hi @swapnil_sudhir,

 

Please share the following information with us for further investigation.

1. End Point

2. Request Header

3. Request Body

4. Response Header (include the x-correlation-id)

5. Response Body

You can find the x-correlation-id in the response header.




Thanks,

Tee



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Managers
Visa Developer Support Specialist

Re: What is the ideal Response for Get Balance API for credit cards ?

Hi @swapnil_sudhir,

 

Do you still need help with the error? If so, please answer the questions I asked of you in my prior post. If you no longer need help, please let me know so I can take you off my contact list. 




Thanks,

Tee



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

API_Managers
Visa Developer Support Specialist

Re: What is the ideal Response for Get Balance API for credit cards ?

Hi @swapnil_sudhir,

 

I haven't received a reply from you so I'll remove you from my contact list. Please reach out to us at the community if you have questions. 




Thanks,

Tee



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

Re: What is the ideal Response for Get Balance API for credit cards ?

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=true

Request 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"
}