# Query DR

### Structure of QueryDR Request

<mark style="color:blue;"><https://neopay-domain?\\[key1=value]&\\[key2=value]&>...</mark> (below table is the description of key and value, no ordering required)

### Table of Parameter

<table><thead><tr><th>Parameter</th><th width="117">Data type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>neo_MerchantCode</td><td>String</td><td>Y</td><td>The merchant code is provided by NeoX</td></tr><tr><td>neo_Version</td><td>String</td><td>Y</td><td>Version of API, "1" as default</td></tr><tr><td>neo_Command</td><td>String</td><td>Y</td><td>“QUERY_DR” as default</td></tr><tr><td>neo_MerchantTxnID</td><td>String</td><td>Y</td><td>Unique - The merchant transaction ID is provided by merchant</td></tr><tr><td>neo_SecureHash</td><td>String</td><td>Y</td><td>Use <strong>SHA256</strong> to hash the above parameters (sort the key by Alphabet order) + Secret Key (is provided by NeoX after actual integrating)</td></tr></tbody></table>

### Table of Data Response

<table><thead><tr><th width="200">Parameter</th><th width="117">Data type</th><th>Description</th></tr></thead><tbody><tr><td>neo_DRExists</td><td>String</td><td>Indicate that transaction exists or not. <br>- Y: transaction existed <br>- N: transaction is not exists</td></tr><tr><td>neo_ResponseCode</td><td>Number</td><td>Result of transaction: <br> 0: transaction success <br> != 0: transaction failed, refer to <a href="../error-codes#table-of-error-code">table of error code</a></td></tr><tr><td>neo_ResponseMsg</td><td>String</td><td>Error description.</td></tr><tr><td>neo_MerchantCode</td><td>String</td><td>The merchant code is  provided by NeoX.</td></tr><tr><td>neo_Currency</td><td>String</td><td>Transaction currency, default is “VND”</td></tr><tr><td>neo_Locale</td><td>String</td><td>The language will use on payment page, support: “vi”, “en".</td></tr><tr><td>neo_Version</td><td>String</td><td>Payment gateway version, “1” as default</td></tr><tr><td>neo_Command</td><td>String</td><td>"PAY" as default.</td></tr><tr><td>neo_Amount</td><td>Number</td><td>Order amount.</td></tr><tr><td>neo_MerchantTxnID</td><td>String</td><td>Transaction ID is provided by merchant, it must be unique on merchant’s system and on each request, accept only characters, numerics and list of symbols: “-”, “_”.</td></tr><tr><td>neo_OrderID</td><td>String</td><td>Order ID of the transaction, only accept  characters, numerics and list of symbols: “-”, “_”.</td></tr><tr><td>neo_OrderInfo</td><td>String</td><td>Order information, max length 256</td></tr><tr><td>neo_TransactionID</td><td>String</td><td>Unique - Transaction ID is generated by NeoX.</td></tr><tr><td>neo_TransAmount</td><td>number</td><td>Transaction amount (partial payment).</td></tr><tr><td>neo_ExtData</td><td>Object</td><td>Extra data of transaction.</td></tr></tbody></table>

*Note: Should call this API 5 mins after payment made.*
