# Post Data Transaction

This process is used to transmit transaction data from a merchant to Faspay. This process is done when the merchant requests get a response from Faspay.

**URL Endpoint Post Data**

The endpoint URL is a feedback URL that will process the data in the post from the merchant system. For the implementation of the testing, UAT can use URL development.

<table><thead><tr><th width="114">Type</th><th width="139">Environment</th><th>URL</th></tr></thead><tbody><tr><td><strong>XML</strong></td><td>Development</td><td><a href="https://debit-sandbox.faspay.co.id/pws/300011/183xx00010100000">https://debit-sandbox.faspay.co.id/pws/300011/183xx00010100000</a></td></tr><tr><td><strong>JSON</strong></td><td>Development</td><td><a href="https://debit-sandbox.faspay.co.id/cvr/300011/10">https://debit-sandbox.faspay.co.id/cvr/300011/10</a></td></tr></tbody></table>

**Request Parameter Post Data Transaction**

Request parameters are parameters that the merchant system must provide to post the data with system integration Faspay.

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

<table><thead><tr><th width="312">Parameter</th><th width="174">Data Type</th><th width="87">M/O/C</th><th width="234">Description</th></tr></thead><tbody><tr><td>request</td><td>Alphanumeric (50)</td><td>M</td><td>Request Description</td></tr><tr><td>merchant_id</td><td>Numeric (5)</td><td>M</td><td>Merchant Code From Faspay = BOI</td></tr><tr><td>merchant</td><td>Alphanumeric (32)</td><td>M</td><td>Merchant Name</td></tr><tr><td>bill_no</td><td>Alphanumeric (32)</td><td>M</td><td>Order Number</td></tr><tr><td>bill_reff</td><td>Alphanumeric (32)</td><td>O</td><td>Booking Number/reference (can fill same with order no)</td></tr><tr><td>bill_date</td><td>Datetime YYYY-MM-DD HH:MM:SS (19)</td><td>M</td><td>Transaction/ Order Date</td></tr><tr><td>bill_expired</td><td>Datetime YYYY-MM-DD HH:MM:SS (19)</td><td>M</td><td>Payment Expiring Date (max 30 days)</td></tr><tr><td>bill_desc</td><td>Alphanumeric (128)</td><td>M</td><td>Transaction Description</td></tr><tr><td>bill_currency</td><td>Alphanumeric (3)</td><td>M</td><td>Currency, Must be 'IDR'</td></tr><tr><td>bill_gross</td><td>Numeric (15)</td><td>O</td><td>Order Nominal </td></tr><tr><td>bill_miscfee</td><td>Numeric (15)</td><td>O</td><td>Miscellaneous fee</td></tr><tr><td>bill_total</td><td>Numeric (15)</td><td>M</td><td>Total Nominal</td></tr><tr><td>payment_channel</td><td>Numeric (32)</td><td>M</td><td>Payment Channel Code<br><br>Refers to <a href="https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/reference/payment-channel-code">here</a>.</td></tr><tr><td>pay_type</td><td>Alphanumeric (1)</td><td>M</td><td><p>Payment type : </p><p>1: Full Settlement </p><p>2: Installment  </p><p>3: Mixed 1 &#x26; 2 </p><p>Pay Type 2 &#x26; 3 only implement on BCA KlikPay channel</p></td></tr><tr><td>cust_no</td><td>Alphanumeric (32)</td><td>M</td><td>Customer Number</td></tr><tr><td>cust_name</td><td>Alphanumeric (128)</td><td>M</td><td>Customer Name</td></tr><tr><td>bank_user_id</td><td>Alphanumeric (128)</td><td>O</td><td>Customer User ID on bank’s services (ex : KlikBCA User Id)</td></tr><tr><td>msisdn</td><td>Numeric (64)</td><td>M</td><td>Customer Mobile Phone</td></tr><tr><td>email</td><td>Alphanumeric (128)</td><td>M</td><td>Customer Email</td></tr><tr><td>terminal</td><td>Numeric (16)</td><td>M</td><td>Always use 10 for Terminal</td></tr><tr><td>billing_name</td><td>Alphanumeric</td><td>C</td><td>Billing name  for OVO </td></tr><tr><td>billing_lastname</td><td>Billing name</td><td>O</td><td>biling last name</td></tr><tr><td>billing_address</td><td>Alphanumeric (200)</td><td>O</td><td>billing_address</td></tr><tr><td>billing_address_city</td><td>Alphanumeric (50)</td><td>O</td><td>Billing City</td></tr><tr><td>billing_address_region</td><td>Alphanumeric (100)</td><td>O</td><td>Billing Addres Region</td></tr><tr><td>billing_address_state</td><td>Alphanumeric (100)</td><td>O</td><td>Billing Address State</td></tr><tr><td>billing_address_poscode</td><td>Alphanumeric (10)</td><td>O</td><td>Billing Address Pos Code</td></tr><tr><td>billing_address_country_code</td><td>Alphanumeric (10)</td><td>O</td><td>Billing Address Country Code</td></tr><tr><td>receiver_name_for_shipping</td><td>Alphanumeric (100)</td><td>C</td><td>Receiver Name</td></tr><tr><td>shipping_lastname</td><td>Alphanumeric</td><td>O</td><td>Receiver last name</td></tr><tr><td>shipping_address</td><td>Alphanumeric (200)</td><td>O</td><td>Shipping Address</td></tr><tr><td>shipping_address_city</td><td>Alphanumeric (50)</td><td>O</td><td>Shipping Address City</td></tr><tr><td>shipping_address_region</td><td>Alphanumeric (100)</td><td>O</td><td>Shipping Address Region</td></tr><tr><td>shipping_address_state</td><td>Alphanumeric (100)</td><td>O</td><td>Shipping Address State</td></tr><tr><td>shipping_address_poscode</td><td>Alphanumeric (10)</td><td>O</td><td>Shipping Address Pos Code</td></tr><tr><td>shipping_address_country_code</td><td>Alphanumeric (10)</td><td>O</td><td>Shipping Address Country Code</td></tr><tr><td>shipping_msisdn</td><td>Numeric</td><td>C</td><td>Shipping phone number</td></tr><tr><td>item</td><td>Array of Object</td><td>C</td><td><p>Item details</p><p></p><p><strong>Notes:</strong></p><ul><li>Variable that contains in this parameter are <strong>customizeable</strong>, <strong>except Amount</strong></li><li>This parameter is <strong>Mandatory</strong> <strong>for</strong> payment channel <strong>Akulaku, DanaSubs, Kredivo</strong> and <strong>BRICeria</strong></li></ul></td></tr><tr><td>    product</td><td>Alphanumeric (50)</td><td>M</td><td>Item Name</td></tr><tr><td>    amount</td><td>Numeric</td><td>M</td><td>Item Price</td></tr><tr><td>    qty</td><td>Numeric (32)</td><td>M</td><td>Item Quantity</td></tr><tr><td>    payment_plan</td><td>Numeric (1)</td><td>M</td><td><p>Payment plan </p><p>1: Full Settlement </p><p>2: Installement</p></td></tr><tr><td>    tenor</td><td>Numeric (2)</td><td>M</td><td><p>Installment Tenor </p><p>00: Full Payment </p><p>03: 3 months </p><p>06: 6 months </p><p>12: 12 months </p><p>Tenor 03,06,12 only use on BCA KlikPay channel</p></td></tr><tr><td>    merchant_id</td><td>Numeric (5)</td><td>M</td><td>Merchant Id From Payment Channel ex : MID from BCA KlikPay</td></tr><tr><td>reserve1</td><td>Alphanumeric (50)</td><td>O</td><td></td></tr><tr><td>reserve2</td><td>Alphanumeric (50)</td><td>C</td><td></td></tr><tr><td>signature</td><td>Alphanumeric (100)</td><td>M</td><td>sha1(md5(user_id merchant + password merchant + bill_no))</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample XML Request" %}

```xml
<faspay>
  <request>Post Data Transaction</request>
  <merchant_id>99999</merchant_id>
  <merchant>Sophia Store</merchant>
  <bill_no>647998170894149</bill_no>
  <bill_reff>647998170894149</bill_reff>
  <bill_date>2020/9/02 11:25:53 AM</bill_date>
  <bill_expired>2017/9/02 3:25:53 PM</bill_expired>
  <bill_desc>MIYAKO Stand Water Dispenser - Red Black (Merchant)</bill_desc>
  <bill_currency>IDR</bill_currency>
  <bill_gross>000</bill_gross>
  <bill_tax>000</bill_tax>
  <bill_miscfee>000</bill_miscfee>
  <bill_total>75600000</bill_total>
  <cust_no>USR170709275</cust_no>
  <cust_name>John Doe</cust_name>
  <payment_channel>402</payment_channel>
  <pay_type>1</pay_type>
  <bank_userid>bot31160</bank_userid>
  <msisdn>628122131187</msisdn>
  <email>john@gmail.com</email>
  <terminal>10</terminal>
  <billing_address>Kawasan industri sentul.jl.olympic raya kav.b8 sentul bogor</billing_address>
  <billing_address_city>Bogor</billing_address_city>
  <billing_address_region>Bogor</billing_address_region>
  <billing_address_state>Jawa Barat</billing_address_state>
  <billing_address_poscode>16810</billing_address_poscode>
  <billing_address_country_code>ID</billing_address_country_code>
  <receiver_name_for_shipping>John Doe</receiver_name_for_shipping>
  <shipping_address>Kawasan industri sentul.jl.olympic raya kav.b8 sentul bogor</shipping_address>
  <shipping_address_city>Bogor</shipping_address_city>
  <shipping_address_region>Bogor</shipping_address_region>
  <shipping_address_state>Jawa Barat</shipping_address_state>
  <shipping_address_poscode>16810</shipping_address_poscode>
  <shipping_address_country_code>ID</shipping_address_country_code>
  <item>
    <product>MIYAKO Stand Water D</product>
    <amount>54900000</amount>
    <qty>1</qty>
    <payment_plan>1</payment_plan>
    <tenor>00</tenor>
    <merchant_id />
  </item>
  <item>
    <product>Shipping Cost</product>
    <amount>20700000</amount>
    <qty>1</qty>
    <payment_plan>1</payment_plan>
    <tenor>00</tenor>
    <merchant_id />
  </item>
  <reserve1 />
  <reserve2 />
<signature>be8791ac5f10bb042834896598bfc6bb9aadcbf9</signature>
</faspay>
```

{% endtab %}

{% tab title="Sample JSON Request" %}

```php
{
  "request":"Post Data Transaction",
  "merchant_id":"98765",
  "merchant":"Sophia Store",
  "bill_no":"98765123456789",
  "bill_reff":"12345678",
  "bill_date":"2020-09-02 10:48:10",
  "bill_expired":"2020-09-03 10:48:10",
  "bill_desc":"Payment #12345678",
  "bill_currency":"IDR",
  "bill_gross":"0",
  "bill_miscfee":"0",
  "bill_total":"1000000",
  "cust_no":"12",
  "cust_name":"John Doe",
  "payment_channel":"302",
  "pay_type":"1",
  "bank_userid":"",
  "msisdn":"628122131187",
  "email":"john@gmail.com",
  "terminal":"10",
  "billing_name":"0",
  "billing_lastname":"0",
  "billing_address":"jalan pintu air raya",
  "billing_address_city":"Jakarta Pusat",
  "billing_address_region":"DKI Jakarta",
  "billing_address_state":"Indonesia",
  "billing_address_poscode":"10710",
  "billing_msisdn":"",
  "billing_address_country_code":"ID",
  "receiver_name_for_shipping":"John Doe",
  "shipping_lastname":"",
  "shipping_address":"jalan pintu air raya",
  "shipping_address_city":"Jakarta Pusat",
  "shipping_address_region":"DKI Jakarta",
  "shipping_address_state":"Indonesia",
  "shipping_address_poscode":"10710",
  "shipping_msisdn":"",
  "shipping_address_country_code":"ID",
  "item":[
    {
      "product":"Invoice No. inv-985/2017-03/1234567891",
      "qty":"1",
      "amount":"1000000",
      "payment_plan":"01",
      "merchant_id":"99999",
      "tenor":"00"
    }
  ],
  "reserve1":"",
  "reserve2":"",
  "signature":"5807a17ccd950904ec0a303725fa8a4b36c89e2f"
}
```

{% endtab %}
{% endtabs %}

{% hint style="danger" %}

* Writing without separators. **Example:** Rp. 10.000,00 Written 1000000
* **Signature for Post Data :**&#x20;

  $signature = sha1(md5(($user\_id.$pass.$bill\_no)));\
  **Sample signature:** sha1(md5("bot310001p\@ssw0rd310001zx")) = e0ba1b2dc29ab4cb4221df092f44b1c4e6f45c63
  {% endhint %}

**Response Parameter Post Data Transaction**

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

<table><thead><tr><th width="164">Parameter</th><th width="173">Data Type</th><th width="86">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>response</td><td>Alphanumeric (50)</td><td>O</td><td>Response Name</td></tr><tr><td>trx_id</td><td>Numeric (16)</td><td>M</td><td>Transaction ID (Issued/generated by Faspay (Media Indonusa)) Notes: Unique Transaction ID for 1 day or as long as it hasn't been paid and hasn't expired</td></tr><tr><td>merchant_id</td><td>Numeric (5)</td><td>M</td><td>Merchant Code</td></tr><tr><td>merchant</td><td>Alphanumeric (32)</td><td>M</td><td>Merchant Name</td></tr><tr><td>bill_no</td><td>Alphanumeric (32)</td><td>M</td><td>Order No</td></tr><tr><td>response_code</td><td>Numeric (2)</td><td>M</td><td>Response Code 00 Success</td></tr><tr><td>response_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Response Code Description</td></tr><tr><td>redirect_url</td><td>Alphanumeric</td><td>O</td><td>the redirect url for the next process, available only on JSON format</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample XML Response" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<faspay>
    <response>Transmission Detail Info</response>
    <trx_id>3100440033666278</trx_id>
    <merchant_id>31004</merchant_id> 
    <merchant>Sophia Store</merchant>
    <bill_no>31004001</bill_no>
    <bill_items>
        <product>Storybook</product>
        <qty>2</qty>
        <amount>2000000</amount>
        <payment_plan>01</payment_plan>
        <merchant_id/>
        <tenor>00</tenor>
    </bill_items>
    <bill_items>
        <product>Drawingbook</product>
        <qty>1</qty>
        <amount>1000000</amount>
        <payment_plan>02</payment_plan>
        <tenor>03</tenor>
        <merchant_id/>           
    </bill_items>
    <bill_items>
        <product>Notebooks</product>
        <qty>4</qty>
        <amount>1500000</amount>
        <payment_plan>01</payment_plan>
        <tenor>06</tenor>
        <merchant_id/>
    </bill_items>
    <response_code>00</response_code>
    <response_desc>Success</response_desc>
</faspay>
```

{% endtab %}

{% tab title="Sample JSON Response" %}

```json
{
    "response": "Transmission Detail Info",
    "trx_id": "9876530200004184",
    "merchant_id": "98765",
    "merchant": "Sophia Store",
    "bill_no": "98765123456789",
    "bill_items": [
        {
            "product": "Invoice No. inv-985/2017-03/1234567891",
            "qty": "1",
            "amount": "1000000",
            "payment_plan": "01",
            "merchant_id": "99999",
            "tenor": "00"
        }
    ],
    "response_code": "00",
    "response_desc": "Success",
    "redirect_url": "https://dev.faspay.co.id/pws/100003/0830000010100000/5807a17ccd950904ec0a303725fa8a4b36c89e2f?trx_id=9876530200004184&merchant_id=98765&bill_no=98765123456789"
}
```

{% endtab %}
{% endtabs %}


---

# 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/debit-transaction/post-data-transaction.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.
