# DANA Subs Integration Guide

Dana Subscription is one of the payment channels available on Faspay. When choosing DANA Subscription as a payment method, the User makes subscriptions at the beginning, then will be automatically cut in the next month.

## Integration Step:&#x20;

1. Post Data&#x20;
2. Inquiry
3. Query All Subscription
4. Inquiry Subscription
5. Payment Notification
6. Cancel Subscription

## 1. Post Data Transaction

This process is used to send transaction data from merchants to Faspay. This post data process is carried out when the merchant requests parameters and then Faspay will give a response to the request.

#### URL EndPoint&#x20;

<table><thead><tr><th width="98.33333333333331">Type</th><th width="614">Development</th></tr></thead><tbody><tr><td><strong>XML</strong></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><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>

#### A. Post Data Transaction Request

The parameters that must be provided by the Merchant system to be accessed by the Faspay system are as follows:

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

<table><thead><tr><th width="293">Parameter</th><th width="183">Data Type</th><th width="97">M/O/C</th><th width="201">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</td><td>M</td><td>Transaction/ Order Date</td></tr><tr><td>bill_expired</td><td>Datetime YYYY-MM-DD HH:MM:SS</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>Char (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 without tax</td></tr><tr><td>bill_tax</td><td>Numeric (15)</td><td>O</td><td>Tax (IDR)</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 (3)</td><td>M</td><td>Payment Channel Code</td></tr><tr><td>pay_type</td><td>Alphanumeric (1)</td><td>M</td><td>Payment code :<br>1: Full Settlement<br>2: Installment<br>3: Mixed 1 &#x26; 2</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>Email</td></tr><tr><td>terminal</td><td>Numeric (2)</td><td>M</td><td>Terminal Origin<br>10. Web<br>20. MobApp Blackberry<br>21. MobApp Android<br>22. MobAppiOS<br>23. MobApp Windows<br>24. MobApp Symbian<br>30. TabApp BlackBerry<br>31. TabApp Android<br>32. TabAppiOS<br>33. TabApp Windows</td></tr><tr><td>billing_name</td><td>Alphanumeric</td><td>C</td><td>Billing 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>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 Pos Code</td></tr><tr><td>shipping_msisdn</td><td>Numeric</td><td>O</td><td>Shipping number phone</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</td><td>M</td><td>List item product</td></tr><tr><td>product</td><td>Alphanumeric (50)</td><td>M</td><td>Product name</td></tr><tr><td>subscription_message</td><td>Alphanumeric (50)</td><td>M</td><td>Product Subcription detail</td></tr><tr><td>subscription_interval_type</td><td>Alphanumeric (10)</td><td>M</td><td><p>Determine months/weeks</p><p>(e.g MONTHLY/WEEKLY)</p></td></tr><tr><td>subscription_interval_value</td><td>Numeric</td><td>M</td><td>Determine how many months/weeks (e.g 1/2/3/4)</td></tr><tr><td>external_goods_id</td><td>Alphanumeric (10)</td><td>M</td><td>Item code</td></tr><tr><td>tenor</td><td>Numeric</td><td>M</td><td>Determine the end date of subscription</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 Code - XML" %}

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<faspay>
  <request>Transmission of Purchase Detail Info</request>
  <merchant_id>99999</merchant_id>
  <merchant>Sophia Store</merchant>
  <bill_no>84938942</bill_no>
  <bill_reff>20200324_02-2286704_336</bill_reff>
  <bill_date>2021-12-30 10:00:00</bill_date>
  <bill_expired>2021-12-31 12:04:10</bill_expired>
  <bill_desc>Payment #12345678</bill_desc>
  <bill_currency>IDR</bill_currency>
  <bill_gross>0</bill_gross>
  <bill_tax>0</bill_tax>
  <bill_miscfee>0</bill_miscfee>
  <bill_total>10000</bill_total>
  <cust_no>1</cust_no>
  <cust_name>John Doe</cust_name>
  <cust_lastname>Doe</cust_lastname>
  <payment_channel>722</payment_channel>
  <pay_type>1</pay_type>
  <bank_userid></bank_userid>
  <msisdn></msisdn>
  <email></email>
  <terminal>10</terminal>
  <billing_name>John</billing_name>
  <billing_lastname>0</billing_lastname>
  <billing_address>jalan pintu air raya</billing_address>
  <billing_address_city>Jakarta Pusat</billing_address_city>
  <billing_address_region>DKI Jakarta</billing_address_region>
  <billing_address_state>Indonesia</billing_address_state>
  <billing_address_poscode>10710</billing_address_poscode>
  <billing_msisdn>8766688686</billing_msisdn>
  <billing_address_country_code>ID</billing_address_country_code>
  <receiver_name_for_shipping>John Doe</receiver_name_for_shipping>
  <shipping_lastname></shipping_lastname>
  <shipping_address>jalan pintu air raya</shipping_address>
  <shipping_address_city>Jakarta Pusat</shipping_address_city>
  <shipping_address_region>DKI Jakarta</shipping_address_region>
  <shipping_address_state>Indonesia</shipping_address_state>
  <shipping_address_poscode>10710</shipping_address_poscode>
  <shipping_msisdn>8766688686</shipping_msisdn>
 <shipping_address_country_code>ID</shipping_address_country_code>
  <item>
    <product>Theater A</product>
    <subscription_message>Cartoon series A</subscription_message>
<subscription_interval_type>MONTHLY</subscription_interval_type>
    <subscription_interval_value>1</subscription_interval_value>
    <external_goods_id>cart-A9314</external_goods_id>
    <tenor>5</tenor>
  </item>
  <reserve1>0</reserve1>
  <reserve2></reserve2>
  <signature>09b2a8ed8e6bfe936cd24e69c12f675779ea240d</signature>
</faspay>

```

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
    "request": "Transmission of Purchase Detail Info",
    "merchant_id": 99999,
    "merchant": "Sophia Store",
    "bill_no": 84938942,
    "bill_reff": "20200324_02-2286704_336",
    "bill_date": "2021-12-30 10:00:00",
    "bill_expired": "2021-12-31 12:04:10",
    "bill_desc": "Payment #12345678",
    "bill_currency": "IDR",
    "bill_gross": 0,
    "bill_tax": 0,
    "bill_miscfee": 0,
    "bill_total": 10000,
    "cust_no": 1,
    "cust_name": "John Doe",
    "cust_lastname": "Doe",
    "payment_channel": 722,
    "pay_type": 1,
    "bank_userid": "",
    "msisdn": "",
    "email": "",
    "terminal": 10,
    "billing_name": "John",
    "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": 8766688686,
    "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": 8766688686,
    "shipping_address_country_code": "ID",
    "item": [
        {
            "product": "Theater A",
            "subscription_message": "Kartun seri A",
            "subscription_interval_type": "MONTHLY",
            "subscription_interval_value": "1",
            "external_goods_id": "cart-A9314",
            "tenor": 5
        }
    ],
    "reserve1": 0,
    "reserve2": "",
    "signature": "09b2a8ed8e6bfe936cd24e69c12f675779ea240d"
}

```

{% endtab %}
{% endtabs %}

#### Post Data Transaction Response

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

<table><thead><tr><th width="259">Parameter</th><th width="181">Data Type</th><th width="134">M/O/C</th><th width="212">Description</th></tr></thead><tbody><tr><td>response</td><td>Alphanumeric</td><td>O</td><td>Response description</td></tr><tr><td>trx_id</td><td>Numeric (20)</td><td>M</td><td>Transaction ID (Issued/generated by Faspay (Media Indonusa)). For the next payment has unique transaction ID.</td></tr><tr><td>merchant_id</td><td>Numeric</td><td>M</td><td>Merchant Code From Faspay = BOI</td></tr><tr><td>merchant</td><td>Alphanumeric</td><td>M</td><td>Merchant’s name</td></tr><tr><td>bill_no</td><td>Numeric</td><td>M</td><td>Order number</td></tr><tr><td>bill_items</td><td>Alphanumeric</td><td>O</td><td>Billing items / purchase items</td></tr><tr><td>product</td><td>Alphanumeric (50)</td><td>M</td><td>Item Name</td></tr><tr><td>subscription_message</td><td>Alphanumeric (50)</td><td>M</td><td>Product Subcription detail</td></tr><tr><td>subscription_interval_type</td><td>Alphanumeric (10)</td><td>M</td><td><p>Determine months/weeks</p><p>(e.g MONTHLY/WEEKLY)</p></td></tr><tr><td>subscription_interval_value</td><td>Numeric</td><td>M</td><td>Determine how many months/weeks (e.g 1/2/3/4)</td></tr><tr><td>external_goods_id</td><td>Alphanumeric (10)</td><td>M</td><td>item code</td></tr><tr><td>tenor</td><td>Numeric</td><td>M</td><td>Determine the end date of subscription</td></tr><tr><td>response_code</td><td>Numeric (2)</td><td>M</td><td><p>Response code<br>00 : Success</p><p>01 : Failed</p></td></tr><tr><td>response_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Response Description</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<faspay>
  <response>Transmission of Purchase Detail Info</response>
  <trx_id>9999971744152184</trx_id>
  <merchant_id>99999</merchant_id>
  <merchant>Sophia Store</merchant>
  <bill_no>84938942</bill_no>
  <bill_items>
     <product>Theater A</product>
     <subscription_message>Cartoon series A</subscription_message>
     <subscription_interval_type>MONTHLY</subscription_interval_type>
     <subscription_interval_value>1</subscription_interval_value>
     <external_goods_id>cart-A9314</external_goods_id>
     <tenor>5</tenor>
  </bill_items>
  <response_code>00</response_code>
  <response_desc>Success</response_desc>
  <redirect_url>https://debit-staging.faspay.co.id/pws/100003/0830000010100000/09b2a8ed8e6bfe936cd24e69c12f675779ea240d?trx_id=9999971744152184&amp;merchant_id=99999&amp;bill_no=84938942</redirect_url>
</faspay>

```

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
  "response": "Transmission of Purchase Detail Info",
  "trx_id": "9999971744152184",
  "merchant_id": "99999",
  "merchant": "Sophia Store",
  "bill_no": "84938942",
  "bill_items": [
    {
      "product": "Theater A",
      "subscription_message": "Cartoon series A",
      "subscription_interval_type": "MONTHLY",
      "subscription_interval_value": "1",
      "external_goods_id": "cart-A9314",
      "tenor": "5"
    }
  ],
  "response_code": "00",
  "response_desc": "Success",
  "redirect_url": "https://debit-staging.faspay.co.id/pws/100003/0830000010100000/09b2a8ed8e6bfe936cd24e69c12f675779ea240d?trx_id=9999971744152184&merchant_id=99999&bill_no=84938942"
}
```

{% endtab %}
{% endtabs %}

## 2. Inquiry

Inquiry is a process of checking the status of Faspay’s payment transaction. The details of API Services of inquiry can be found [here](https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/inquiry-payment-status)

## 3. Query All Subscription

This service functions to query all payments or subscription-related transactions.

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

#### Query All Subscription Request

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

<table><thead><tr><th width="182">Parameter</th><th width="149">Data Type</th><th width="123">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>request</td><td>Alphanumeric (50)</td><td>O</td><td>Request Description</td></tr><tr><td>subscription_id</td><td>Numeric</td><td>M</td><td>Id subscription</td></tr><tr><td>bill_no</td><td>Numeric</td><td>M</td><td>Order number</td></tr><tr><td>merchant_id</td><td>Numeric (5)</td><td>M</td><td>Merchant Code From Faspay = BOI</td></tr><tr><td>payment_channel</td><td>Numeric (3)</td><td>M</td><td>Payment Channel Code</td></tr><tr><td>page</td><td>Numeric</td><td>M</td><td>The page number to display</td></tr><tr><td>limit</td><td>Numeric</td><td><p>M</p><p> </p></td><td>Limit the amount of data wants to display</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 Code - XML" %}

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<faspay>
  <request>Query All DANA Subscription</request>   
  <subscription_id>20211230111315800000DANAW3ID894000086077</subscription_id>
  <bill_no>84938942</bill_no>
  <merchant_id>99999</merchant_id>
  <payment_channel>722</payment_channel>
  <page>1</page>
  <limit>10</limit>
  <signature>09b2a8ed8e6bfe936cd24e69c12f675779ea240d</signature>
</faspay>
```

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
  "request": "Query All DANA Subscription",
  "subscription_id": "20211230111315800000DANAW3ID89400008607",
  "bill_no": "84938942",
  "merchant_id": "99999",
  "payment_channel": "722",
  "page": "1",
  "limit": "10",
  "signature": "09b2a8ed8e6bfe936cd24e69c12f675779ea240d"
}
```

{% endtab %}
{% endtabs %}

#### Query All Subscribe Response

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

<table><thead><tr><th width="220">Parameter</th><th width="178">Data Type</th><th width="127">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>response</td><td>Alphanumeric (50)</td><td>O</td><td>Response 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>payment_channel</td><td>Numeric (3)</td><td>M</td><td>Payment Channel Code</td></tr><tr><td>merchant</td><td>Alphanumeric (32)</td><td>M</td><td>Merchant name</td></tr><tr><td>subscription_id</td><td>Numeric</td><td>M</td><td>id subscription</td></tr><tr><td>list_transaction</td><td>Array</td><td>M</td><td>Report listing all the transactions</td></tr><tr><td>transaction_1</td><td>Array</td><td>M</td><td>Detail payment of all the transactions</td></tr><tr><td>payment_date</td><td>Datetime YYYY-MM-DD HH:MM:SS</td><td>M</td><td>Payment Date (from Payment Channel)</td></tr><tr><td>payment_status_code</td><td>Numeric (1)</td><td>M</td><td><p>Status Code</p><p>0 Unprocessed</p><p>1 In Process</p><p>2 Payment Success</p><p>4 Payment Reserval</p><p>5 No bills found</p><p>8 Payment Cancelled</p><p>9 Unknown</p><p> </p></td></tr><tr><td>payment_status_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Description status of payment</td></tr><tr><td>payment_amount</td><td>Numeric (3)</td><td>M</td><td>Payment Total</td></tr><tr><td>response_code</td><td>Numeric (2)</td><td>M</td><td><p>Response code:</p><p>00 : Success</p><p>01 : Failed</p></td></tr><tr><td>response_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Response Description</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<faspay>
    <response>Query Subscription DANA Subscription</response>
    <merchant_id>99999</merchant_id>
    <payment_channel>722</payment_channel>
    <merchant>Sophia Store</merchant>
    <subscription_id>20220920111315800000DANAW3ID708600245077</subscription_id>
    <list_transaction>
        <transaction_1>
            <payment_date>2022-09-20 10:55:09</payment_date>
            <payment_status_code>2</payment_status_code>
            <payment_status_desc>Payment Success</payment_status_desc>
            <payment_amount>100</payment_amount>
        </transaction_1>
    </list_transaction>
    <response_code>00</response_code>
    <response_desc>Success</response_desc>
</faspay>

```

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
  "response": "Query Subscription DANA Subscription",
  "merchant_id": "99999",
  "payment_channel": "722",
  "merchant": "Sophia Store",
  "trx_id": "9999971744152184",
  "subscription_id": "20211230111315800000DANAW3ID894000086077",
  "list_transaction": {
    "transaction_1": {
      "payment_date": "2021-12-30 10:56:18",
      "payment_status_code": "2",
      "payment_status_desc": "Payment Success",
      "payment_amount": "100"
    }
  },
  "response_code": "00",
  "response_desc": "Success",
}

```

{% endtab %}
{% endtabs %}

## 4. Inquiry Subscription

This service function integrates Faspay's Inquiry Subscription API with the Fund Details Query Order API.

#### URL EndPoint

<table><thead><tr><th width="121.33333333333331">Type</th><th>Development</th></tr></thead><tbody><tr><td>XML</td><td>https://debit-sandbox.faspay.co.id/ pws/100043/183xx00010100000</td></tr><tr><td>JSON</td><td>https://debit-sandbox.faspay.co.id/ cvr/100043/10</td></tr></tbody></table>

#### Inquiry Subscription Request

The parameters that must be provided by the Merchant system to be accessed by the Faspay system are as follows:

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

<table><thead><tr><th width="170">Parameter</th><th width="159">Data Type</th><th width="134">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>request</td><td>Alphanumeric (50)</td><td>O</td><td>Request Description</td></tr><tr><td>subscription_id</td><td>Numeric (16)</td><td>M</td><td>ID Subscription</td></tr><tr><td>merchant_id</td><td>Numeric (5)</td><td>M</td><td>Merchant Code</td></tr><tr><td>bill_no</td><td>Alphanumeric (16)</td><td>M</td><td>Order Number</td></tr><tr><td>signature</td><td>Alphanumeric</td><td>M</td><td>sha1(md5((user_id + password + bill_no))</td></tr></tbody></table>
{% endtab %}

{% tab title=" Sample Code - XML " %}

```xml
<faspay>
    <request>Inquiry Subscription DANA Subscription</request>    
    <subscription_id>20220922111315800000DANAW3ID700500247519</subscription_id>
    <merchant_id>99999</merchant_id>
    <bill_no>9881236390987599</bill_no>
    <signature>54e43aa70b12aacceeb2b0b2c3cfc16bfea951ed</signature>
</faspay>
```

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
    "request": "Inquiry Subscription DANA Subscription",
    "subscription_id": "20220922111315800000DANAW3ID700500247519",
    "merchant_id": "99999",
    "bill_no": "9881236390987599",
    "signature": "54e43aa70b12aacceeb2b0b2c3cfc16bfea951ed"
}
```

{% endtab %}
{% endtabs %}

#### Inquiry Subscription Response

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

<table><thead><tr><th width="192">Parameter</th><th width="214">Data Type</th><th width="121">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>subscription_id</td><td>Numeric (16)</td><td>M</td><td>ID Subscription</td></tr><tr><td>merchant_id</td><td>Numeric (6)</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 number</td></tr><tr><td>subs_status_code</td><td>Numeric (1)</td><td>M</td><td><p>Status Code</p><p>1 Active</p><p>2 In Active</p></td></tr><tr><td>subs_status_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Description Status</td></tr><tr><td>payment_total</td><td>Numeric</td><td>M</td><td>Total amount of payment</td></tr><tr><td>response_code</td><td>Numeric (2)</td><td>M</td><td><p>Response code:</p><p>00 = Success</p><p>01 = Failed</p></td></tr><tr><td>response_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Response description</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<faspay>
	<response>Inquiry Subscription DANA Subscription</response>
	<subscription_id>20220922111315800000DANAW3ID700500247519</subscription_id>
	<merchant>Sophia Store</merchant>
	<merchant_id>99999</merchant_id>
	<bill_no>9881236390987599</bill_no>
	<subs_status_code>1</subs_status_code>
	<subs_status_desc>Active</subs_status_desc>
	<payment_total>100.00</payment_total>
	<response_code>00</response_code>
	<response_desc>Success</response_desc>
</faspay>

```

{% endtab %}

{% tab title="Sample Code - JSON" %}

<pre class="language-json"><code class="lang-json">{
  "response":"Inquiry Subscription DANA Subscription",
  "subscription_id":"20220922111315800000DANAW3ID700500247519",
<strong>  "merchant":"Sophia Store",
</strong>  "merchant_id":"99999",
  "bill_no":"9881236390987599",
  "subs_status_code":"1",
  "subs_status_desc":"Active",
  "payment_total":"100.00",
  "response_code":"00",
  "response_desc":"Success"
}

</code></pre>

{% endtab %}
{% endtabs %}

## 5. Payment Notification

A process for sending notifications to the merchant's payment of Faspay. Payment notifications are sent via URL merchant who previously had been prepared, which is the URL to receive notifications of transactions hit. Faspay will repeatedly send a payment notification 3 times if the first try does not get an OK response.

#### Payment Notification Request

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

<table><thead><tr><th width="219">Parameter</th><th width="210">Data Type</th><th width="95">M/O/C</th><th width="196">Description</th></tr></thead><tbody><tr><td>request</td><td>Alphanumeric (50)</td><td>O</td><td>Request Description</td></tr><tr><td>trx_id</td><td>Numeric (16)</td><td>M</td><td>Transaction ID (Issued/generated by Faspay (Media Indonusa)). For the next payment has unique transaction ID.</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 (16)</td><td>M</td><td>Order Number</td></tr><tr><td>payment_reff</td><td>Alphanumeric (16)</td><td>M</td><td>Subscription ID</td></tr><tr><td>payment_date</td><td>Datetime YYYY-MM-DD HH:MM:SS</td><td>M</td><td>Payment Date (from Payment Channel)</td></tr><tr><td>payment_status_code</td><td>Numeric (1)</td><td>M</td><td><p>Status Code</p><p>0 Unprocessed</p><p>1 In Process</p><p>2 Payment Success</p><p>4 Payment Reserval</p><p>5 No bills found</p><p>8 Payment Cancelled</p><p>9 Unknown</p><p> </p></td></tr><tr><td>payment_status_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Description Status</td></tr><tr><td>bill_total</td><td>Numeric</td><td>M</td><td>Total billing</td></tr><tr><td>payment_total</td><td>Numeric</td><td>M</td><td> </td></tr><tr><td>payment_channel_uid</td><td>Alphanumeric (50)</td><td>M</td><td>Cancel description</td></tr><tr><td>payment_channel</td><td>Datetime YYYY-MM-DD HH:MM:SS</td><td>M</td><td>Payment cancel date</td></tr><tr><td>signature</td><td>Alphanumeric</td><td>M</td><td>sha1(md5((user_id + password + bill_no))</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

<pre class="language-xml"><code class="lang-xml">&#x3C;?xml version="1.0" encoding="UTF-8"?>
&#x3C;faspay>
      &#x3C;request>Payment Notification&#x3C;/request>
      &#x3C;trx_id>9999971744152185&#x3C;/trx_id>
      &#x3C;merchant_id>99999&#x3C;/merchant_id>
<strong>      &#x3C;merchant>Sophia Store&#x3C;/merchant>
</strong>      &#x3C;bill_no>84938942&#x3C;/bill_no>
      &#x3C;payment_reff>20211230111315800000DANAW3ID894000086077&#x3C;/payment_reff>
      &#x3C;payment_date>2021-12-30 10:00:00&#x3C;/payment_date>
      &#x3C;payment_status_code>2&#x3C;/payment_status_code>
      &#x3C;payment_status_desc>Payment Success&#x3C;/payment_status_desc>
      &#x3C;bill_total>5000000&#x3C;/bill_total>
<strong>      &#x3C;payment_total>5000000&#x3C;/payment_total>
</strong>      &#x3C;payment_channel_uid>722&#x3C;/payment_channel_uid>
      &#x3C;payment_channel>DANA Subscription&#x3C;/payment_channel>
      &#x3C;signature>9ed18926fa88f83b469f3ae73ef71ef2a4835c03&#x3C;/signature>
&#x3C;/faspay>

</code></pre>

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
      "request": "Payment Notification",
      "trx_id": "9999971744152185",
      "merchant_id": "99999",
      "merchant": "Sophia Store",
      "bill_no": "84938942",
      "payment_reff": "20211230111315800000DANAW3ID894000086077",
      "payment_date": "2021-12-30 10:00:00",
      "payment_status_code": "2",
      "payment_status_desc": "Payment success",
      "bill_total": "5000000",
      "payment_total": "5000000",
      "payment_channel_uid": "722",
      "payment_channel": "DANA Subscription",
      "signature": "9ed18926fa88f83b469f3ae73ef71ef2a4835c03"
}

```

{% endtab %}
{% endtabs %}

#### Payment Notification Response

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

<table><thead><tr><th width="163">Parameter</th><th width="193">Data Type</th><th width="92">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)). For the next payment has unique transaction ID.</td></tr><tr><td>merchant_id</td><td>Numeric (6)</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 number</td></tr><tr><td>response_code</td><td>Numeric (2)</td><td>M</td><td><p>Response code:</p><p>00 : Success</p><p>01 : Failed</p></td></tr><tr><td>response_desc</td><td>Alphanumeric (32)</td><td>M</td><td>Response Description</td></tr><tr><td>response_date</td><td>Datetime YYYY-MM-DD HH:MM:SS</td><td>M</td><td>Response Date</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<faspay>
       <response>Payment Notification</response>
       <trx_id>9999971744152185</trx_id>
       <merchant_id>99999</merchant_id>
       <bill_no>84938942</bill_no>
       <response_code>2</response_code>
       <response_desc>Success</response_desc>
       <response_date>2021-12-30 10:00:30</response_date>
</faspay>

```

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
      "response": "Payment Notification",
      "trx_id": "9999971744152185",
      "merchant_id": "99999",
      "bill_no": "84938942",
      "response_code": "2",
      "response_desc": "Success",
      "response_date": "2021-12-30 10:00:30"
}
```

{% endtab %}
{% endtabs %}

## 6. Cancel Subscription

This cancel subscription service function to cancel the payment which means all future billing will be disabled and the customer will no longer be charged on the billing date set by the customer plan

#### URL EndPoint

<table><thead><tr><th width="110.33333333333331">Type</th><th width="630">Development</th></tr></thead><tbody><tr><td>XML</td><td><a href="https://debit-sandbox.faspay.co.id/pws/100005/183xx00010100000">https://debit-sandbox.faspay.co.id/pws/100005/183xx00010100000</a></td></tr><tr><td>JSON</td><td><a href="https://debit-sandbox.faspay.co.id/cvr/100005/10">https://debit-sandbox.faspay.co.id/cvr/100005/10</a></td></tr></tbody></table>

#### Cancel Subscription Request

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

<table><thead><tr><th width="179">Parameter</th><th width="149">Data Type</th><th width="122">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>request</td><td>Alphanumeric (50)</td><td>O</td><td>Request Description</td></tr><tr><td>trx_id</td><td>Numeric (16)</td><td>M</td><td>Transaction ID (Issued/generated by Faspay (Media Indonusa)). For the next payment has unique transaction ID.</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 (16)</td><td>M</td><td>Order Number</td></tr><tr><td>payment_cancel</td><td>Alphanumeric</td><td>M</td><td>Payment cancel description</td></tr><tr><td>signature</td><td>Alphanumeric</td><td>M</td><td>sha1(md5((user_id + password + bill_no))</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

<pre class="language-xml"><code class="lang-xml">&#x3C;faspay>
        &#x3C;request>Canceling Payment&#x3C;/request>
        &#x3C;trx_id>9999972289533352&#x3C;/trx_id>
        &#x3C;merchant_id>99999&#x3C;/merchant_id>
        &#x3C;merchant>Sophia Store&#x3C;/merchant>
        &#x3C;bill_no>9881236390987599&#x3C;/bill_no>
<strong>        &#x3C;payment_cancel>Out of Stock&#x3C;/payment_cancel>
</strong>        &#x3C;signature>54e43aa70b12aacceeb2b0b2c3cfc16bfea951ed&#x3C;/signature>
&#x3C;/faspay>

</code></pre>

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
  "request": "Canceling Payment",
  "trx_id": "9999972289533352",
  "merchant_id": "99999",
  "merchant": "Sophia Store",
  "bill_no": 9881236390987600,
  "payment_cancel": "Out Of Stock",
  "signature": "54e43aa70b12aacceeb2b0b2c3cfc16bfea951ed"
}

```

{% endtab %}
{% endtabs %}

#### Cancel Subscription Response

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

<table><thead><tr><th width="223">Parameter</th><th width="200">Data Type</th><th width="104">M/O/C</th><th width="174">Description</th></tr></thead><tbody><tr><td>response</td><td>Alphanumeric (50)</td><td>O</td><td>Request description</td></tr><tr><td>subscription_id</td><td>Numeric</td><td>M</td><td>id subscription</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 (16)</td><td>M</td><td>Order number</td></tr><tr><td>subs_status_code</td><td>Numeric (1)</td><td>M</td><td><p>Status Code:</p><p>1: Active</p><p>2: Inactive</p></td></tr><tr><td>subs_status_desc</td><td>Alphanumeric</td><td>M</td><td>Subscription status description</td></tr><tr><td>payment_cancel</td><td>Alphanumeric</td><td>M</td><td>Payment cancel description</td></tr><tr><td>payment_cancel_date</td><td>Datetime</td><td>M</td><td>Payment cancel date. Format YYYY-MM-DD hh:mm:ss</td></tr><tr><td>response_code</td><td>Numeric</td><td>M</td><td>Code description</td></tr><tr><td>response_desc</td><td>Alphanumeric</td><td>M</td><td>Response description</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Code - XML" %}

<pre class="language-xml"><code class="lang-xml">&#x3C;faspay>
<strong>        &#x3C;response>Canceling Payment&#x3C;/response>
</strong>        &#x3C;subscription_id>20220920111315800000DANAW3ID708600245077&#x3C;/subscription_id>
        &#x3C;merchant_id>99999&#x3C;/merchant_id>
<strong>        &#x3C;merchant>Sophia Store&#x3C;/merchant>
</strong><strong>        &#x3C;bill_no>9881236390987599&#x3C;/bill_no>
</strong>        &#x3C;subs_status_code>2&#x3C;/subs_status_code>
<strong>        &#x3C;subs_status_desc>Inactive&#x3C;/subs_status_desc>
</strong>        &#x3C;payment_cancel>Out of Stock&#x3C;/payment_cancel>
        &#x3C;payment_cancel_date>2022-10-10 10:00:00&#x3C;/payment_cancel_date>
        &#x3C;response_code>00&#x3C;/response_code>
        &#x3C;response_desc>Success&#x3C;/response_desc>
&#x3C;/faspay>
</code></pre>

{% endtab %}

{% tab title="Sample Code - JSON" %}

```json
{
  "response": "Canceling Payment",
  "subscription_id": "20220920111315800000DANAW3ID708600245077",
  "merchant_id": "99999",
  "merchant": "Sophia Store",
  "bill_no": "9881236390987600",
  "subs_status_code": "2",
  "subs_status_desc": "Inactive",
  "payment_cancel": "Out Of Stock",
  "payment_cancel_date": "2022-10-10 10:00:00",
  "response_code": "00",
  "response_desc": "Success"
}
```

{% endtab %}
{% endtabs %}
