# Tokenization Registration API

Payment Window integration uses a set of standard basic parameters which makes the integrations steps easier, even when you use multiple payment modes.

For payment integration request, all communication with Faspay e-Payment must be accomplished through web browser. Backend submission using socket interface is not allowed as the payment process flow involves browser submission and redirection. Merchant do not need to have secure SSL certificates installed as all sensitive payment related information are entered only at Faspay e-Payment web pages. Merchants using this integration option should not collect and store any sensitive information such as credit card number etc.

Use the following URL to submit to our payment window interface through HTML FORM POST method:

| Development                                        |
| -------------------------------------------------- |
| <https://cardpayment-sandbox.faspay.co.id/payment> |

The parameter that must be provide by the Merchant system to be accessed by the Faspay system are as follows:

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

<table><thead><tr><th width="164">Parameter</th><th width="128">Data Type</th><th width="93" align="center">M/O/C</th><th width="300">Description</th></tr></thead><tbody><tr><td>pymt_ind</td><td>Varchar(20)</td><td align="center">M</td><td><p>Specify the payment indicator to be used for tokenization transaction. The payment indicator is used as the key identifier to set certain indication. For tokenization you can fill with:  <br> <br><em><strong>PYMT_IND = “tokenization”</strong></em>  </p><p> </p><p>Nb): for all conditions, registration, payment or update card always use PYMT_IND = tokenization</p></td></tr><tr><td>pymt_criteria</td><td>Varchar(20)</td><td align="center">C</td><td>Specify the payment criteria to be used, together with parameter PYMT_IND. This criteria will be set one the payment indicator had been defined.<br><br><strong>PYMT_CRITERIA = “registration”</strong><br>Is for registration payment tokenization,</td></tr></tbody></table>

{% endtab %}

{% tab title="Request Sample" %}

```php
{
    "transaction_type": 1,
    "response_type": 2,
    "merchant_id": "mpgs_purchase",
    "payment_method": 1,
    "merchant_tranid": "TKN106",
    "currency_code": "IDR",
    "amount": "10000.00",
    "custname": "Suga",
    "custemail": "johndoe@gmail.com",
    "description": "Registration user",
    "return_url": "https://store.faspay.co.id/stack/post_fpg/result.php",
    "billing_address": "Pintu air",
    "billing_address_city": "Jakarta",
    "billing_address_region": "Jakarta",
    "billing_address_state": "DKI Jakarta",
    "billing_address_poscode": "10710",
    "billing_address_country_code": "ID",
    "phone_no": "086999686868",
    "style_image_url": "https://cardpayment-sandbox.faspay.co.id/payment/_assets/images/payment/newtemplate/faspaylogo.png",
    "callback_url": "https://store.faspay.co.id/stack/post_fpg/result.php",
    "signature": "BqCVfWYeCi2CaFdc0DqexokFaM8maYGJ/qoNYE8APN0=",
    "pymt_ind": "tokenization",
    "pymt_criteria": "registration"
}
```

{% endtab %}
{% endtabs %}

**Credit Card Tokenization Registration Response:**

Following are the standard parameters that the payment result will pass back as a response for credit card payments. Transaction request that has insufficient parameters or incorrect values, will be rejected by Faspay e-Payment and not stored in the system.\
\
Same as standard transactions, tokenization transactions will receive parameters like TXN\_STATUS and others, for tokenization if the transaction succeeds Faspay will send the token on the return URL and callback merchant.\
\
Additional response parameters for tokenization :

<table><thead><tr><th width="149">Parameter</th><th width="135">Data Type</th><th width="93" align="center">M/O/C</th><th width="300">Description</th></tr></thead><tbody><tr><td>pymt_token</td><td>Varchar (36)</td><td align="center">C</td><td><p>Faspay will send the token ID if the transaction success by return URL and Callback merchant.</p><p> </p><p>Sample token :</p><p>“47271385-94F5-410A-9890-09CBB77F2A66”</p></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/api-tokenization/payment-window-integration-api-1.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.
