# SNAP Virtual Account

## API Services

### Header

The header for transaction request

<table><thead><tr><th>Parameter</th><th>M/O/C</th><th width="123">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>Mandatory</td><td>String</td><td>String represents indicate the media type of the resource (e.g. application/json, application/pdf)</td></tr><tr><td>X-TIMESTAMP</td><td>Mandatory</td><td>String</td><td>Client's current local time in yyyy-MM-ddTHH:mm:ssTZD format</td></tr><tr><td>X-SIGNATURE</td><td>Mandatory</td><td>String</td><td><p>Represents signature of a request.</p><p>Signature details <a href="https://docs.faspay.co.id/merchant-integration/api-reference-1/snap/signature-snap">here</a>.</p></td></tr><tr><td>ORIGIN</td><td>Optional</td><td>String</td><td>Origin Domain www.yourdomain.com</td></tr><tr><td>X-PARTNER-ID</td><td>Mandatory</td><td>String (36)</td><td>Unique ID for a partner. <code>merchant_id</code> mapped here</td></tr><tr><td>X-EXTERNAL- ID</td><td>Mandatory</td><td>String (36)</td><td>Numeric String. Reference number that should be unique in the same day</td></tr><tr><td>CHANNEL-ID</td><td>Mandatory</td><td>String (5)</td><td>Channel identifier using Faspay’s API Service (77001)</td></tr></tbody></table>

#### Header Response

<table><thead><tr><th>Parameter</th><th>M/O/C</th><th width="109">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>Mandatory</td><td>String</td><td>application/json</td></tr><tr><td>X-TIMESTAMP</td><td>Mandatory</td><td>String</td><td>Client's current local time in yyyy-MM-ddTHH:mm:ssTZD format</td></tr></tbody></table>

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

```json
Content-type: application/json 
X-TIMESTAMP: 2020-12-17T10:55:00+07:00 
X-SIGNATURE: 85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5 
ORIGIN: www.hostname.com 
X-PARTNER-ID: 82150 
X-EXTERNAL-ID: 41807553358950093184162180797837 
CHANNEL-ID: 77001
```

{% endtab %}

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

```json
Content-type: application/json
X-TIMESTAMP: 2020-12-21T10:30:34+07:00
```

{% endtab %}
{% endtabs %}

### Create Virtual Account (VA)

<mark style="color:green;">`POST`</mark> `/{version}/transfer-va/create-va`

The API Virtual Account service creates a VA number for transactions.

{% hint style="info" %}
Service code: 27

Current version: v1.0

<mark style="color:red;">\*</mark>is required
{% endhint %}

**URL Path**

Sandbox: [`https://debit-sandbox.faspay.co.id/v1.0/transfer-va/create-va`](https://debit-sandbox.faspay.co.id/v1.0/transfer-va/create-va)

#### Request Body

<table><thead><tr><th width="245">Parameter</th><th width="139">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>virtualAccountName<mark style="color:red;">*</mark></td><td>String (128)</td><td>Customer name</td></tr><tr><td>virtualAccountEmail</td><td>String (128)</td><td>Customer email</td></tr><tr><td>virtualAccountPhone</td><td>String (30)</td><td>Customer's phone number. Format: 62xxxxxxxxxxxxx</td></tr><tr><td>trxId<mark style="color:red;">*</mark></td><td>String (32)</td><td>Transaction ID in Partner system</td></tr><tr><td>totalAmount</td><td>Object</td><td></td></tr><tr><td>    value<mark style="color:red;">*</mark></td><td>String (16,2)</td><td><p>Transaction Amount. Total Amount with 2 decimal</p><p></p></td></tr><tr><td>    currency<mark style="color:red;">*</mark></td><td>String (3)</td><td>Currency = IDR</td></tr><tr><td>expiredDate</td><td>String (25)</td><td>Expiration date for Virtual Account. ISO-8601</td></tr><tr><td>additionalInfo</td><td>Object</td><td>Additional Information</td></tr><tr><td>    billDate<mark style="color:red;">*</mark></td><td>Datetime (25)</td><td><p>Transaction/ Order Date.</p><p><br>local time in yyyy-MM-ddTHH:mm:ssTZD format</p></td></tr><tr><td>    channelCode<mark style="color:red;">*</mark></td><td>Numeric (32)</td><td>Payment Channel Code VA ONLY refer 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>billDescription<mark style="color:red;">*</mark></td><td>String (18)</td><td>Bill description</td></tr></tbody></table>

<details>

<summary>This API Service is available for this channel code: </summary>

* 402 -> Permata VA (Dynamic)&#x20;
* 408 -> Maybank VA (Dynamic)&#x20;
* 702 -> BCA VA (Dynamic)&#x20;
* 706 -> Indomaret Payment point (Dynamic)&#x20;
* 707 -> Alfagroup (Dynamic)&#x20;
* 708 -> Danamon VA (Dynamic)&#x20;
* 718 -> BNC VA (Static & Dynamic)
* 800 -> BRI VA (Dynamic)&#x20;
* 801 -> BNI VA (Static & Dynamic)
* 802 -> Mandiri VA (Dynamic)
* 818 -> Sinarmas VA (Dynamic)&#x20;
* 825 -> CIMB VA (Dynamic)
* 837 -> BTN VA (Static & Dynamic)

</details>

#### Response

<table><thead><tr><th width="250">Parameter</th><th width="143">Data Type</th><th>Descriptions</th></tr></thead><tbody><tr><td>responseCode<mark style="color:red;">*</mark></td><td>String (7)</td><td>Response code</td></tr><tr><td><p>responseMessage<mark style="color:red;">*</mark></p><p> </p></td><td><p> String (150)</p><p> </p></td><td>Response description</td></tr><tr><td><p> </p><p>virtualAccountData<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>Object</p><p> </p></td><td></td></tr><tr><td><p> </p><p>     partnerServiceId<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (8)</p><p> </p></td><td>Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space</td></tr><tr><td><p> </p><p>     customerNo<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (20)</p><p> </p></td><td>Unique number (up to 20 digits)</td></tr><tr><td><p> </p><p>     virtualAccountNo<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (28)</p><p> </p></td><td>partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits)</td></tr><tr><td><p> </p><p>     virtualAccountName<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (128)</p><p> </p></td><td>Customer name</td></tr><tr><td><p> </p><p>     virtualAccountEmail</p><p> </p></td><td><p> </p><p>String (128)</p><p> </p></td><td>Customer email</td></tr><tr><td><p> </p><p>     virtualAccountPhone</p><p> </p></td><td><p> </p><p>String (30)</p><p> </p></td><td>Customer's phone number. Format: 62xxxxxxxxxxxxx</td></tr><tr><td><p> </p><p>     trxId<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (32)</p><p> </p></td><td>From create VA request</td></tr><tr><td><p> </p><p>     totalAmount</p><p> </p></td><td><p> </p><p>Object</p><p> </p></td><td></td></tr><tr><td><p> </p><p>          value<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (ISO4217) (16,2)</p><p> </p></td><td>Transaction amount. The total amount with 2 decimals.</td></tr><tr><td><p> </p><p>          currency<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (3)</p><p> </p></td><td>Currency. Currency of amount based on ISO 4217.</td></tr><tr><td><p> </p><p>expiredDate<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (25)</p><p> </p></td><td>Expiration date for Virtual Account. ISO-8601</td></tr><tr><td><p> </p><p>   additionalInfo</p><p> </p></td><td><p> </p><p>Object</p><p> </p></td><td>Additional Information for custom use</td></tr><tr><td><p> </p><p>          billDate<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>Datetime (25)</p><p> </p></td><td>Transaction/ order date</td></tr><tr><td><p> </p><p>          channelCode<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>Numeric (32)</p><p> </p></td><td>Payment channel code VA ONLY</td></tr><tr><td><p> </p><p>          billDescription<mark style="color:red;">*</mark></p><p> </p></td><td><p> </p><p>String (18)</p><p> </p></td><td>Bill description</td></tr><tr><td><p> </p><p>          redirectUrl</p><p> </p></td><td><p> </p><p>String</p><p> </p></td><td>Merchant call back URL</td></tr></tbody></table>

{% tabs %}
{% tab title="Create VA - Sample Request" %}

```json
{
 "virtualAccountName":"Jokul Doe",
 "virtualAccountEmail":"jokul@email.com",
 "virtualAccountPhone":"6281828384858",
 "trxId":"abcdefgh1234",
 "totalAmount":{
     "value":"12345678.00",
     "currency":"IDR"
 },
 "expiredDate":"2020-12-31T23:59:59-07:00",
 "additionalInfo":{
     "billDate":"2020-12-31T23:59:59-07:00",
     "channelCode":"402",
     "billDescription":"Maintenance"
 }
}

```

{% endtab %}

{% tab title="Create VA-Sample Response" %}

<pre class="language-json"><code class="lang-json">{
   "responseCode":"2002500",
   "responseMessage":"Success",
   "virtualAccountData":{
      "partnerServiceId":" 088899",
      "customerNo":"12345678901234567890",
      "virtualAccountNo":"08889912345678901234567890",
      "virtualAccountName":"Jokul Doe",
      "virtualAccountEmail":"jokul@email.com",
      "virtualAccountPhone":"6281828384858",
      "trxId":"abcdefgh1234",
      "totalAmount":{
         "value":"12345678.00",
         "currency":"IDR"
      },
      "expiredDate":"20201231T235959Z",
         "additionalInfo":{
            "billDate":"2020-12-31T23:59:59-07:00",
<strong>            "channelCode":"402",
</strong>            "billDescription":"Maintenance",
            "redirectUrl":"https://dev.faspay.co.id/pws/100003/0830000010100000/5807a17ccd950904ec0a303725fa8a4b36c89e2f?trx_id=9876530200004184&#x26;merchant_id=98765&#x26;bill_no=98765123456789"
   }
}
</code></pre>

{% endtab %}
{% endtabs %}

### Inquiry

<mark style="color:green;">`POST`</mark> `/{version}/transfer-va/inquiry`

The API Virtual Account Inquiry is used to forward user requests to inquire about specific VA information.&#x20;

Service Code: 24

Notes: - `*` is required

&#x20;           \- Current version: v1.0 &#x20;

**URL Path:** `urlmerchant + /v1.0/transfer-va/inquiry`

`(example: merchantkita-sandbox.com/v1.0/transfer-va/inquiry)`        &#x20;

#### Request Body

<table><thead><tr><th>Parameter</th><th>Data Type</th><th width="300">Description</th></tr></thead><tbody><tr><td>partnerServiceId<mark style="color:red;">*</mark></td><td>String (8)</td><td>Derivative of X-PARTNER-ID, similar to company code,8 digit left padding space.</td></tr><tr><td>customerNo<mark style="color:red;">*</mark></td><td>String (20)</td><td>Unique number (up to 20 digits).</td></tr><tr><td>virtualAccountNo<mark style="color:red;">*</mark></td><td>String (28)</td><td><code>partnerServiceId</code> (8 digit left padding space) + <code>customerNo</code> (up to 20 digits).</td></tr><tr><td>inquiryRequestId<mark style="color:red;">*</mark></td><td>String (32)</td><td>Unique identifier for this Inquiry. Generated by Faspay.</td></tr><tr><td>hashedSourceAccountNo</td><td>String (32)</td><td>Source account number in hashed format. Filled only when requested by the sender/prayer or when sender/prayer consent has been granted.</td></tr><tr><td>sourceBankCode</td><td>String (11)</td><td>Source bank code. Filled only when requested by the sender or when sender consent has been granted.</td></tr></tbody></table>

<details>

<summary>This API service is available for channel code: </summary>

* 402 -> Permata VA (Static)&#x20;
* 408 -> Maybank VA (Static)&#x20;
* 702 -> BCA VA (Static)&#x20;
* 706 -> Indomaret Payment point (Static)&#x20;
* 707 -> Alfagroup (Static)&#x20;
* 708 -> Danamon VA (Static)&#x20;
* 800 -> BRI VA (Static)&#x20;
* 802 -> Mandiri VA (Static)&#x20;
* 818 -> Sinarmas VA (Static)&#x20;
* 825 -> CIMB VA (Static)&#x20;

</details>

#### Inquiry Response Parameter

<table><thead><tr><th width="252">Parameter</th><th width="118">Data Type</th><th width="118">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td><p> </p><p>responseCode</p><p> </p></td><td><p> </p><p>String (7)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Response Code</td></tr><tr><td><p> </p><p>responseMessage</p><p> </p></td><td><p> </p><p>String (150)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Response Description</td></tr><tr><td><p> </p><p>virtualAccountData</p><p> </p></td><td><p> </p><p>Object</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td></td></tr><tr><td><p> </p><p>          partnerServiceId</p><p> </p></td><td><p> </p><p>String (8)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space</td></tr><tr><td><p> </p><p>          customerNo</p><p> </p></td><td><p> </p><p>String (20)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Unique number. (up to 20 digits)</td></tr><tr><td><p> </p><p>          virtualAccountNo</p><p> </p></td><td><p> </p><p>String (28)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits)</td></tr><tr><td><p> </p><p>          virtualAccountName</p><p> </p></td><td><p> </p><p>String (50)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Customer name</td></tr><tr><td><p> </p><p>          virtualAccountEmail</p><p> </p></td><td><p> </p><p>String (255)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Customer email</td></tr><tr><td><p> </p><p>          virtualAccountPhone</p><p> </p></td><td><p> </p><p>String (30)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Customer's phone number. Format: 62xxxxxxxxxxxxx</td></tr><tr><td><p> </p><p>          inquiryRequestId</p><p> </p></td><td><p> </p><p>String (128)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>From Inquiry Request</td></tr><tr><td><p> </p><p>          totalAmount</p><p> </p></td><td><p> </p><p>Object</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td></td></tr><tr><td><p> </p><p>             value</p><p> </p></td><td><p> </p><p>String (ISO4217) (16,2)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Transaction Amount. Total Amount with 2 decimal</td></tr><tr><td><p> </p><p>             currency</p><p> </p></td><td><p> </p><p>String (3)</p><p> </p></td><td><p> </p><p>Mandatory</p><p> </p></td><td>Currency</td></tr></tbody></table>

{% tabs %}
{% tab title="Inquiry-Sample Request" %}

```json
{
   "partnerServiceId":"  88899",
   "customerNo":"12345678901234567890",
   "virtualAccountNo":"  08889912345678901234567890",
   "inquiryRequestId":"abcdef-123456-abcdef"
}
```

{% endtab %}

{% tab title="Inquiry-Sample Response" %}

```json
{
   "responseCode":"2002400",
   "responseMessage":"Success",
   "virtualAccountData":{
      "partnerServiceId":"  088899",
      "customerNo":"12345678901234567890",
      "virtualAccountNo":"  08889912345678901234567890",
      "virtualAccountName":"Johnny Suh",
      "virtualAccountEmail":"johnnysuh@email.com",
      "virtualAccountPhone":"6281828384858",
      "inquiryRequestId":"abcdef-123456-abcdef",
      "totalAmount":{
         "value":"12345678.00",
         "currency":"IDR"
      },
   }	
}
```

{% endtab %}
{% endtabs %}

### Payment

<mark style="color:green;">`POST`</mark> `/{version}/transfer-va/payment`

This service is used to notify payment confirmation for specific VA that has been paid.

Service Code: 25

Notes: - `*` is required

&#x20;           \- Current version: v1.0

**URL Path**: `urlmerchant+/v1.0/transfer-va/payment`

`(example: merchantkita-sandbox.com/v1.0/transfer-va/payment)`&#x20;

#### Request Body

| Parameter                                          | Data Type     | Description                                                                                                                          |
| -------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| partnerServiceId<mark style="color:red;">\*</mark> | String (8)    | Derivative of X-PARTNER-ID, similar to company code, 8 digit left padding space                                                      |
| customerNo<mark style="color:red;">\*</mark>       | String (20)   | Unique number. (up to 20 digits)                                                                                                     |
| virtualAccountNo<mark style="color:red;">\*</mark> | String (28)   | `partnerServiceId` (8 digit left padding space) + `customerNo` (up to 20 digits)                                                     |
| paymentRequestId<mark style="color:red;">\*</mark> | String (128)  | Unique identifier generated by Faspay. If Payment comes from the Inquiry process, this value must be the same with inquiryRequestId. |
| paidAmount<mark style="color:red;">\*</mark>       | Object        |                                                                                                                                      |
| value<mark style="color:red;">\*</mark>            | String (16,2) | Paid Amount with 2 decimal                                                                                                           |
| currency<mark style="color:red;">\*</mark>         | String (3)    | Currency                                                                                                                             |
| trxDateTime<mark style="color:red;">\*</mark>      | Date (25)     | PJP internal system datetime with timezone, which follows the ISO-8601 standard                                                      |
| referenceNo<mark style="color:red;">\*</mark>      | String (16)   | Transaction ID (Issued/generated by Faspay (Media Indonusa))                                                                         |

<details>

<summary>This API service is available for channel code:</summary>

* 402 -> Permata VA (Static)&#x20;
* 408 -> Maybank VA (Static)&#x20;
* 702 -> BCA VA (Static)&#x20;
* 706 -> Indomaret Payment point (Static)&#x20;
* 707 -> Alfagroup (Static)&#x20;
* 708 -> Danamon VA (Static)&#x20;
* 800 -> BRI VA (Static)&#x20;
* 802 -> Mandiri VA (Static)&#x20;
* 818 -> Sinarmas VA (Static)&#x20;
* 825 -> CIMB VA (Static)&#x20;

</details>

#### Payment Response Parameter

<table><thead><tr><th>Parameter</th><th width="115">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>responseCode<mark style="color:red;">*</mark></td><td>String (7)</td><td>Response Code</td></tr><tr><td>responseMessage<mark style="color:red;">*</mark></td><td>String (150)</td><td>Response Description</td></tr><tr><td>virtualAccountData<mark style="color:red;">*</mark></td><td>Object</td><td> </td></tr><tr><td>     partnerServiceId<mark style="color:red;">*</mark></td><td>String (8)</td><td>Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space</td></tr><tr><td>     customerNo<mark style="color:red;">*</mark></td><td>String (20)</td><td>Unique number. (up to 20 digits)</td></tr><tr><td>     virtualAccountNo<mark style="color:red;">*</mark></td><td>String (28)</td><td>partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits)</td></tr><tr><td>     virtualAccountName<mark style="color:red;">*</mark></td><td>String (255)</td><td>Customer name</td></tr><tr><td>     paymentRequestId<mark style="color:red;">*</mark></td><td>String (128)</td><td>From Payment Request</td></tr><tr><td>     paidAmount<mark style="color:red;">*</mark></td><td>Object</td><td> </td></tr><tr><td>          value<mark style="color:red;">*</mark></td><td>String (ISO4217) (16,2)</td><td>Transaction Amount. From Payment Request</td></tr><tr><td>          currency<mark style="color:red;">*</mark></td><td>String (3)</td><td>Currency</td></tr></tbody></table>

{% tabs %}
{% tab title="Payment-Sample Request" %}

```json
{
   "partnerServiceId":"  088899",
   "customerNo":"12345678901234567890",
   "virtualAccountNo":"  08889912345678901234567890",
   "paymentRequestId":"abcdef-123456-abcdef",
   "paidAmount":{
      "value":"12345678.00",
      "currency":"IDR"
   },
   "trxDateTime":"20201231T235959Z"
   "referenceNo":"123456789012345"
}

```

{% endtab %}

{% tab title="Payment-Sample Response" %}

```json
{
   "responseCode":"2002500",
   "responseMessage":"Success",
   "virtualAccountData":{
      "partnerServiceId":" 088899",
      "customerNo":"12345678901234567890",
      "virtualAccountNo":"  08889912345678901234567890",
      "virtualAccountName":"Johnny Suh",
      "paymentRequestId":"abcdef-123456-abcdef",
      "paidAmount":{
         "value":"12345678.00",
         "currency":"IDR"
      }
   }
}
```

{% endtab %}
{% endtabs %}

### Inquiry Status&#x20;

<mark style="color:green;">`POST`</mark> `/{version}/transfer-va/status`

Merchants use this service to check the status of transfers made.

{% hint style="info" %}
Service code: 26

Current version: v1.0

<mark style="color:red;">\*</mark>is required
{% endhint %}

**URL Path**

Sandbox: [`https://debit-sandbox.faspay.co.id/v1.0/transfer-va/status`](https://debit-sandbox.faspay.co.id/v1.0/transfer-va/status)

#### Request Body

| Parameter                                          | Data Type   | Descriptions                                                                                                                                                                          |
| -------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| partnerServiceId<mark style="color:red;">\*</mark> | String (8)  | Derivative of X-PARTNER-ID, similar to company code, 8 digit left padding space                                                                                                       |
| customerNo<mark style="color:red;">\*</mark>       | String (20) | Unique number (up to 20 digits)                                                                                                                                                       |
| virtualAccountNo<mark style="color:red;">\*</mark> | String (28) | `partnerServiceId` (8 digit left padding space) + `customerNo` (up to 20 digits)                                                                                                      |
| inquiryRequestId                                   | String (32) | Unique identifier from Inquiry **(Conditional parameter)**                                                                                                                            |
| additionalInfo<mark style="color:red;">\*</mark>   | Object      |                                                                                                                                                                                       |
| channelCode<mark style="color:red;">\*</mark>      | Sring (32)  | <p>Payment Channel Code VA ONLY</p><p>refer to <a href="https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/reference/payment-channel-code">here</a></p> |
| trxId                                              | String (32) | <p>Transaction ID in Partner system <strong>(Conditional parameter)</strong> </p><p><strong>Notes :</strong> Mandatory if the transaction from Create VA</p>                          |

#### Inquiry Status Response Parameter

<table><thead><tr><th width="238">Parameter</th><th width="126">Data Type</th><th width="122">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>String (7)</td><td>Mandatory</td><td>Response Code</td></tr><tr><td>responseMessage</td><td>String (150)</td><td>Mandatory</td><td>Response Description</td></tr><tr><td>virtualAccountData</td><td>Object</td><td>Mandatory</td><td> </td></tr><tr><td>    paymentFlagReason</td><td>Object</td><td>Mandatory</td><td>Reason for Payment Status multi language</td></tr><tr><td>          english</td><td>String (32)</td><td>Mandatory</td><td>Reason for Payment Status in English</td></tr><tr><td>    partnerServiceId</td><td>String (8)</td><td>Mandatory</td><td><p>Derivative of X-PARTNER-ID , similar to company code,</p><p>8 digit left padding space</p></td></tr><tr><td>    customerNo</td><td>String (20)</td><td>Mandatory</td><td>Unique number (up to 20 digits)</td></tr><tr><td>    virtualAccountNo</td><td>String (28)</td><td>Mandatory</td><td>partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits)</td></tr><tr><td>   inquiryRequestId</td><td>String (128)</td><td>Conditional</td><td>Unique identifier from Inquiry</td></tr><tr><td>   paymentRequestId</td><td>String (16)</td><td>Conditional</td><td>Unique identifier for this Payment from Faspay. Mandatory if Payment happened.</td></tr><tr><td>paidAmount</td><td>Object</td><td>Mandatory</td><td> </td></tr><tr><td>     value</td><td>String (ISO4217) (16,2)</td><td>Mandatory</td><td>Paid Amount with 2 decimal</td></tr><tr><td>     currency</td><td>String (3)</td><td>Mandatory</td><td>Currency. Currency of amount based on ISO 4217</td></tr><tr><td>transactionDate</td><td>Date (25)</td><td>Conditional</td><td>Mandatory when the payment happened</td></tr><tr><td>referenceNo</td><td>String(16)</td><td>Conditional</td><td>Transaction ID (Issued/generated by Faspay (Media Indonusa))<br><br><strong>Notes:</strong><br>Only for VA Static Channel</td></tr><tr><td>paymentFlagStatus</td><td>String (2)</td><td>Mandatory</td><td>Status for Payment Flag</td></tr><tr><td>additionalInfo</td><td>Object</td><td>Mandatory</td><td></td></tr><tr><td>     channelCode</td><td>String (32)</td><td>Mandatory</td><td>Payment Channel Code VA ONLY</td></tr></tbody></table>

**Status Code List**

<table><thead><tr><th width="170">Status Code</th><th>Status Reason</th></tr></thead><tbody><tr><td>00</td><td>Success</td></tr><tr><td>01</td><td>Paying</td></tr><tr><td>03</td><td>Pending</td></tr><tr><td>04</td><td>Refunded</td></tr><tr><td>05</td><td>Canceled</td></tr><tr><td>06</td><td>Failed</td></tr><tr><td>07</td><td>Expired</td></tr><tr><td>07</td><td>Not Found</td></tr></tbody></table>

{% tabs %}
{% tab title="Inquiry Status-Request Sample" %}

```json
{
 "partnerServiceId":"088899",
 "customerNo":12345678901234567890,
 "virtualAccountNo":"08889912345678901234567890",
 "inquiryRequestId":"abcdef-123456-abcdef",
 "additionalInfo":{
      "channelCode":"402",
      "trxId":"9876540000001115"
 }
}
```

{% endtab %}

{% tab title="Inquiry Status-Response Sample" %}

```json
{
   "responseCode":"2002600",
   "responseMessage":"Success",
   "virtualAccountData":{
      "paymentFlagReason":{
         "english":"Success",
      },
      "partnerServiceId":"  088899",
      "customerNo":"12345678901234567890",
      "virtualAccountNo":"  08889912345678901234567890",
      "inquiryRequestId":"abcdef-123456-abcdef",
      "paymentRequestId":"abcdef-123456-abcdef",
      "paidAmount":{
          "value":"12345678.00",
          "currency":"IDR"
       },
      "transactionDate":"20201231T235959Z",
      "paymentFlagStatus":"00",
      "additionalInfo":{
          "channelCode":"402"
   }
}
}
```

{% endtab %}
{% endtabs %}

### Delete Virtual Account

<mark style="color:red;">`DELETE`</mark> `/{version}/transfer-va/delete-va`

This service is used to delete the VA number permanently.

{% hint style="info" %}
Service code: 31

Current version: v1.0

<mark style="color:red;">\*</mark>is required
{% endhint %}

**URL Path**

Sandbox: [`https://debit-sandbox.faspay.co.id/v1.0/transfer-va/delete-va`](https://debit-sandbox.faspay.co.id/v1.0/transfer-va/delete-va)

#### Request Body

| Parameter                                          | Data Type   | Descriptions                                                                     |
| -------------------------------------------------- | ----------- | -------------------------------------------------------------------------------- |
| partnerServiceId<mark style="color:red;">\*</mark> | String (8)  | Derivative of X-PARTNER-ID, similar to company code,8 digit left padding space   |
| customerNo<mark style="color:red;">\*</mark>       | String (20) | A Unique number (up to 20 digits).                                               |
| virtualAccountNo<mark style="color:red;">\*</mark> | String (28) | `partnerServiceId` (8 digit left padding space) + `customerNo` (up to 20 digits) |
| additionalInfo                                     | Object      | From inquiry responses                                                           |
| reason<mark style="color:red;">\*</mark>           | String (50) | Payment Cancel Reason's Message                                                  |
| trxId<mark style="color:red;">\*</mark>            | String (32) | Transaction ID in Partner system                                                 |

#### Delete VA Response Parameter

<table><thead><tr><th>Parameter</th><th width="118">Data Type</th><th width="122">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>String (7)</td><td>Mandatory</td><td>Response Code</td></tr><tr><td>responseMessage</td><td>String (150)</td><td>Mandatory</td><td>Response Description</td></tr><tr><td>virtualAccountData</td><td>Object</td><td>Mandatory</td><td> </td></tr><tr><td>     partnerServiceId</td><td>String (8)</td><td>Mandatory</td><td>Derivative of X-PARTNER-ID, similar to company code, 8 digit left padding space</td></tr><tr><td>     customerNo</td><td>String (20)</td><td>Mandatory</td><td>Unique number (up to 20 digits)</td></tr><tr><td>      virtualAccountNo</td><td>String (28)</td><td>Mandatory</td><td>partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits)</td></tr><tr><td>     additionalInfo</td><td>Object (unlimited)</td><td>Optional</td><td>From Inquiry Response</td></tr><tr><td>        billNo</td><td>String (32)</td><td>Mandatory</td><td>Bill number from partner</td></tr><tr><td>        trxStatusCode</td><td>String (5)</td><td>Mandatory</td><td>Transaction Status</td></tr><tr><td>        trxStatusDesc</td><td>String (32)</td><td>Mandatory</td><td>Transaction Status Description</td></tr></tbody></table>

{% tabs %}
{% tab title="Delete VA-Request Sample" %}

```json
{
   "partnerServiceId":"088899",
   "customerNo":"12345678901234567890",
   "virtualAccountNo":"08889912345678901234567890",
   "additionalInfo":{
       "reason":"Order Canceled"
   }
}
```

{% endtab %}

{% tab title="Delete VA-Response Sample" %}

```json
{
   "responseCode":"2003100",
   "responseMessage":"Success",
   "virtualAccountData":{
      "partnerServiceId":"088899",
      "customerNo":"12345678901234567890",
      "virtualAccountNo":"08889912345678901234567890",
      "additionalInfo":{
          "billNo":"98765123456789",
          "trxStatusCode":"3",
          "trxStatusDesc":"Order Canceled"
      }
   }
}

```

{% endtab %}
{% endtabs %}

### Payment Notification

Payment notification from Faspay to the merchant backend will also trigger an event of transaction status updating to ensure the merchant is securely informed. Please provide the URL and make sure it's already registered on Faspay system.

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

## Integration Requirement

### Response Code

<table><thead><tr><th>Component</th><th width="122">Data Type</th><th width="94">Length</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>String</td><td>7</td><td>response code = HTTP status code + service code + case code</td></tr><tr><td>responseMessage</td><td>String</td><td>150</td><td></td></tr></tbody></table>

### Response Code List

<table><thead><tr><th width="143">Category</th><th width="123">HTTP Code</th><th width="96">Service Code</th><th width="96">Case Code</th><th width="132">Response Message</th><th>Description</th></tr></thead><tbody><tr><td>Success</td><td>200</td><td>any</td><td>0</td><td>Successful</td><td>Successful</td></tr><tr><td>Success</td><td>202</td><td>any</td><td>0</td><td>Request In Progress</td><td>Transaction still on process</td></tr><tr><td>System</td><td>400</td><td>any</td><td>0</td><td>Bad Request</td><td>General request failed error, including message parsing failed.</td></tr><tr><td>Message</td><td>400</td><td>any</td><td>1</td><td>Invalid Field Format {field name}</td><td>Invalid format</td></tr><tr><td>Message</td><td>400</td><td>any</td><td>2</td><td>Invalid Mandatory Field {field name}</td><td>Missing or invalid format on mandatory field</td></tr><tr><td>System</td><td>401</td><td>any</td><td>0</td><td>Unauthorized. [reason]</td><td>General unauthorized error (No Interface Def, API is Invalid, Oauth Failed, Verify Client Secret Fail, Client Forbidden Access API, Unknown Client, Key not Found)</td></tr><tr><td>System</td><td>401</td><td>any</td><td>1</td><td>Invalid Token (B2B)</td><td>Token found in request is invalid (Access Token Not Exist, Access Token Expiry)</td></tr><tr><td>System</td><td>401</td><td>any</td><td>2</td><td>Invalid Customer Token</td><td>Token found in request is invalid (Access Token Not Exist, Access Token Expiry)</td></tr><tr><td>System</td><td>401</td><td>any</td><td>3</td><td>Token Not Found (B2B)</td><td>Token not found in the system. This occurs on any API that requires token as input parameter</td></tr><tr><td>System</td><td>401</td><td>any</td><td>4</td><td>Customer Token Not Found</td><td>Token not found in the system. This occurs on any API that requires token as input parameter</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>0</td><td>Transaction Expired</td><td>Transaction expired</td></tr><tr><td>System</td><td>403</td><td>any</td><td>1</td><td>Feature Not Allowed [Reason]</td><td>This merchant is not allowed to call Direct Debit APIs</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>2</td><td>Exceeds Transaction Amount Limit</td><td>Exceeds Transaction Amount Limit</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>3</td><td>Suspected Fraud</td><td>Suspected Fraud</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>4</td><td>Activity Count Limit Exceeded</td><td>Too many request, Exceeds Transaction Frequency Limit</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>5</td><td>Do Not Honor</td><td>Account or User status is abnormal</td></tr><tr><td>System</td><td>403</td><td>any</td><td>6</td><td>Feature Not Allowed At This Time. [reason]</td><td>Cut off In Progress</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>7</td><td>Card Blocked</td><td>The payment card is blocked</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>8</td><td>Card Expired</td><td>The payment card is expired</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>9</td><td>Dormant Account</td><td>The account is dormant</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>10</td><td>Need To Set Token Limit</td><td>Need to set token limit</td></tr><tr><td>System</td><td>403</td><td>any</td><td>11</td><td>OTP Blocked</td><td>OTP has been blocked</td></tr><tr><td>System</td><td>403</td><td>any</td><td>12</td><td>OTP Lifetime Expired</td><td>OTP has been expired</td></tr><tr><td>System</td><td>403</td><td>any</td><td>13</td><td>OTP Sent ToCardholer</td><td>initiates request OTP to the issuer</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>14</td><td>Insufficient Funds</td><td>Insufficient Funds</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>15</td><td>Transaction Not Permitted.[reason]</td><td>Transaction Not Permitted</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>16</td><td>Suspend Transaction</td><td>Suspend Transaction</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>17</td><td>Token Limit Exceeded</td><td>Purchase amount exceeds the token limit set prior</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>18</td><td>Inactive Card/Account/Customer</td><td>Indicates inactive account</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>19</td><td>Merchant Blacklisted</td><td>Merchant is suspended from calling any APIs</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>20</td><td>Merchant Limit Exceed</td><td>Merchant aggregated purchase amount on that day exceeds the agreed limit</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>21</td><td>Set Limit Not Allowed</td><td>Set limit not allowed on particular token</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>22</td><td>Token Limit Invalid</td><td>The token limit desired by the merchant is not within the agreed range between the merchant and the Issuer</td></tr><tr><td>Business</td><td>403</td><td>any</td><td>23</td><td>Account Limit Exceed</td><td>Account aggregated purchase amount on that day exceeds the agreed limit</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>0</td><td>Invalid Transaction Status</td><td>Invalid transaction status</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>1</td><td>Transaction Not Found</td><td>Transaction not found</td></tr><tr><td>System</td><td>404</td><td>any</td><td>2</td><td>Invalid Routing</td><td>Invalid Routing</td></tr><tr><td>System</td><td>404</td><td>any</td><td>3</td><td>Bank Not Supported By Switch</td><td>Bank not supported by switch</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>4</td><td>Transaction Cancelled</td><td>Transaction is cancelled by customer</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>5</td><td>Merchant Is Not Registered For Card Registration Services</td><td>Merchant is not registered for Card Registration services</td></tr><tr><td>System</td><td>404</td><td>any</td><td>6</td><td>Need To Request OTP</td><td>Need to request OTP</td></tr><tr><td>System</td><td>404</td><td>any</td><td>7</td><td>Journey Not Found</td><td>The journeyID cannot be found in the system</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>8</td><td>Invalid Merchant</td><td>Merchant does not exist or status abnormal</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>9</td><td>No Issuer</td><td>No issuer</td></tr><tr><td>System</td><td>404</td><td>any</td><td>10</td><td>Invalid API Transition</td><td>Invalid API transition within a journey</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>11</td><td>Invalid Card/Account/Customer [info]/Virtual Account</td><td>Card information may be invalid, or the card account may be blacklisted, or Virtual Account number maybe invalid.</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>12</td><td>Invalid Bill/Virtual Account [Reason]</td><td>The bill is blocked/ suspended/not found. Virtual account is suspend/not found.</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>13</td><td>Invalid Amount</td><td>The amount doesn't match with what supposed to</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>14</td><td>Paid Bill</td><td>The bill has been paid</td></tr><tr><td>System</td><td>404</td><td>any</td><td>15</td><td>Invalid OTP</td><td>OTP is incorrect</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>16</td><td>Partner Not Found</td><td>Partner number can't be found</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>17</td><td>Invalid Terminal</td><td>Terminal does not exist in the system</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>18</td><td>Inconsistent Request</td><td>Inconsistent request parameter found for the same partner reference number/transaction id<br>It can be considered as failed in transfer debit, but it should be considered as success in transfer credit.<br><br>Considered as success:<br>'- Transfer credit = (i) Intrabank transfer; (ii) Interbank transfer; (iii) RTGS transfer; (iv) SKNBI transfer;<br>'- Virtual account = (i) Payment VA; (ii) Payment to VA;<br>'- Transfer debit = (i) Refund payment; (ii) Void;<br><br>Considered as failed:<br>'- Transfer credit = (i) Transfer to OTC;<br>'- Transfer debit = (i) Direct debit payment; (ii) QR CPM payment; (iii) Auth payment; (iv) Capture;</td></tr><tr><td>Business</td><td>404</td><td>any</td><td>19</td><td>Invalid Bill/Virtual Account</td><td>The bill is expired.<br>Virtual account is expired.</td></tr><tr><td>System</td><td>405</td><td>any</td><td>0</td><td>Requested Function Is Not Supported</td><td>Requested function is not supported</td></tr><tr><td>Business</td><td>405</td><td>any</td><td>1</td><td>Requested Opearation Is Not Allowed</td><td>Requested operation to cancel/refund transaction Is not allowed at this time.</td></tr><tr><td>System</td><td>409</td><td>any</td><td>0</td><td>Conflict</td><td>Cannot use same X-EXTERNAL-ID in same day</td></tr><tr><td>System</td><td>409</td><td>any</td><td>1</td><td>Duplicate partnerReferenceNo</td><td>Transaction has previously been processed indicates the same partnerReferenceNo already success</td></tr><tr><td>System</td><td>429</td><td>any</td><td>0</td><td>Too Many Requests</td><td>Maximum transaction limit exceeded</td></tr><tr><td>System</td><td>500</td><td>any</td><td>0</td><td>General Error</td><td>General Error</td></tr><tr><td>System</td><td>500</td><td>Any</td><td>1</td><td>Internal Server Error</td><td>Unknown Internal Server Failure, Please retry the process again</td></tr><tr><td>System</td><td>500</td><td>Any</td><td>2</td><td>External Server Error</td><td>Backend system failure, etc</td></tr><tr><td>System</td><td>504</td><td>any</td><td>0</td><td>Time</td><td>timeout from the issuer</td></tr></tbody></table>
