Re: Business Data Transaction API - 404 Bad Request

Solved! Go to solution
expense_pcm
New Contributor

Business Data Transaction API - 404 Bad Request

I set up Postman with my projects certificates, and I can get a successful response from the helloworld endpoint.  However, when I post to the Business Data Transaction API, I get a 404 response.

 

I am posting to https://sandbox.api.visa.com/cdsapi/commercial/v1/ob/trxndata.  I have updated Postman to use the correct certificates and credentials for my project.  

 
The body of my request is 
 

 

{
    "bank": [
        {
            "bankId": "999999"
        }
    ]
}

 

In response, I get the following HTML.

 

<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=utf-8" />
	<title>Error</title>
</head>

<body>
	<H2>Error</H2>
	<table summary="Error" border="0" bgcolor="#FEEE7A" cellpadding="0" cellspacing="0" width="400">
		<tr>
			<td>
				<table summary="Error" border="0" cellpadding="3" cellspacing="1">
					<tr valign="top" bgcolor="#FBFFDF" align="left">
						<td><STRONG>Error</STRONG></td>
					</tr>
					<tr valign="top" bgcolor="#FFFFFF">
						<td>This page can't be displayed. Contact support for additional
							information.<br/>The incident ID is: N/A.</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>

</html>

 

 

I would appreciate any help troubleshooting this.  I was unable to find any sample code for the Business Data Transaction API.  If that exists, I imagine it would make clear what I am doing wrong.

 

Regards,

Jason

4 REPLIES 4
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Business Data Transaction API - 404 Bad Request

Hi @expense_pcm,

 

If you are able to connect to the helloworld endpoint with your project certificates, that means your credentials and Postman setup are good.

 

Can you please share what payload you are sending to the Business Data Transaction API request? Please also share the response body showing the error message and the response header with the x-correlation ID. We'll be able to troubleshoot further with the additional information you provide us. Thanks.

 

 


Best,
Stacey

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

Re: Business Data Transaction API - 404 Bad Request

Thanks for your quick response.  I just noticed that there are some invisible characters resulting from me copying and pasting the URL into postman.  Now I get a slightly more useful reponse.

 

Postman is sending the following request headers:

AuthorizationBasic R0o0T1dGRE5KQ0VGRVE3RDRVVEgyMUE0VFRucG45VWtaQkUxWkFIT1JaemVrMWxBNDpxRVg0WmVKbFIxQjRBOVU4ak9HY1c1OEF6QVhTVWg1enQ=
Content-Typeapplication/json
User-AgentPostmanRuntime/7.26.10
Accept*/*
Cache-Controlno-cache
Postman-Token9e078a5f-85ea-43aa-945b-4588849883aa
Hostsandbox.api.visa.com
Accept-Encodinggzip, deflate, br
Connectionkeep-alive
Content-Length80
 
Along with the following request body:
{ "bank": [ { "bankId": "999999" } ] }
 
Then I get the following response headers
Servernginx
DateWed, 14 Apr 2021 18:00:55 GMT
Content-Typeapplication/json
Content-Length208
Connectionkeep-alive
X-SERVED-BYl73c017
X-CORRELATION-ID1618423255_669_520009982_l73c017_VDP_WS
X-Backside-TransportOK OK,OK OK
Cache-Controlno-cache, no-store, must-revalidate
Pragmano-cache
Expires-1
X-Download-Optionsnoopen
Strict-Transport-Securitymax-age=31536000;includeSubDomains ,max-age=2592000;includeSubdomains
Strict-Transport-Securitymax-age=15768000;includeSubdomains;always
X-Frame-OptionsSAMEORIGIN
X-Content-Type-Optionsnosniff
X-Content-Type-Optionsnosniff
X-XSS-Protection1; mode=block
X-XSS-Protection1; mode=block
X-Global-Transaction-ID1adcbd1660772dd71d9ce139
X-APP-STATUS200
 
And the following response body:
{
    "transactionData": {
        "responseMetadata": {
            "requestId""1618423255_669_520009982_l73c017_VDP_WS"
        },
        "starterInfo": {},
        "transactionRecords""Improper request provided by user. Please check your request and retry."
    }
}
 
I am simply using the request body example from the API Reference (https://developer.visa.com/capabilities/vbds/reference#vbds__transaction_data).  
 
I just noticed that the reference says that a clientId request header is required.  I am not aware if this ID.  How do I obtain this value?
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Business Data Transaction API - 404 Bad Request

Hi @expense_pcm,

 

Thank you for sharing additional details on the error. This is very helpful and I was able to recreate the error on my end by sending the same payload you sent. I am working with the product team to get the correct payload. Please stay tuned.


Best,
Stacey

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

Re: Business Data Transaction API - 404 Bad Request

Hi @expense_pcm,

 

Please try below payload and let me know how it goes. In case of error, please share the x-correlation id from the response header. Thanks.

 

{

    "issuer": {

        "metadata": {

            "startDate": "2021/03/01",

            "endDate": "2021/03/20",

            "startIndex" : 0

        },

        "bank": [{

                "regionId": 1,

                "processorId": 1,

                "bankId": "999999",

                "company": [

                    {

                        "companyId": "12345"

                    }

                ]}]

    }

}


Best,
Stacey

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