# Xpress Version 4🆕

Faspay Xpress is another way to integrate with Faspay business services, the difference is the payment channel option is on the Faspay page.

The basic integration process of Faspay Xpress will be explained below.

#### Integration Step

1. Post Data Transaction
2. Callback/return URL (for one-step transaction)
3. Payment Notification

## 1. Post Data Transaction

### Endpoint URL 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 or UAT can use URL development.

| Development                                   |
| --------------------------------------------- |
| <https://xpress-sandbox.faspay.co.id/v4/post> |

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

<table><thead><tr><th width="295">Parameter</th><th width="157">Data Type</th><th width="97">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>merchant_id</td><td>Numeric (5)</td><td>M</td><td>Merchant code from faspay</td></tr><tr><td>bill_no</td><td>Alphanumeric (32)</td><td>M</td><td>Order Number</td></tr><tr><td>bill_date</td><td>Datetime</td><td>M</td><td>Transaction/Order Date</td></tr><tr><td>bill_expired</td><td>Datetime</td><td>M</td><td><p>Transaction/Order Expiry</p><p>Date</p></td></tr><tr><td>bill_desc</td><td>Alphanumeric (128)</td><td>M</td><td>Transaction Description</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>cust_no</td><td>Alphanumeric (32)</td><td>M</td><td>Customer Number</td></tr><tr><td>cust_name</td><td>Alphanumeric (32)</td><td>M</td><td>Customer Name</td></tr><tr><td>payment_channel</td><td>Array (128)</td><td>O</td><td>Payment channel code that will be displayed as payment method on Xpress page. Default will be referred to the current setting.</td></tr><tr><td>return_url</td><td>Alphanumeric (32)</td><td>M</td><td>url using to return to merchant website (*channel credit card)</td></tr><tr><td>msisdn</td><td>Numeric (128)</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>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 Address 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 Post Code</td></tr><tr><td>billing_address_country_code</td><td>Alphanumeric (10)</td><td>O</td><td><p>Billing Address Country</p><p>Code</p></td></tr><tr><td>receiver_name_for_shipping</td><td>Alphanumeric (100)</td><td>O</td><td>Receiver 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 Post 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>item</td><td>Array of object</td><td> </td><td> </td></tr><tr><td>product</td><td>Alphanumeric (50)</td><td>M</td><td>Item Name</td></tr><tr><td>qty</td><td>Numeric (32)</td><td>M</td><td>Item Quantity</td></tr><tr><td>amount</td><td>Numeric (15)</td><td>M</td><td>Item Price</td></tr><tr><td>button_color</td><td>Numeric (6)</td><td>O</td><td>Hex color for button</td></tr><tr><td>background_color</td><td>Numeric (6)</td><td>O</td><td>Hex color for background</td></tr><tr><td>merchant_logo</td><td>Alphanumeric (255)</td><td>M</td><td>Merchant logo</td></tr><tr><td>signature</td><td>Alphanumeric (100)</td><td>M</td><td>sha1(md5(user_id merchant + password merchant + bill_no + bill_total))</td></tr></tbody></table>

*Notes:*&#x20;

M = Mandatory

O = Optional

C = Conditional
{% endtab %}

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

```json
{
    "merchant_id": "98765",
    "bill_no": "98765123456789",
    "bill_date": "2020-09-02 10:48:10",
    "bill_expired": "2020-09-03 10:48:10",
    "bill_gross": "0",
    "bill_miscfee": "0",
    "bill_total": "1000000",
    "bill_desc": "Pembayaran #12345678",
    "cust_no": "12",
    "payment_channel": [
        "800",
        "402",
        "702",
        "711"
    ],
    "cust_name": "Nur Auliya",
    "return_url": "https://alamatwebsite.com/response",
    "msisdn": "628122131187",
    "email": "faspay@gmail.com",
    "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_address_country_code": "ID",
    "receiver_name_for_shipping": "Nur Auliya",
    "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_address_country_code": "ID",
    "item": [
        {
            "product": "Invoice No. inv-985/2017-03/1234567891",
            "qty": "1",
            "amount": "1000000"
        }
    ],
    "button_color": "333333",
    "background_color": "333333",
    "signature": "5807a17ccd950904ec0a303725fa8a4b36c89e2f"
}
```

{% endtab %}
{% endtabs %}

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

<table><thead><tr><th width="178">Parameter</th><th width="181">Data Type</th><th width="92">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>bill_no</td><td>Alphanumeric(32)</td><td>M</td><td>Order No</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>response_code</td><td>Numeric (2)</td><td>M</td><td><p>Response code</p><p>00 Success</p></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>M</td><td>The redirect url for Xpress page (short version)</td></tr></tbody></table>

*Notes:*&#x20;

M = Mandatory

O = Optional

C = Conditional
{% endtab %}

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

<pre class="language-json"><code class="lang-json">{
    "bill_no": "98765123456789",
    "merchant_id": "98765", 
    "merchant": "Faspay sandbox", 
    "response_code": "00", 
    "response_desc": "Success",
    "redirect_url":"https://dev.faspay.co.id/pws/100003/0830000010100000/5807a17ccd950904ec0a303725fa8a4b36c89e 2f?trx_id=9876530200004184&#x26;merchant_id=98765&#x26;bill_no=98765123456789"
<strong>}
</strong></code></pre>

{% endtab %}
{% endtabs %}

{% hint style="info" %}
`redirect_url` must be hit via the client-side browser, then a channel list will appear.
{% endhint %}

#### For every valid post data will get results like the example below:

<figure><img src="/files/D8NlBs9RUXrQ8e3T4Lbs" alt=""><figcaption><p>Choose Payment Method</p></figcaption></figure>

<figure><img src="/files/yO6sylhYUxNg4MAs64pr" alt=""><figcaption><p>Confirmation Payment Method</p></figcaption></figure>

<figure><img src="/files/TcnM4z7pLA3kGiUpi3Pl" alt=""><figcaption><p>Transaction Order Detail</p></figcaption></figure>

## 2. Callback/Return URL

After the customer completes the payment via the bank's website, the bank website automatically redirects the customer to the Callback/Return URL. Please provide the URL and make sure it's registered on the Faspay system. For detailed reference can be found [here](https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/url-callback-return-url)

## 3. Payment Notification

Payment notification from Faspay to the Merchant backend will also be triggered in the event of transaction status getting updated, to ensure Merchant is securely informed. Please provide the URL and make sure it's already registered on the Faspay system

The detailed API reference can be found [here](< https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/payment-notification>)


---

# 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/xpress/xpress-version-4.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.
