Re: responses

masterArtisan
New Contributor

responses

Hi,
i am new to visa developer center and running into a problem. I am trying Create Pull Funds Transaction api and getting the following response when i send this data through a php code 28361861728058505V2023-08-28T17:57:56.000Z8truetruefalse93333. However i get response code 200 when i run the same code through playground. Can someone suggest me what's going wrong

9 REPLIES 9
API_Products
Visa Developer Support Specialist

Re: responses

Hi @masterArtisan,

 

Please share the following information so that someone can investigate the error.

1. End Point
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of 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.

masterArtisan
New Contributor

Re: responses

Hi diana thank you for replying to this post.
this is the url i m hitting
https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pullfundstransactions

curl_setopt(
$curl,
CURLOPT_HTTPHEADER,
array(
'Content-Type: application/json',
'Authorization: Basic ' . base64_encode("$username:$password")
)
);

request body
$jsonData = '{
"surcharge": "11.99",
"amount": "124.02",
"localTransactionDateTime": "2023-08-29T03:43:00",
"cpsAuthorizationCharacteristicsIndicator": "Y",
"riskAssessmentData": {
"traExemptionIndicator": true,
"trustedMerchantExemptionIndicator": true,
"scpExemptionIndicator": true,
"delegatedAuthenticationIndicator": true,
"lowValueExemptionIndicator": true
},
"colombiaNationalServiceData": {
"addValueTaxReturn": "10.00",
"taxAmountConsumption": "10.00",
"nationalNetReimbursementFeeBaseAmount": "20.00",
"addValueTaxAmount": "10.00",
"nationalNetMiscAmount": "10.00",
"countryCodeNationalService": "170",
"nationalChargebackReason": "11",
"emvTransactionIndicator": "1",
"nationalNetMiscAmountType": "A",
"costTransactionIndicator": "0",
"nationalReimbursementFee": "20.00"
},
"cardAcceptor": {
"address": {
"country": "USA",
"zipCode": "94404",
"county": "081",
"state": "CA"
},
"idCode": "ABCD1234ABCD123",
"name": "Visa Inc. USA-Foster City",
"terminalId": "ABCD1234"
},
"acquirerCountryCode": "840",
"acquiringBin": "408999",
"senderCurrencyCode": "USD",
"retrievalReferenceNumber": "330000560031",
"addressVerificationData": {
"street": "XYZ St",
"postalCode": "12345"
},
"cavv": "0700100038238906000013405823891061668252",
"systemsTraceAuditNumber": "452012",
"businessApplicationId": "AA",
"senderPrimaryAccountNumber": "4003974278332156",
"settlementServiceIndicator": "9",
"visaMerchantIdentifier": "73625198",
"foreignExchangeFeeTransaction": "11.99",
"senderCardExpiryDate": "2023-10",
"nationalReimbursementFee": "11.22"
}';

This is the response i am getting:
83342485042087105V2023-08-28T23:17:09.000Z8truetruefalse93333
masterArtisan
New Contributor

Re: responses

Hi Diana:
Thank you for your reply. 
here is the link to api which i am trying to hit and get response from. 

https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pullfundstransactions
here is the request body:
{
  "surcharge": "11.99",
  "amount": "124.02",
  "localTransactionDateTime": "2023-08-29T03:43:00",
  "cpsAuthorizationCharacteristicsIndicator": "Y",
  "riskAssessmentData": {
    "traExemptionIndicator": true,
    "trustedMerchantExemptionIndicator": true,
    "scpExemptionIndicator": true,
    "delegatedAuthenticationIndicator": true,
    "lowValueExemptionIndicator": true
  },
  "colombiaNationalServiceData": {
    "addValueTaxReturn": "10.00",
    "taxAmountConsumption": "10.00",
    "nationalNetReimbursementFeeBaseAmount": "20.00",
    "addValueTaxAmount": "10.00",
    "nationalNetMiscAmount": "10.00",
    "countryCodeNationalService": "170",
    "nationalChargebackReason": "11",
    "emvTransactionIndicator": "1",
    "nationalNetMiscAmountType": "A",
    "costTransactionIndicator": "0",
    "nationalReimbursementFee": "20.00"
  },
  "cardAcceptor": {
    "address": {
      "country": "USA",
      "zipCode": "94404",
      "county": "081",
      "state": "CA"
    },
    "idCode": "ABCD1234ABCD123",
    "name": "Visa Inc. USA-Foster City",
    "terminalId": "ABCD1234"
  },
  "acquirerCountryCode": "840",
  "acquiringBin": "408999",
  "senderCurrencyCode": "USD",
  "retrievalReferenceNumber": "330000560031",
  "addressVerificationData": {
    "street": "XYZ St",
    "postalCode": "12345"
  },
  "cavv": "0700100038238906000013405823891061668252",
  "systemsTraceAuditNumber": "452012",
  "businessApplicationId": "AA",
  "senderPrimaryAccountNumber": "4003974278332156",
  "settlementServiceIndicator": "9",
  "visaMerchantIdentifier": "73625198",
  "foreignExchangeFeeTransaction": "11.99",
  "senderCardExpiryDate": "2023-10",
  "nationalReimbursementFee": "11.22"
}
curl_setopt(
  $curl,
  CURLOPT_HTTPHEADER,
  array(
    'Content-Type: application/json',
    'Authorization: Basic ' . base64_encode("$username:$password")
  )
);
masterArtisan
New Contributor

Re: responses

Hi Diana,
actually it is not an error as i get the same response in postman. But the problem is how do i decode this response and get status code. 

API_Products
Visa Developer Support Specialist

Re: responses

Hi @masterArtisan,

 

I received a successful request/response payload today. See my request/response sample below and try your test again.

 

End Point https://sandbox.api.visa.com/visadirect/fundstransfer/v1/pullfundstransactions
Method POST
Request
{
"surcharge": "11.99",
"amount": "124.02",
"localTransactionDateTime": "2023-08-29T19:14:56",
"cpsAuthorizationCharacteristicsIndicator": "Y",
"colombiaNationalServiceData": {
"addValueTaxReturn": "10.00",
"taxAmountConsumption": "10.00",
"nationalNetReimbursementFeeBaseAmount": "20.00",
"addValueTaxAmount": "10.00",
"nationalNetMiscAmount": "10.00",
"countryCodeNationalService": "170",
"nationalChargebackReason": "11",
"emvTransactionIndicator": "1",
"nationalNetMiscAmountType": "A",
"nationalReimbursementFee": "20.00",
"costTransactionIndicator": "0"
},
"riskAssessmentData": {
"traExemptionIndicator": true,
"trustedMerchantExemptionIndicator": true,
"scpExemptionIndicator": true,
"delegatedAuthenticationIndicator": true,
"lowValueExemptionIndicator": true
},
"cardAcceptor": {
"address": {
"country": "USA",
"zipCode": "94404",
"county": "081",
"state": "CA"
},
"idCode": "ABCD1234ABCD123",
"name": "Visa Inc. USA-Foster City",
"terminalId": "ABCD1234"
},
"acquirerCountryCode": "840",
"acquiringBin": "408999",
"retrievalReferenceNumber": "330000550000",
"senderCurrencyCode": "USD",
"addressVerificationData": {
"street": "XYZ St",
"postalCode": "12345"
},
"cavv": "0700100038238906000013405823891061668252",
"systemsTraceAuditNumber": "451001",
"businessApplicationId": "AA",
"senderPrimaryAccountNumber": "4895142232120006",
"settlementServiceIndicator": "9",
"visaMerchantIdentifier": "73625198",
"foreignExchangeFeeTransaction": "11.99",
"senderCardExpiryDate": "2015-10",
"nationalReimbursementFee": "11.22"
}
Response
{
"transmissionDateTime": "2023-08-29T19:15:34.000Z",
"approvalCode": "98765X",
"cavvResultCode": "8",
"settlementFlags": {
"settlementServiceFlag": "9",
"givUpdatedFlag": "false",
"settlementResponsibilityFlag": "true",
"givPreviouslyUpdatedFlag": "true"
},
"cpsAuthorizationCharacteristicsIndicator": "3333",
"transactionIdentifier": 864617634654072,
"actionCode": "00",
"responseCode": "5"
}
Response Header
Status Code: 200
Server : nginx
Date : Tue, 29 Aug 2023 19:15:34 GMT
Content-Type : application/json;charset=UTF-8
Content-Length : 368
Connection : keep-alive
X-SERVED-BY : -8675d7f8-7g6
X-CORRELATION-ID : 1693336534_591_268584947_-8675d7f8-7g6_VDP_WS
X-APP-STATUS : 200
Content-Language : en-US
Cache-Control : no-cache, no-store, must-revalidate
X-Frame-Options : SAMEORIGIN
X-XSS-Protection : 0
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=31536000;includeSubdomains
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;
X-XSS-Protection : 1; mode=block
X-Content-Type-Options : nosniff
Strict-Transport-Security : max-age=31536000;includeSubdomains;always

 




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_Products
Visa Developer Support Specialist

Re: responses

Hi @masterArtisan,

 

Please let me know if you need help with anything else. If you no longer need help, please let me know and I'll 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_Products
Visa Developer Support Specialist

Re: responses

Hi @masterArtisan,

 

I haven't received a reply from you, hence, I'll take you off my contact list. Please do not hesitate to reach out to us on the community if you need assistance. Happy to help! 




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.

masterArtisan
New Contributor

Re: responses

Spoiler
and this is the raw response i am getting
Raw Response: 14484187413696305V2023-08-28T23:20:36.000Z8truetruefalse93333
masterArtisan
New Contributor

Re: responses

Spoiler
JSON data to be sent
Spoiler

//body 
$jsonData = '{
  "surcharge": "11.99",
  "amount": "124.02",
  "localTransactionDateTime": "2023-08-29T03:43:00",
  "cpsAuthorizationCharacteristicsIndicator": "Y",
  "riskAssessmentData": {
    "traExemptionIndicator": true,
    "trustedMerchantExemptionIndicator": true,
    "scpExemptionIndicator": true,
    "delegatedAuthenticationIndicator": true,
    "lowValueExemptionIndicator": true
  },
  "colombiaNationalServiceData": {
    "addValueTaxReturn": "10.00",
    "taxAmountConsumption": "10.00",
    "nationalNetReimbursementFeeBaseAmount": "20.00",
    "addValueTaxAmount": "10.00",
    "nationalNetMiscAmount": "10.00",
    "countryCodeNationalService": "170",
    "nationalChargebackReason": "11",
    "emvTransactionIndicator": "1",
    "nationalNetMiscAmountType": "A",
    "costTransactionIndicator": "0",
    "nationalReimbursementFee": "20.00"
  },
  "cardAcceptor": {
    "address": {
      "country": "USA",
      "zipCode": "94404",
      "county": "081",
      "state": "CA"
    },
    "idCode": "ABCD1234ABCD123",
    "name": "Visa Inc. USA-Foster City",
    "terminalId": "ABCD1234"
  },
  "acquirerCountryCode": "840",
  "acquiringBin": "408999",
  "senderCurrencyCode": "USD",
  "retrievalReferenceNumber": "330000560031",
  "addressVerificationData": {
    "street": "XYZ St",
    "postalCode": "12345"
  },
  "cavv": "0700100038238906000013405823891061668252",
  "systemsTraceAuditNumber": "452012",
  "businessApplicationId": "AA",
  "senderPrimaryAccountNumber": "4003974278332156",
  "settlementServiceIndicator": "9",
  "visaMerchantIdentifier": "73625198",
  "foreignExchangeFeeTransaction": "11.99",
  "senderCardExpiryDate": "2023-10",
  "nationalReimbursementFee": "11.22"
}';

$curl = curl_init($url);

// Set cURL options
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt(
$curl,
  CURLOPT_HTTPHEADER,
array(
'Content-Type: application/json',
'Authorization: Basic ' . base64_encode("$username:$password")
  )
);

the response i get is as follows:
Raw Response: 14484187413696305V2023-08-28T23:20:36.000Z8truetruefalse93333