Skip to main content

Documentation

Retrieve Query Results

Retrieve the results for a query about a merchant.

This is the second and last step in the process of querying the card networks for records about a merchant. Before you run this method, you must run Initiate Merchant Query.

  • match_stats

  • Statistics about the query.

      • query_match_count

      • Number of previous queries to the card network termination database that match elements of this merchant query. Does not indicate a registered match. Mastercard only.

        See matches.match_type > query match.

      • registered_match_count

      • Total number of registered matches in the card network termination databases with elements shared with this merchant query.

      • See matches.match_type > registered match.

  • matches

  • Describes the results of the query.

      • card_network

      • Name of the card network termination database with a match. One of the following:

        • MASTERCARD

        • VISA

      • exact_match

      • List of the data points that match this query exactly. Array of strings.

      • match_type

      • Type of match. One of the following:

        • query match - This merchant query matches elements of a previous merchant query in the card network termination database.

          This means that the queried merchant shares data with a merchant that was previously searched for.

        • registered match - This merchant query matches elements of a merchant termination registration in the card network termination database.

          This means that an acquirer terminated the contract of a merchant that shares data with the queried merchant.

      • matched_merchant

      • Data about the merchant on file in the database.

        • partial_match

        • List of the data points that partly match the query. Array of strings.

        • registration_info

        • Registration information in the card network's termination database about the merchant and the acquirer that listed the merchant.

            • contract_end_date

            • End date of the merchant's contract with the acquirer.

            • contract_start_date

            • Start date of the merchant's contract with the acquirer.

            • primary_registration_reason

            • Reason that the merchant's contract with the acquirer was terminated.

            • registered_by_acquirer_id

            • ID of the acquirer that listed the merchant.

            • registered_by_acquirer_name

            • Name of the acquirer that listed the merchant.

            • registered_by_acquirer_region

            • Region of the acquirer that listed the merchant.

    • query_info

    • Information about the query request.

        • events_status

        • Status of the query of each individual card network termination database. One of the following:

        • queried_merchant

        • Details of the merchant who is the subject of the query.

          • query_created_at

          • Time of creation of the query, in Unix time.

          • search_criteria

          • Search criteria for the query.

      • /v1/cnl/termination_query/:partner_query_reference

      • Retrieve Query Results - PROCESSED: Registered matches

      • curl -X get
        https://sandboxapi.rapyd.net/v1/cnl/termination_query/12345678
        -H 'access_key: your-access-key-here'
        -H 'Content-Type: application/json'
        -H 'salt: your-random-string-here'
        -H 'signature: your-calculated-signature-here'
        -H 'timestamp: your-unix-timestamp-here'
      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "c8dff275-ff01-4382-aeb9-f0653c8b2972"
            },
            "data": {
                "match_stats": {
                    "registered_match_count": 2,
                    "query_match_count": 0
                },
                "query_info": {
                    "partner_merchant_reference": "ABCDEFGH",
                    "partner_query_reference": "12345678",
                    "queried_merchant": {
                        "legal_name": "Four Star Market, Ltd.",
                        "dba_name": "Four Star Market",
                        "address": {
                            "address_line_1": "123 Main Street",
                            "address_line_2": "",
                            "city": "London",
                            "country": "GB",
                            "postal_code": "12345"
                        },
                        "phone_numbers": [
                            "+445555555555"
                        ],
                        "business_category": "Merchant",
                        "principals": [
                            {
                                "first_name": "John",
                                "middle_initial": "A",
                                "last_name": "Doe",
                                "email": "john.doe@fourstarmarket.net",
                                "address": {
                                    "address_line_1": "123 First Street",
                                    "address_line_2": "",
                                    "postal_code": "12345",
                                    "city": "London",
                                    "country": "GB"
                                },
                                "phone_number": "+449999999999"
                            }
                        ],
                        "is_ecommerce": false,
                        "email": "service@fourstarmarket.com",
                        "mcc": ["1234"],
                        "url": [
                            "https://fourstarmarket.com"
                        ]
                    },
                    "search_criteria": {
                        "search_area": "global"
                    },
                    "query_status": "PROCESSED",
                    "query_created_at": 1714999806182,
                    "events_status": {
                        "VMSS": "PROCESSED",
                        "MATCH": "PROCESSED"
                    }
                },
                "matches": [
                    {
                        "card_network": "VISA",
                        "match_type": "registered match",
                        "exact_match": [
                            "merchant.address.city",
                            "merchant.address.postal_code",
                            "merchant.address.country"
                        ],
                        "partial_match": [
                            "merchant.address.address_line_1"
                        ],
                        "matched_merchant": {
                            "business_category": "",
                            "legal_name": "Snap Photo Inc",
                            "dba_name": "Snap Photo",
                            "address": {
                                "country": "GB",
                                "city": "London",
                                "address_line_1": "123 MAIN STREET",
                                "address_line_2": "",
                                "postal_code": "12345"
                            },
                            "phone_numbers": [
                                "+861087654321"
                            ],
                            "email": "",
                            "is_ecommerce": false,
                            "mcc": "3000",
                            "url": ""
                        },
                        "registration_info": {
                            "registered_by_acquirer_id": "40018064",
                            "registered_by_acquirer_region": "",
                            "registered_by_acquirer_name": "",
                            "contract_end_date": "2022-05-15",
                            "contract_start_date": "2022-04-15",
                            "primary_registration_reason": "28-Fraud Conviction"
                        }
                    },            
                    {
                        "card_network": "MASTERCARD",
                        "match_type": "registered match",
                        "exact_match": [
                            "merchant.address"
                        ],
                        "partial_match": [],
                        "matched_merchant": {
                            "legal_name": "THE BAIT SHOP",
                            "dba_name": "BAIT R US",
                            "address": {
                                "address_line_1": "123 MAIN STREET",
                                "postal_code": "12345",
                                "city": "London",
                                "country": "GB"
                            },
                            "phone_numbers": [
                                "443165557625",
                                null
                            ],
                            "business_category": "",
                            "principals": [
                                {
                                    "first_name": "DAVID",
                                    "middle_initial": "",
                                    "last_name": "SMITH"
                                }
                            ],
                            "email": "",
                            "mcc": [],
                            "url": [
                                null
                            ]
                        },
                        "registration_info": {
                            "registered_by_acquirer_id": "1998",
                            "registered_by_acquirer_region": "",
                            "registered_by_acquirer_name": "",
                            "contract_end_date": "2024-04-10",
                            "contract_start_date": "",
                            "primary_registration_reason": "13-Illegal Transactions"
                        }
                    }
                ]
            }
        }
      • Retrieve Query Results - PROCESSED: No matches

      • curl -X get
        https://sandboxapi.rapyd.net/v1/cnl/termination_query/87654321
        -H 'access_key: your-access-key-here'
        -H 'Content-Type: application/json'
        -H 'salt: your-random-string-here'
        -H 'signature: your-calculated-signature-here'
        -H 'timestamp: your-unix-timestamp-here'
        
      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "7684d66c-0dcc-460c-af06-19608602471b"
            },
            "data": {
                "match_stats": {
                    "registered_match_count": 0,
                    "query_match_count": 0
                },
                "query_info": {
                    "partner_merchant_reference": "ijklmnop",
                    "partner_query_reference": "87654321",
                    "queried_merchant": {
                        "legal_name": "Five Star Market, Ltd.",
                        "dba_name": "Five Star Market",
                        "address": {
                            "address_line_1": "456 Main Street",
                            "address_line_2": "",
                            "city": "Anytown",
                            "country": "GB",
                            "postal_code": "67890"
                        },
                        "phone_numbers": [
                            "+555555555555"
                        ],
                        "business_category": "Merchant",
                        "principals": [
                            {
                                "first_name": "John",
                                "middle_initial": "Q",
                                "last_name": "Public",
                                "email": "john.public@fivestarmarket.net",
                                "address": {
                                    "address_line_1": "456 First Street",
                                    "address_line_2": "",
                                    "postal_code": "67890",
                                    "city": "Anytown",
                                    "country": "GB"
                                },
                                "phone_number": "+9999999999999"
                            }
                        ],
                        "is_ecommerce": false,
                        "email": "service@fivestarmarket.com",
                        "mcc": ["1234"],
                        "url": [
                            "https://fivestarmarket.com"
                        ]
                    },
                    "search_criteria": {
                        "search_area": "global"
                    },
                    "query_status": "PROCESSED",
                    "query_created_at": 1715876085483,
                    "events_status": {
                        "VMSS": "PROCESSED",
                        "MATCH": "PROCESSED"
                    }
                },
                "matches": []
            }
        }
      • Retrieve Query Results - PARTIAL

      • curl -X get
        https://sandboxapi.rapyd.net/v1/cnl/termination_query/ABCD1234
        -H 'access_key: your-access-key-here'
        -H 'Content-Type: application/json'
        -H 'salt: your-random-string-here'
        -H 'signature: your-calculated-signature-here'
        -H 'timestamp: your-unix-timestamp-here'
        
      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "1234-abcd-1234-abcd-1234abcd"
            },
            "data": {
                "match_stats": {
                    "registered_match_count": 0,
                    "query_match_count": 0
                },
                "query_info": {
                    "partner_merchant_reference": "3456WXYZ",
                    "partner_query_reference": "ABCD1234",
                    "queried_merchant": {
                        "legal_name": "Six Star Market, Ltd.",
                        "dba_name": "Six Star Market",
                        "address": {
                            "address_line_1": "789 Main Street",
                            "address_line_2": "",
                            "city": "Anytown",
                            "country": "GB",
                            "postal_code": "12345"
                        },
                        "phone_numbers": [
                            "+445555555666"
                        ],
                        "business_category": "Merchant",
                        "principals": [{
                                "first_name": "Jane",
                                "middle_initial": "B",
                                "last_name": "Doe",
                                "email": "jane.doe@sixstarmarket.net",
                                "address": {
                                    "address_line_1": "789 First Street",
                                    "address_line_2": "",
                                    "postal_code": "09876",
                                    "city": "Anytown",
                                    "country": "GB"
                                },
                                "phone_number": "+445555555999"
                            }
                        ],
                        "is_ecommerce": false,
                        "email": "service@sixstarmarket.com",
                        "mcc": ["1234"],
                        "url": [
                            "https://sixstarmarket.com"
                        ]
                    },
                    "search_criteria": {
                        "search_area": "global"
                    },
                    "query_status": "PARTIAL",
                    "query_created_at": 1726566346,
                    "events_status": {
                        "VMSS": "PROCESSED",
                        "MATCH": "ERROR"
                    }
                },
                "matches": []
            }
        }
      • Retrieve Query Results - IN_PROGRESS

      • curl -X get
        https://sandboxapi.rapyd.net/v1/cnl/termination_query/ABCD1234
        -H 'access_key: your-access-key-here'
        -H 'Content-Type: application/json'
        -H 'salt: your-random-string-here'
        -H 'signature: your-calculated-signature-here'
        -H 'timestamp: your-unix-timestamp-here'
        
      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "903a2e0f-27cf-46c8-974b-fd8c70d4013d"
            },
            "data": {
                "status": "IN_PROGRESS"        
            }
        }
      • Retrieve Query Results - ERROR

      • curl -X get
        https://sandboxapi.rapyd.net/v1/cnl/termination_query/1212ABAB
        -H 'access_key: your-access-key-here'
        -H 'Content-Type: application/json'
        -H 'salt: your-random-string-here'
        -H 'signature: your-calculated-signature-here'
        -H 'timestamp: your-unix-timestamp-here'
        
      • {
            "status": {
                "error_code": "",
                "status": "SUCCESS",
                "message": "",
                "response_code": "",
                "operation_id": "6aae08fe-8e81-41d8-8981-5d56ccd17f8b"
            },
            "data": {
                "status": "ERROR"        
            }
        }