I'm trying to use the MerchantSearh API but failing to get it to work. Even the example is not working from the api. I've attached all the details for my test. Any help would be appreciated. Thanks
Request
{
"searchOptions": {
"matchScore": "true",
"maxRecords": "10",
"matchIndicators": "true",
"proximity": ["merchantName"],
"wildCard": ["merchantName"]
},
"header": {
"startIndex": "0",
"requestMessageId": "VCO_GMR_001",
"messageDateTime": "2015-08-28T22:05:00.000"
},
"searchAttrList": {
"merchantPhoneNumber": "4153440351",
"merchantCity": "San Francisco",
"merchantCountryCode": "840",
"merchantPostalCode": "94107",
"paymentAcceptanceMethod": "F2F",
"visaStoreId": "161688518",
"merchantStreetAddress": "280 King St",
"merchantState": "CA",
"merchantName": "starbucks ",
"terminalType": "SWIPE"
},
"responseAttrList": ["GNSTANDARD"]
}
Response
{"responseStatus": {
"severity": "ERROR",
"code": "9611",
"message": "Authorization Failed for the URL.",
"status": 403,
"info": ""
}}
Response Header
Status Code: 403
Server : nginx
Date : Wed, 27 Sep 2023 15:28:27 GMT
Content-Type : application/json;charset=UTF-8
Content-Length : 122
Connection : keep-alive
X-SERVED-BY : -745c6b4-8s2
X-CORRELATION-ID : 1695828507_905_703158777_-745c6b4-8s2_VDP_WS
X-ERROR-ORIGIN : 9200
X-APP-STATUS : 403
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;
Hi, @fasihzafar! Thank you for reaching out. An agent is looking into this and will get back to you as soon as possible. If any community members have information that may help, feel free to respond here.
Hi @fasihzafar,
Did you receive the same error when using Two-Way SSL as the authentication method? are you able to share screenshots of this if so?
Thanks,
Illana
Hi @fasihzafar,
I tested Merchant Search today and received a successful request/response payload. Please see below and try your test again.
End Point https://sandbox.api.visa.com/merchantsearch/v2/search
Method POST
Request
{
"searchOptions": {
"matchScore": "true",
"maxRecords": "10",
"matchIndicators": "true",
"proximity": ["merchantName"],
"wildCard": ["merchantName"]
},
"header": {
"startIndex": "0",
"requestMessageId": "VCO_GMR_001",
"messageDateTime": "2015-08-28T22:05:00.000"
},
"searchAttrList": {
"merchantPhoneNumber": "4153440351",
"merchantCity": "San Francisco",
"merchantCountryCode": "840",
"merchantPostalCode": "94107",
"paymentAcceptanceMethod": "F2F",
"visaStoreId": "161688518",
"merchantStreetAddress": "280 King St",
"merchantState": "CA",
"merchantName": "starbucks ",
"terminalType": "SWIPE"
},
"responseAttrList": ["GNSTANDARD"]
}
Response
{"merchantSearchServiceResponse": {
"response": [
{
"matchScore": 74.691444,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "Y",
"visaStoreId": "Y",
"merchantStreetAddress": "Y",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [{
"number": "4153440351",
"type": "O"
}],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.393581",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.776827",
"merchantPostalCode": "94107-1702",
"visaStoreId": "161688518",
"dbaname": ["Starbucks Store 06677"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "280 KING ST",
"merchantUrl": ["www.starbucks.com"]
}
},
{
"matchScore": 25.87994,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.397518",
"paymentAcceptanceMethod": [
"F2F",
"EC"
],
"merchantCategoryCodeDesc": [
"FAST FOOD RESTAURANTS",
"MISC PERSONAL SERV - DEF"
],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS STORE",
"locationAddressLatitude": "37.789767",
"merchantPostalCode": "94105-2634",
"visaStoreId": "145089994",
"dbaname": ["Starbucks Store 17517"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": [
"7299",
"5814"
],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "100 1ST ST",
"merchantUrl": ["STARBUCKS.COM"]
}
},
{
"matchScore": 25.610157,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.400974",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.630415",
"merchantPostalCode": "94128-3103",
"visaStoreId": "170764616",
"dbaname": [
"STARBUCKS INTL30091532",
"STARBUCKS INT 30091540",
"STARBUCKS SFO 30091524"
],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 180 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["HMS HOST CORPORATION"],
"merchantStreetAddress": "780 MCDONNELL RD",
"merchantUrl": ["STARBUCKS.COM"]
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [{
"number": "4159898759",
"type": "O"
}],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.401254",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.793558",
"merchantPostalCode": "94104-1341",
"visaStoreId": "219576183",
"dbaname": ["Starbucks Store 00533"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "343 SANSOME ST STE 190",
"merchantUrl": ["www.starbucks.com"]
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.463756",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS STORE",
"locationAddressLatitude": "37.733599",
"merchantPostalCode": "94127",
"visaStoreId": "209029977",
"dbaname": ["Starbucks Store 05669"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "3338 N TEXAS ST STE A",
"merchantUrl": ["STARBUCKS.COM"]
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [{
"number": "4159799530",
"type": "O"
}],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.403432",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.787423",
"merchantPostalCode": "94103-3214",
"visaStoreId": "208801408",
"dbaname": ["Starbucks Store 10347"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "7 3RD ST",
"merchantUrl": [
"STARBUCKS.COM",
"www.starbucks.com"
]
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.389444",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS STORE",
"locationAddressLatitude": "37.771328",
"merchantPostalCode": "94158-2210",
"visaStoreId": "208536547",
"dbaname": ["Starbucks Store 25428"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "1449 3RD ST"
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [{
"number": "4156266263",
"type": "O"
}],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.434905",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.760875",
"merchantPostalCode": "94114-2534",
"visaStoreId": "189709695",
"dbaname": ["Starbucks Store 09212"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "4094 18TH ST",
"merchantUrl": ["www.starbucks.com"]
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [{
"number": "4153988630",
"type": "O"
}],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.397182",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.793597",
"merchantPostalCode": "94111-4603",
"visaStoreId": "189660504",
"dbaname": ["Starbucks Store 09222"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "52 CALIFORNIA ST",
"merchantUrl": ["www.starbucks.com"]
}
},
{
"matchScore": 25.29638,
"matchIndicators": {
"merchantPhoneNumber": "N",
"merchantCountryCode": "Y",
"merchantCity": "Y",
"merchantPostalCode": "N",
"visaStoreId": "N",
"merchantStreetAddress": "N",
"merchantState": "Y",
"merchantName": "Y"
},
"responseValues": {
"visaEnterpriseName": "STARBUCKS CORPORATION",
"merchantPhoneNumber": [{
"number": "4152527423",
"type": "O"
}],
"merchantCountryCode": "840",
"visaEnterpriseId": "336582810",
"locationAddressLongitude": "-122.393729",
"paymentAcceptanceMethod": ["F2F"],
"merchantCategoryCodeDesc": ["FAST FOOD RESTAURANTS"],
"firstTranDateRange": "IN MORE THAN 365 DAYS",
"merchantState": "CA",
"visaStoreName": "STARBUCKS",
"locationAddressLatitude": "37.767592",
"merchantPostalCode": "94158-0005",
"visaStoreId": "177165464",
"dbaname": ["Starbucks Store 14311"],
"visaMerchantName": "STARBUCKS",
"soleProprietorIndicator": "N",
"lastTranDateRange": "IN LAST 90 DAYS",
"merchantCity": "SAN FRANCISCO",
"smallBusinessIndicator": "N",
"terminalType": [
"SWIPE",
"CHIP",
"PAYWAVE"
],
"visaMerchantId": "29992901",
"primaryMerchantCategoryCode": "5814",
"merchantCategoryCode": ["5814"],
"businessLegalName": ["Starbucks Corporation"],
"merchantStreetAddress": "1700 OWENS ST STE 120",
"merchantUrl": ["www.starbucks.com"]
}
}
],
"header": {
"numRecordsReturned": 10,
"startIndex": "0",
"numRecordsMatched": 59,
"responseMessageId": "4c1df5c6-185f-440c-8f7c-a52ad5f1e0df",
"endIndex": "9",
"requestMessageId": "VCO_GMR_001",
"messageDateTime": "2023-10-18T18:20:26.026"
},
"status": {
"statusDescription": "Success",
"statusCode": "CDI000"
}
}}
Response Header
Status Code: 200
Server : nginx
Date : Wed, 18 Oct 2023 18:20:26 GMT
Content-Type : application/json
Content-Length : 12122
Connection : keep-alive
X-SERVED-BY : b9f55l75
X-CORRELATION-ID : 1697653226_006_2011820861_b9f55l75_VDP_WS
response-message-id : 4c1df5c6-185f-440c-8f7c-a52ad5f1e0df
response-message-ts : 2023-10-18T18:20:26.596657783Z
X-AGS-Request-ID : v3:8653:sandbox:73c010:6596dabdc9ff015f5a5f35a51438d451
X-APP-STATUS : 200
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