# Inquiry Detail Token

Used by the merchant for inquiry the credit card's information (Credit Card Number, Credit Card Type) Inquiry request should be sent to the following URL using HTTP POST method:

Response success given Faspay there are 2 kinds found in TXN\_STATUS field include:

| Development                               |
| ----------------------------------------- |
| <https://fpgdev.faspay.co.id/payment/api> |

**Request Inquiry Detail Token**

Following are the parameters you should post in your request :

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

<table><thead><tr><th width="188">Parameter</th><th width="133">Data Type</th><th width="90" 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 inquiry request detil token, always used value “5”</td></tr><tr><td>response_type</td><td>Varchar(1)</td><td align="center">C</td><td><p>Indicate how the system should provide the transaction result.</p><p>Please always use the value ‘3’ for Credit card API.</p></td></tr><tr><td>merchantid</td><td>Varchar(30)</td><td align="center">M</td><td>Your <strong>Faspay e-Payment</strong> Merchant ID</td></tr><tr><td>payment_method</td><td>Varchar(1)</td><td align="center">M</td><td>Indicate payment method used. Always used value ‘1’ for credit card payment.</td></tr><tr><td>token_type</td><td>Varchar(1)</td><td align="center">M</td><td><strong>TOKEN_TYPE = 1</strong> if merchant use tokenization static model and<br><br><strong>TOKEN_TYPE = 0</strong> if merchant use tokenization dynamic model.</td></tr><tr><td>pymt_token</td><td>Varchar(40)</td><td align="center">M</td><td>Use returned token that previous transaction Faspay generate via return URL or Callback.</td></tr><tr><td>signature</td><td>Varchar(40)</td><td align="center">M</td><td><p>Transaction signature of response for data integrity check. generated using SHA1 hash algorithm and the seeds to construct the transaction signature for API request are as follows:</p><ul><li>MERCHANTID</li><li>TXN PASSWORD</li><li>PYMT_TOKEN</li></ul><p>The fields must set in the following order, separated by a ## :</p><p>(“##" + MERCHANTID + "##" + TXN PASSWORD + "##" + PYMT_TOKEN + “##”)</p></td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Request" %}

```php
<?php
     
$tranid = date("YmdGis");
$token = '09B9C3D7-7365-4233-8C11-1C3A176F9D2B';

$signaturecc=sha1('##'.strtoupper('sophia_store').'##'.strtoupper('abcde').'##'.$token.'##');
$post = array(
            "TRANSACTIONTYPE"             => '5', 
            "RESPONSE_TYPE"               => '3',                          
            "MERCHANTID"                  => 'sophia_store',                                     
            "PAYMENT_METHOD"              => '1',
            "TOKEN_TYPE"                  => '1' //1 untuk static token, 0 untuk dynamic token
            "PYMT_TOKEN"                  => '09B9C3D7-7365-4233-8C11-1C3A176F9D2B',
            "SIGNATURE"                   => $signaturecc 
			);

	
$string = '<form method="post" name="form" action="https://fpg.faspay.co.id/payment/api">';  // yang diubah URLnya ke prod apa dev
if ($post != null) {
    foreach ($post as $name=>$value) {
		  $string .= '<input type="hidden" name="'.$name.'" value="'.$value.'">';
		}
}

$string .= '</form>';
$string .= '<script> document.form.submit();</script>';

echo $string; 
exit;


?> 
```

{% endtab %}
{% endtabs %}
