# Payment Direct API

Using ‘Payment Direct’ integration, all communication with Faspay e-Payment must be accomplished through secure SSL channel.

Payment direct API request should be sent to the following URL using HTTP POST method:

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

Following are the additional parameters you should include in your payment post :

<table><thead><tr><th width="294">Parameter</th><th width="140">Data Type</th><th width="85" align="center">M/O/C</th><th width="298">Description</th></tr></thead><tbody><tr><td>cardname</td><td>Varchar (100)</td><td align="center">C</td><td>Name on the Credit Card</td></tr><tr><td>cardtype</td><td>Char(1)</td><td align="center">C</td><td>Indicates the card type used.<br><br>MasterCard= M<br>Visa= V<br>JCB= J<br>Amex= A<br><br>*)<strong>mandatory</strong>, if merchant post registration for tokenization.</td></tr><tr><td>cardno</td><td>Varchar (20)</td><td align="center">C</td><td>Shopper’s Credit Card number<br><br>*)<strong>mandatory</strong>, if merchant post registration for tokenization.</td></tr><tr><td>cardcvc</td><td>Char(4)</td><td align="center">C</td><td>Card Verification Number (Last 3 digits located usually on the back of shopper’s credit card)<br><br>This field can be optional if the Allow CVC field in Merchant Setting is disabled<br><br>*)<strong>mandatory</strong>, if merchant post registration for tokenization. And conditional if merchant use for payment (based on requirement use CVV or by pass CVV on payment process).</td></tr><tr><td>expirymonth</td><td>Char(2)</td><td align="center">M</td><td>Use numeric representative of the month i.e.<br><br>01 - January<br>02 - February<br>…<br>12 – December<br><br><strong>*) mandatory</strong>, if merchant post registration for tokenization.</td></tr><tr><td>expiryyear</td><td>Char(4)</td><td align="center">M</td><td>Format of year should be YYYY i.e.2005, 2006 and etc.*) mandatory, if merchant post registration for tokenization.</td></tr><tr><td>card_issuer_bank_country_code</td><td>Varchar(2)</td><td align="center">O</td><td>Country of the credit card issuing bank.*) mandatory, if merchant post registration for tokenization.</td></tr><tr><td>savecard</td><td>Varchar(3)</td><td align="center">C</td><td> Merchant must be displayed optional for save card data when user fill the card no and etc on registration tokenization. fill <strong>savecard = “1”</strong>.<br><br>The “<strong>Savecard</strong>” parameteronly will be use for registration and payment for add new card.<br><br><br><strong>*) mandatory</strong>, if merchant post registration and add new card for tokenization.</td></tr><tr><td>paymentoption</td><td>Integer</td><td align="center">C</td><td> Payment option used for flag transaction update:<br><br><strong>Paymentoption = “0”</strong><br>Is for registration or payment without update card transaction.<br><br><strong>Paymentoption = “1”</strong><br>if you want to add new card for transaction use existing token.</td></tr><tr><td>pymt_ind</td><td>Varchar(20)</td><td align="center">M</td><td>Specify the payment indicator to be used for tokenization transaction.</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 the parameter PYMT_IND.</td></tr><tr><td>pymt_token</td><td>Varchar(40)</td><td align="center">C</td><td><p>This field for data tokens, for transaction registration this filed will be blank (null), but for transaction payment (after registration transaction) fill this field with token from response payment on registration.</p><p>Sample token :</p><p>“47271385-94F5-410A-9890-09CBB77F2A66”</p><p>You can store on your database formapped with a user ID that is registered in the merchant system.</p></td></tr><tr><td>mparam1</td><td>Varchar(200)</td><td align="center">M</td><td>This field use for direct API tokenization, merchant must be send this params.</td></tr></tbody></table>

**Credit Card Payment Response:**

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

<table><thead><tr><th width="148">Parameter</th><th width="133">Data Type</th><th width="89" align="center">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>pymt_token</td><td>Varchar (40)</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>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-direct-api.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.
