# Inquiry Payment Status

Inquiry payment status conducted by the merchant to check transaction status customer in receive (accept) or rejected (reject) by API Faspay and informed on the status of the transaction.&#x20;

For the implementation of the testing, UAT can use URL development.

<table><thead><tr><th width="231">Integration Method</th><th width="506">Development</th></tr></thead><tbody><tr><td>Merchant Window API</td><td><a href="https://fpg.faspay.co.id/payment/api">https://fpg-sandbox.faspay.co.id/payment/api</a></td></tr><tr><td>Merchant Direct API</td><td><a href="https://fpg.faspay.co.id/payment/api">https://fpg-sandbox.faspay.co.id/payment/api</a></td></tr></tbody></table>

{% hint style="info" %}

* If the transaction is accepted (Accepted) Faspay will provide the latest transaction status
* If the transaction is rejected (Rejected) Faspay will give error code 5533 (the transaction is not found), for a transaction to be rejected (reject) will not be saved faspay
  {% endhint %}

**Inquiry Request Parameter**

Request parameters are parameters that the merchant's system must provide can inquire Faspay payment with system status.

{% tabs %}
{% tab title="Request" %}

<table><thead><tr><th width="185">Parameter</th><th width="138">Data Type</th><th width="88" align="center">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>transactiontype</td><td>Varchar(2)</td><td align="center">M</td><td>For query API, always used value ‘4’.</td></tr><tr><td>merchantid</td><td>Varchar (30)</td><td align="center">M</td><td>Your Faspay e-Payment Merchant ID</td></tr><tr><td>merchant_tranid</td><td>Varchar(100)</td><td align="center">M</td><td>Your own assigned unique ID for transaction. The value must match the original value submitted in; otherwise the request will be rejected with error.</td></tr><tr><td>amount</td><td>Numeric</td><td align="center">M</td><td>Original amount of transaction. Supports up to 2 decimal point. E.g., amount is RM 52.50, pass in the value as 52.50, amount is IDR 10000, pass in as 10000.00. The value must match the original amount submitted in; otherwise the request will be rejected with error.</td></tr><tr><td>response_type</td><td>Varchar(1)</td><td align="center">M</td><td><p>Indicate how the system should provide the transaction result. Please always use the value ‘3’ for Query API. </p><p>The response parameters will be directly printed to stream with ‘;’ as separator for each response parameter. The sequence of the parameter may be different from one release to another, please do not rely on the sequence of parameter to process response.</p></td></tr><tr><td>signature</td><td>Varchar(40)</td><td align="center">C</td><td>Transaction signature of request for data integrity check.</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Request" %}

```php
<?php
 
$signaturecc=sha1('##'.strtoupper('sophia_store').'##'.strtoupper('abcde').'##2017091850745##1000.00##'.'9E69AD15-4AB0-43AE-B37B-8FD276E24155'.'##');
$post = array(
"TRANSACTIONTYPE"      => '4',
"RESPONSE_TYPE"        => '3',                       
"MERCHANTID"           => 'sophia_store,                                
"PAYMENT_METHOD"       => '1',
"MERCHANT_TRANID"      => '2017091850745',       
"TRANSACTIONID"        => '9E69AD15-4AB0-43AE-B37B-8FD276E24155',
"AMOUNT"               => '1000.00',
"SIGNATURE"            => $signaturecc 
);

$post   = http_build_query($post);
$url    = "https://fpg.faspay.co.id/payment/api";
$ch = curl_init();
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$result = curl_exec($ch);
print_r($result);
curl_close($ch);

?>
```

{% endtab %}
{% endtabs %}

**Response Parameter Inquiry Payment Status**

Response parameter inquiry payment status is parameters that will be delivered by the system Faspay response to request payment status inquiry parameters that have been submitted by the merchant system. If no parameters are appropriate / value is incorrect, the transaction will be rejected in the system Faspay.

<table><thead><tr><th width="213">Parameter</th><th width="145">Data Type</th><th width="95" align="center">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>payment_method</td><td>Varchar(1)</td><td align="center">M</td><td>Indicates the payment mode used for this transaction. In the event of error, this field may be empty.</td></tr><tr><td>merchantid</td><td>Varchar (30)</td><td align="center">M</td><td>Your Faspay e-Payment Merchant ID</td></tr><tr><td>merchant_tranid</td><td>Varchar(100)</td><td align="center">M</td><td>Merchant’s own assigned transaction id as passed in from the request.</td></tr><tr><td>transactionid</td><td>Integer</td><td align="center">M</td><td>Faspay e-Payment assigned transaction id if the transaction was stored. This value must be stored and used as reference value to retrieve the transaction from Faspay e-Payment. In the event that if the request parameters are invalid, the transaction is rejected and not stored, this value will be 0.</td></tr><tr><td>trandate</td><td>Varchar (19)</td><td align="center">C</td><td>Transaction date of when transaction is submitted to Faspay e-Payment. Date format in ‘DD-MM-YYYY hh:mm:ss’ e.g. 24-05-2006 08:24:23 In the event of error, this field may be empty.</td></tr><tr><td>err_code</td><td>Varchar(10)</td><td align="center">M</td><td>Error Code returns from Faspay e-Payment. If transaction is successful, this value will be 0. Any other value than 0 will indicate that the transaction is not successful.</td></tr><tr><td>err_desc</td><td>Varchar(250)</td><td align="center">M</td><td>Error description from Faspay e-Payment based on the ERR_CODE.</td></tr><tr><td>txn_status</td><td>Varchar(3)</td><td align="center">M</td><td><p>Transaction status from Faspay e-Payment. Please refer to Appendix B for full list of transaction status. </p><p>A – Authorized (for authorized request) </p><p>S – Sales (for sales request) </p><p>F – Not approved </p><p>E – Error </p><p>B – Blocked </p><p>RC – Reconfirm </p><p>N – Pending </p><p>I – Incomplete </p><p>This value must be stored and it’s the indication whether the transaction is successful, declined or error.</p></td></tr><tr><td>custname</td><td>Varchar(120)</td><td align="center">C</td><td>Shopper’s name. In the event of error, this field may be empty.</td></tr><tr><td>description</td><td>Varchar(100)</td><td align="center">O</td><td>Transaction description as passed in from the request.</td></tr><tr><td>currencycode</td><td>Varchar(3)</td><td align="center">C</td><td>Indicate the currency of this transaction. Refer to Appendix I for Supported Currencies. E.g. IDR, USD, SGD etc. In the event of error, this field may be empty.</td></tr><tr><td>amount</td><td>Numeric(10)</td><td align="center">M</td><td>Transaction amount as passed in from the request.</td></tr><tr><td>signature</td><td>Varchar(40)</td><td align="center">M</td><td>Transaction signature of response for data integrity checking.</td></tr><tr><td>is_blacklisted</td><td>Varchar(5)</td><td align="center">C</td><td>Indicate whether the transaction is blacklisted. Value is ‘Yes’ or ‘No’ In the event of error, this field may be empty.</td></tr><tr><td>fraudrisklevel</td><td>Integer</td><td align="center">C</td><td><p>Indicate fraud risk level. Value as follow: </p><p>-1 : Error or not in used. </p><p>0 – Very low risk </p><p>1 – Low risk </p><p>2 – Medium risk </p><p>3 – High risk </p><p>4 – Very high risk </p><p>In the event of error, this field may be empty.</p></td></tr><tr><td>fraudriskscore</td><td>Numeric</td><td align="center">C</td><td>Fraud risk score in two decimal values. In the event of error, this field may be empty.</td></tr><tr><td>eui</td><td>Varchar(3)</td><td align="center">O</td><td><p>End User Indicator (EUI) is use to help merchant determine the response to display on merchant return URL. Please refer to Appendix section for further details. </p><p>SUC = Success </p><p>RTY = Retry/Failed </p><p>ALT = Alert </p><p>NA = Not Applicable</p></td></tr><tr><td>exceed_high_risk</td><td>Varchar(3)</td><td align="center">C</td><td><p>Indicate whether the transaction fraud score exceed the threshold value set for high risk in merchant setting. Possible value are: </p><p>Yes = Transaction fraud risk exceed merchant high risk threshold </p><p>No = Transaction fraud risk fall bellows the merchant high risk threshold </p><p>NA = Not Applicable (fraud score not available) </p><p>In the event of error, this field may be empty.</p></td></tr><tr><td>transactiontype</td><td>Varchar(2)</td><td align="center">M</td><td>Return transaction type as passed in from request.</td></tr><tr><td>acquirer_id</td><td>VarcharI(30)</td><td align="center">O</td><td>Your Faspay e-Payment Acquirer ID</td></tr><tr><td>total_refund_amount</td><td>Numeric(10)</td><td align="center">M</td><td>The total of refund amount that already done for the transaction. If the transaction not doing any refund, will return 0.</td></tr><tr><td>cardname</td><td>Varchar(100)</td><td align="center">C</td><td>Name on the Credit Card. In the event of error, this field may be empty.</td></tr><tr><td>cardtype</td><td>Varchar(1)</td><td align="center">C</td><td><p>Indicate card type used. </p><p>MasterCard = M </p><p>Visa = V </p><p>In the event of error, this field may be empty.</p></td></tr><tr><td>card_no_partial</td><td>Varchar(20)</td><td align="center">C</td><td><p>Returns first 6 and last 4 digits of credit card. E.g.: 455555XXXXXX1234 </p><p>In the event of error, this field may be empty.</p></td></tr><tr><td>acquirer_bank</td><td>Varchar(3)</td><td align="center">C</td><td>Acquiring bank that processed this credit card transaction. Coded value. Please refer to Appendix. This parameter will only have value if the transaction request fulfills all the mandatory parameters and passes all parameters validation checking in Faspay e-Payment server. It will be empty also if Faspay e-Payment server does not send in the transaction to any bank. This may happen, in few possible cases like, Faspay e-Payment server cannot find any suitable acquirer setup to process the transaction, or the transaction is blocked based on merchant settings.</td></tr><tr><td>bank_res_code</td><td>Varchar(20)</td><td align="center">C</td><td>Response code or error code from bank. In the event of error, this field may be empty.</td></tr><tr><td>bank_res_msg</td><td>Varchar(250)</td><td align="center">C</td><td>Bank description on the response based on BANK_RES_CODE. In the event of error, this field may be empty.</td></tr><tr><td>auth_id</td><td>Varchar(20)</td><td align="center">O</td><td>Bank approval code (if transaction is approved). If transaction is declined or error, this parameter will be empty.</td></tr><tr><td>bank_reference</td><td>Varchar(100)</td><td align="center">O</td><td>Reference value from bank (if transaction is approved). If transaction hit error, this parameter may be empty.</td></tr><tr><td>is_on_us</td><td>Varchar(3)</td><td align="center">M</td><td>Indicate whether the transaction is using on us card. Value is ‘Yes’ or ‘No’</td></tr><tr><td>capture_date</td><td>Varchar (19)</td><td align="center">C</td><td><p>Transaction date of when transaction is captured in Faspay e-Payment. Date format in ‘DD-MM-YYYY hh:mm:ss’ e.g. 24-05-2006 08:24:23 </p><p>This parameter will only be provided if transaction status is successfully captured.</p></td></tr><tr><td>refund_date</td><td>Varchar (19)</td><td align="center">C</td><td><p>Transaction date of when transaction is last refunded in Faspay e-Payment. Date format in ‘DD-MM-YYYY hh:mm:ss’ e.g. 24-05-2006 08:24:23 </p><p>This parameter will only be provided if transaction status is successfully refunded.</p></td></tr><tr><td>whitelist_card</td><td>Varchar(3)</td><td align="center">C</td><td>Indicate whether the transaction is use whitelist card. Value is ‘Yes’ or ‘No’</td></tr><tr><td>pymt_token</td><td>Varchar(200)</td><td align="center">C</td><td>The token to be used for retrieving credit card details in Tokenization Payment.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.faspay.co.id/merchant-integration/api-reference-1/credit-card-transaction/additional-api-integration/inquiry-payment-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
