> For the complete documentation index, see [llms.txt](https://e2payprod.gitbook.io/payment-gateway/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://e2payprod.gitbook.io/payment-gateway/api-documentation/technical-doc-of-fiuu-id/merchant-request-apis.md).

# Merchant Request APIs

PG has prepared plenty of merchant tools for merchants to initiate status requery and cancellation/void of transaction. However, merchants are not allowed to send in requests too frequently (maximum 1 query every 5 seconds). Massive incoming query will lead to IP blocking without prior notice. There will be a validity duration to initiate a status requery API call, generally within 1 hour after the initiated time for online payment and the due time for offline payment.

## The back-end services available are:

1. Direct Status Requery - merchant send status query to processing bank directly
2. Indirect Status Requery - merchant send status query to PG system
3. Daily Transaction Report (Reconciliation) - list all transactions of a specific date
4. Void Pending-Cash API

## Direct Status Requery

This will trigger a query to the payment channel or bank status server and there are cases that bank status server is not in-sync with its payment server that might give different results, that leads to a defer update and will trigger a callback from PG server,  once the status is synced and changed.\
\
**Note :** <mark style="color:red;">No result available for transaction more than 7 days.</mark>

### Request

**URL:** <mark style="color:purple;"><https://api.e2pay.co.id/RMS/API/gate-query/index.php></mark>

### Method: POST or GET

| Variable / Parameter | Type Format / Max Length                             | Description / Example                                                   |
| -------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------- |
| amount               | 2 decimal points numeric value                       | The payment amount                                                      |
| txID                 | integer, 10 digits                                   | Unique transaction ID for tracking purpose.                             |
| domain               | alphanumeric, 32 chars                               | Merchant ID in PG system.                                               |
| skey                 | 32 chars hexadecimal string                          | This is the data integrity protection hash string.                      |
| url                  | optional, URL for POST response                      | The URL to receive POST response from PG                                |
| type                 | optional, 1-digit integer, obsoleted in new API sets | <p>0 = plain text result (default)</p><p>1 = result via POST method</p> |

### Response

| Variable  | Type Format / Max Lenght       | Description / Example                                                                                                                                                               |
| --------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Amount    | 2 decimal points numeric value | The payment amount                                                                                                                                                                  |
| TranID    | integer, 10 digits             | Unique transaction ID for tracking purpose.                                                                                                                                         |
| Domain    | alphanumeric, 32 chars         | Merchant ID in PG system.                                                                                                                                                           |
| Channel   | alphanumeric, 100 chars        | Payment via Channel                                                                                                                                                                 |
| VrfKey    | 32 chars hexadecimal string    | This is the data integrity protection hash string.                                                                                                                                  |
| StatCode  | 2-digit numeric                | <p>00 = Success</p><p>11 = Failure</p><p>22 = Pending</p>                                                                                                                           |
| StatName  | alphanumeric                   | <p>Success: captured, settled, authorized</p><p>Failure: failed, cancelled, chargeback, release, reject/hold, blocked, ReqCancel, ReqChargeback</p><p>Pending: Pending, Unknown</p> |
| Currency  | 3 chars ISO-4217 currency code | The payment currency. E.g. MYR, USD, EUR, AUD, SGD, CNY, IDR                                                                                                                        |
| ErrorCode | alphanumeric                   | Error code defined by channel for failed transactions only                                                                                                                          |

### Formula of Skey & VrfKey

```
skey       =md5( txID & domain & verify_key & amount )
VrfKey     =md5( Amount & secret_key & Domain & TranID & StatCode )
```

### Example of Direct Status Requery for PHP

{% code overflow="wrap" %}

```php
<?php

$skey = md5($txID . $domain. “xxxxxxxxxx” . $amount);
//Replace xxxxxxxxxx with Verify Key

echo “<a  href='https://api.e2pay.co.id/RMS/API/gate-query/index.php?amount=3899&txID=65234&domain=shopA&skey=e1c4c60c99116fffc3ce77bd5fd0f7b1'> 
Check payment status for tran ID 65234 </a>”;

?>
```

{% endcode %}

### Example of Response

| type=0 (default output, plain text with linebreaks)                                                                                                                                                                 |                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>StatCode=00</p><p>StatName=captured</p><p>TranID=65234</p><p>Amount=3899.00</p><p>Domain=shopA</p><p>Channel=fpx</p><p>VrfKey=456cf69e5bddfe8ed47371096</p><p>Currency=MYR</p><p>ErrorCode=</p><p>ErrorDesc=</p> | <p>$\_POST \[StatCode] => “00”;</p><p>$\_POST \[StatName] => “captured”;</p><p>$\_POST \[TranID] => “65234”;</p><p>$\_POST \[Amount] => “3899.00”;</p><p>$\_POST \[Domain] => “shopA”;</p><p>$\_POST\[Channel] => “fpx”;</p><p>$\_POST\[VrfKey:]=> “456cf69e5bddfe8ed47371096”;</p><p>$\_POST\[Currency] => “MYR”;</p><p>$\_POST\[ErrorCode] => “”;</p><p>$\_POST\[ErrorDesc] => “”;</p> |

### Indirect Status Requery

There are several types of status requery on PG system:-

1. Query by unique transaction ID (recommended)
2. Query by order ID & get latest matched result (single output) <mark style="color:red;">(not recommended)</mark>
3. Query by order ID & get all matched results (batch output) <mark style="color:red;">(strongly not recommended)</mark>
4. Query by multiple order ID (batch output) <mark style="color:red;">(strongly not recommended)</mark>
5. Query by multiple transaction ID (batch output) <mark style="color:red;">(strongly not recommended)</mark>

\*For bulk requery, best practice is to utilize the 4th or 5th APIs once every half an hour for unknown status transactions only

**Note :** <mark style="color:red;">No result available for transaction more than 7 days.</mark>

### 1. Query by unique transaction ID

#### Request

**URL:** <https://api.e2pay.co.id/RMS/q_by_tid.php>

#### Method: POST or GET

\*Request & Response parameters are the same as Direct Status Requery but the format and parameters order of the responses are slightly different.

| Variable / Parameter | Type Format / Max Length            | Description / Example                                                   |
| -------------------- | ----------------------------------- | ----------------------------------------------------------------------- |
| merchantID           | alphanumeric, 32 chars              | Merchant ID in PG system.                                               |
| amount               | 2 decimal points numeric value      | The payment amount                                                      |
| txID                 | integer, 10 digits                  | Unique transaction ID for tracking purpose.                             |
| domain               | alphanumeric, 32 chars              | Merchant ID in PG system.                                               |
| skey                 | 32 chars hexadecimal string         | This is the data integrity protection hash string.                      |
| url                  | Conditional , URL for POST response | The URL to receive POST response from PG, it is mandatory for type=1    |
| type                 | optional, 1-digit integer           | <p>0 = plain text result (default)</p><p>1 = result via POST method</p> |
| req4token            | optional, 1-digit integer           | <p>0 = No (default)</p><p>1 = Yes for more card related information</p> |

#### Sample Request

```
curl --location 'https://api.e2pay.co.id/RMS/q_by_tid.php' \
 --form 'merchantID="yourMerchanID"' \
--form 'amount="10000.00"' \
--form 'txID="yourtxid"' \
--form 'domain="yourDomain"' \
--form 'skey="yourSkey"' \
--form 'url=""' \
--form 'type="0"' \
--form 'req4token="1"'
```

#### Example of Response

| type=0 (default output, plain text with linebreaks)                                                                                                                                                                                         | type=1 (POST result sent to URL)                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p>StatCode: 00<br>StatName: captured<br>TranID: 10645406<br>Amount: 138.99<br>Domain: ShopB<br>VrfKey: 9862acf1099b625c00b225887e715861<br>Channel: credit</p><p>OrderID: ABC123</p><p>Currency: MYR</p><p>ErrorCode:</p><p>ErrorDesc:</p> | <p>$\_POST \[StatCode] => “00”;</p><p>$\_POST \[StatName] => “captured”;</p><p>$\_POST \[TranID] => “10565234”;</p><p>$\_POST \[Amount] => “3899.00”;</p><p>$\_POST \[Domain] => “shopC”;</p><p>$\_POST\[VrfKey:] => “456cf69e5bddfe8ed47371096”;</p><p>$\_POST\[Channel] => “credit”;</p><p>$\_POST\[OrderID] => “ABC123”;</p><p>$\_POST\[Currency] => “MYR”;</p><p>$\_POST\[ErrorCode] => “”;</p><p>$\_POST\[ErrorDesc] => “”;</p> |

### 2. Query by order ID (single output)

#### Request

**URL:** <mark style="color:purple;"><https://api.e2pay.co.id/RMS/query/q\\_by\\_oid.php></mark>

#### Method: POST or GET

| Variable / Parameter | Type Format / Max Length            | Description / Example                                                   |
| -------------------- | ----------------------------------- | ----------------------------------------------------------------------- |
| amount               | 2 decimal points numeric value      | The payment amount                                                      |
| oID                  | alphanumeric, 32 chars              | Merchant order ID, which might be duplicated.                           |
| domain               | alphanumeric, 32 chars              | Merchant ID in PG system.                                               |
| skey                 | 32 chars hexadecimal string         | This is the data integrity protection hash string.                      |
| url                  | Conditional , URL for POST response | The URL to receive POST response from PG, it is mandatory for type=1    |
| type                 | optional, 1-digit integer           | <p>0 = plain text result (default)</p><p>1 = result via POST method</p> |
| req4token            | optional, 1-digit integer           | <p>0 = No (default)</p><p>1 = Yes for more card related information</p> |

#### Response

| Variable / Parameter | Type Format / Max Length                   | Description / Example                                                                                                                                                              |
| -------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| StatCode             | 2-digit numeric                            | <p>00 = Success</p><p>11 = Failure</p><p>22 = Pending</p>                                                                                                                          |
| StatName             | alphanumeric                               | <p>Success: captured, settled, authorized</p><p>Failure: failed, canceled, chargeback, release, reject/hold, blocked, ReqCancel, ReqChargeback</p><p>Pending: Pending, Unknown</p> |
| OrderID              | alphanumeric, 32 chars                     | Invoice or order number from merchant system.                                                                                                                                      |
| Amount               | 2 decimal points numeric value             | The payment amount                                                                                                                                                                 |
| TranID               | integer, 10 digits                         | Unique transaction ID for tracking purpose.                                                                                                                                        |
| Domain               | alphanumeric, 32 chars                     | Merchant ID in PG system.                                                                                                                                                          |
| BillingDate          | date (YYYY-MM-DD HH:mm:ss)                 | Transaction date/time                                                                                                                                                              |
| BillingName          | alphanumeric, 128 chars                    | Buyer full name                                                                                                                                                                    |
| VrfKey               | 32 chars hexadecimal string                | This is the data integrity protection hash string.                                                                                                                                 |
| Channel              | alphanumeric, 100 chars                    | Payment via channel                                                                                                                                                                |
| Currency             | 3 chars ISO-4217 currency code             | The payment currency. E.g. MYR, USD, EUR, AUD, SGD, CNY, IDR                                                                                                                       |
| ErrorCode            | alphanumeric                               | Error code defined by channel for failed transactions only                                                                                                                         |
| ErrorDesc            | alphanumeric                               | Error description defined by channel for failed transactions only                                                                                                                  |
| token                | optional, with req4token=1                 | Card payment only: if PAN has been tokenized                                                                                                                                       |
| ccbrand              | optional, with req4token=1                 | Card payment only: Visa, MasterCard, AMEX                                                                                                                                          |
| cclast4              | optional, 4-digit numeric with req4token=1 | Card payment only: Last 4-digit of PAN                                                                                                                                             |
| cctype               | optional, with req4token=1                 | Card payment only: Credit, Debit, Prepaid                                                                                                                                          |

#### Formula of Skey & VrfKey

```
skey      =md5( oID & domain & verify_key & amount )
VrfKey    =md5( Amount & secret_key & Domain & OrderID & StatCode )
```

### 3. Query by order ID (batch output)

#### Request

**URL:** <mark style="color:purple;"><https://api.e2pay.co.id/RMS/query/q\\_oid\\_batch.php></mark>

#### Method: POST or GET

| Variable / Parameter | Type Format / Max Length                   | Description / Example                                                   |                                 |
| -------------------- | ------------------------------------------ | ----------------------------------------------------------------------- | ------------------------------- |
| oID                  | alphanumeric, 32 chars                     | Merchant order ID, which might be duplicated.                           |                                 |
| domain               | alphanumeric, 32 chars                     | Merchant ID in PG system.                                               |                                 |
| skey                 | 32 chars hexadecimal string                | This is the data integrity protection hash string.                      |                                 |
| url                  | optional, URL for POST response            | The URL to receive POST response from PG                                |                                 |
| type                 | optional, 1-digit integer                  | <p>0 = plain text result (default)</p><p>1 = result via POST method</p> |                                 |
| format               | optional, 1-digit integer, for type=1 only | <p>0 = result string with delimiter (                                   | )</p><p>1 = result in array</p> |
| req4token            | optional, 1-digit integer                  | <p>0 = No (default)</p><p>1 = Yes for more card related information</p> |                                 |

#### Response

| Variable / Parameter | Type Format / Max Length                    | Description / Example                                                                                                                                                               |
| -------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TranID               | integer, 10 digits                          | Unique transaction ID for tracking purpose.                                                                                                                                         |
| BillingDate          | date (YYYY-MM-DD HH:mm:ss)                  | Transaction date                                                                                                                                                                    |
| StatCode             | 2-digit numeric                             | <p>00 = Success</p><p>11 = Failure</p><p>22 = Pending</p>                                                                                                                           |
| StatName             | alphanumeric                                | <p>Success: captured, settled, authorized</p><p>Failure: failed, cancelled, chargeback, release, reject/hold, blocked, ReqCancel, ReqChargeback</p><p>Pending: Pending, Unknown</p> |
| Amount               | 2 decimal points numeric value              | The payment amount                                                                                                                                                                  |
| BillingName          | alphanumeric, 128 chars                     | Buyer full name                                                                                                                                                                     |
| Currency             | 3 chars ISO-4217 currency code              | The payment currency. E.g. MYR, USD, EUR, AUD, SGD, CNY, IDR                                                                                                                        |
| ErrorCode            | alphanumeric                                | Error code defined by channel for failed transactions only                                                                                                                          |
| ErrorDesc            | alphanumeric                                | Error description defined by channel for failed transactions only                                                                                                                   |
| token                | optional, with req4token=1                  | Card payment only: if PAN has been tokenized                                                                                                                                        |
| ccbrand              | optional, with req4token=1                  | Card payment only: Visa, MasterCard, AMEX                                                                                                                                           |
| cclast4              | optional, 4-digit numeric, with req4token=1 | Card payment only: Last 4-digit of PAN                                                                                                                                              |
| cctype               | optional, with req4token=1                  | Card payment only: Credit, Debit, Prepaid                                                                                                                                           |

#### Formula of skey

```
skey   =md5( oID & domain & verify_key )
```

#### Example of Response

<table data-header-hidden data-full-width="true"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><p>type=0, </p><p>plain text output, newline with single or two TAB character(s)</p></td><td><p>TranID BillingDate StatCode StatName Amount BillingName Currency ErrorCode ErrorDesc</p><p>418607 2009-11-26 22 pending 25.00 Lenka         IDR</p><p>418603 2009-11-26 00 captured 125.10 Mika           IDR</p><p>418583 2009-11-26 00 captured 71.10 Ciara           IDR</p></td></tr><tr><td><p>type=1, format=0,</p><p>POST variables with delimiter  “|”</p></td><td><p>$_POST[TranID] = “418607|418603|418583”;</p><p>$_POST[BillingDate] = “2009-11-26|2009-11-26|2009-11-26”;</p><p>$_POST[StatCode] = “22|00|00”;</p><p>$_POST[StatName] = “pending|captured|captured”;</p><p>$_POST[Amount] = “25.00|125.10|71.10”;</p><p>$_POST[BillingName] = “Lenka|Mika|Ciara”;</p><p>$_POST[Currency] = “IDR|IDR|IDR”;</p><p>$_POST[ErrorCode] = “||”;</p><p>$_POST[ErrorDesc] = “||”;</p></td></tr><tr><td><p>type=1, format=1,</p><p>POST variables in array</p></td><td><p>$_POST[0][TranID] = “418607”;</p><p>$_POST[0][BillingDate] = “2009-11-26”;</p><p>$_POST[0][StatCode] = “22”;</p><p>$_POST[0][StatName] = “pending”;</p><p>$_POST[0] [Amount] = “25.00”;</p><p>$_POST[0] [BillingName] = “Lenka”;</p><p>$_POST[0] [Currency] = “IDR”;</p><p>$_POST[0] [ErrorCode] = “”;</p><p>$_POST[0] [ErrorDesc] = “”;</p><p>$_POST[1] [TranID] = “418603”;</p><p>$_POST[1] [BillingDate] = “2009-11-26”;</p><p>$_POST[1] [StatCode] = “00”;</p><p>$_POST[1] [StatName] = “captured”;</p><p>$_POST[1] [Amount] = “125.10”;</p><p>$_POST[1] [BillingName] = “Mika”;</p><p>$_POST[1] [Currency] = “IDR”;</p><p>$_POST[1] [ErrorCode] = “”;</p><p>$_POST[1] [ErrorDesc] = “”;</p><p>$_POST[2] [TranID] = “418583”;</p><p>$_POST[2] [BillingDate] = “2009-11-26”;</p><p>$_POST[2] [StatCode] = “00”;</p><p>$_POST[2] [StatName] = “captured”;</p><p>$_POST[2] [Amount] = “71.10”;</p><p>$_POST[2] [BillingName] = “Ciara”;</p><p>$_POST[2] [Currency] = “IDR”;</p><p>$_POST[2] [ErrorCode] = “”;</p><p>$_POST[2] [ErrorDesc] = “”;</p></td></tr></tbody></table>

\*If you find Example Type One is unclear

<table data-full-width="true"><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td><p>type=0, </p><p>plain text output, newline with single or two TAB character(s)</p></td><td>TransID<br>418607<br>418603<br>418583</td><td>BillingDate<br>2009-11-26<br>2009-11-26<br>2009-11-26</td><td>StatCode<br>22<br>20<br>00</td><td>StatName<br>pending<br>captured<br>captured</td><td>Amount<br>25.00<br>125.10<br>71.10</td><td>BillingName<br>Lenka<br>Mika<br>Ciara</td><td>Currency<br>IDR<br>IDR<br>IDR</td><td>ErrorCode<br><br><br></td><td>ErrorDesc<br><br><br></td></tr></tbody></table>

### &#x20;4. Query by multiple order ID (batch output)

#### **Request**

**URL:** <mark style="color:purple;"><https://api.e2pay.co.id/RMS/query/q\\_by\\_oids.php></mark>

#### Method: POST or GET

| Variable / Parameter | Type Format / Max Length                         | Description / Example                                                                                       |                                 |
| -------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | ------------------------------- |
| oIDs                 | alphanumeric, up to 100 orders                   | Merchant order ID, must be URLencoded.                                                                      |                                 |
| delimiter            | single character, default is “\|”                | Avoid using any symbol that might exist in order ID, and also any of these:  “,%, \*, <, >, ? , \\, $, &, = |                                 |
| domain               | alphanumeric, 32 chars                           | Merchant ID in PG system.                                                                                   |                                 |
| skey                 | 32 chars hexadecimal string                      | This is the data integrity protection hash string.                                                          |                                 |
| url                  | optional, URL for POST response                  | The URL to receive POST response from PG                                                                    |                                 |
| type                 | optional, 1-digit integer                        | <p>0 = plain text result (default)</p><p>1 = result via POST method</p>                                     |                                 |
| format               | optional, 1-digit integer, apply for type=1 only | <p>result string with TAB-newline (default)</p><p>0 = result string with delimiter (                        | )</p><p>1 = result in array</p> |
| req4token            | optional, 1-digit integer                        | <p>0 = No (default)</p><p>1 = Yes for more card related information</p>                                     |                                 |

#### Response

| Variable / Parameter | Type Format / Max Length                    | Description / Example                                                                                                                                                               |
| -------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| OrderID              | alphanumeric, 32 chars                      | Merchant order ID for tracking purpose.                                                                                                                                             |
| TranID               | integer, 10 digits                          | Unique transaction ID for tracking purpose.                                                                                                                                         |
| BillingDate          | date (YYYY-MM-DD HH:mm:ss)                  | Transaction date                                                                                                                                                                    |
| StatCode             | 2-digit numeric                             | <p>00 = Success</p><p>11 = Failure</p><p>22 = Pending</p>                                                                                                                           |
| StatName             | alphanumeric                                | <p>Success: captured, settled, authorized</p><p>Failure: failed, cancelled, chargeback, release, reject/hold, blocked, ReqCancel, ReqChargeback</p><p>Pending: Pending, Unknown</p> |
| Amount               | 2 decimal points numeric value              | The payment amount                                                                                                                                                                  |
| BillingName          | alphanumeric, 128 chars                     | Buyer full name                                                                                                                                                                     |
| VrfKey               | 32 chars hexadecimal string                 | This is the data integrity protection hash string.                                                                                                                                  |
| Channel              | alphanumeric, 100 chars                     | Payment via channel                                                                                                                                                                 |
| Currency             | 3 chars ISO-4217 currency code              | The payment currency. E.g. MYR, USD, EUR, AUD, SGD, CNY, IDR                                                                                                                        |
| ErrorCode            | alphanumeric                                | Error code defined by channel for failed transactions only                                                                                                                          |
| ErrorDesc            | alphanumeric                                | Error description defined by channel for failed transactions only                                                                                                                   |
| token                | optional, with req4token=1                  | Card payment only: if PAN has been tokenized                                                                                                                                        |
| ccbrand              | optional, with req4token=1                  | Card payment only: Visa, MasterCard, AMEX                                                                                                                                           |
| cclast4              | optional, 4-digit numeric, with req4token=1 | Card payment only: Last 4-digit of PAN                                                                                                                                              |
| cctype               | optional, with req4token=1                  | Card payment only: Credit, Debit, Prepaid                                                                                                                                           |

#### Formula of Skey and VrfKey

```
skey       =md5( domain & oIDS & verify_key )
VrfKey     =md5( Amount & secret_key & Domain & OrderID & StatCode )
```

#### Example of response

<table data-header-hidden data-full-width="true"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><p>type=1</p><p>format=1</p></td><td><p>[oid1] => Array</p><p>     (</p><p>         [TranID] => 9994238</p><p>         [BillingDate] => 2016-11-28 16:32:08</p><p>         [StatCode] => 00</p><p>         [StatName] => captured</p><p>         [Amount] => 30.00</p><p>         [BillingName] => kimyoon</p><p>         [VrfKey] => 311d72c16e0d3b3fc7994ae93467a2d9</p><p>         [Channel] => credit</p><p>                  [Currency] => IDR</p><p>                  [ErrorCode] =></p><p>                  [ErrorDesc] =></p><p>     )</p><p> [oid2] => Array</p><p>     (</p><p>         [TranID] => 10004613</p><p>                [BillingDate] => 2016-11-29 09:56:02<br>                [StatCode] => 11<br>                [StatName] => failed<br>                [Amount] => 58.00<br>                [BillingName] => MohdAli<br>                [VrfKey] => f9f06b47e23410e624df5e272accb27dc<br>                [Channel] => e2Pay_DANA</p><p>                [Currency] => IDR</p><p>                  [ErrorCode] =></p><p>                  [ErrorDesc] =></p><p>     )</p><p><br></p><p>...</p><p><br></p><p> [oidN] => Array</p><p>     (</p><p>         [TranID] => -</p><p>         [BillingDate] => -</p><p>         [StatCode] => -</p><p>         [StatName] => -</p><p>         [Amount] => -</p><p>         [BillingName] => -</p><p>         [VrfKey] => -</p><p>         [Channel] => -</p><p>                  [Currency] => -</p><p>                  [ErrorCode] => -</p><p>                  [ErrorDesc] => -</p><p>     )</p></td></tr><tr><td><p>type=1</p><p>format=0</p><p>delimiter=|</p></td><td><p>  [OrderID] => oid1|oid2|...|oidN</p><p>  [TranID] =>  9994238|10004613|...|-</p><p>  [BillingDate] => 2016-11-28 16:32:08|2016-11-29 09:56:02|...|-</p><p>  [StatCode] => 00|11|...|-</p><p>  [StatName] => captured|failed|...|-</p><p>  [Amount] => 30.00|58.00|...|-</p><p>  [BillingName] => Nurbaizura|KUMARASAN|...|-</p><p>  [VrfKey] => 311d72c16e0d3b3fc7994ae93467a2d9|f9f06b47e23410e624df5e272accb27dc|...|-</p><p>  [Channel] => mb2u|fpx|...|-</p><p>  [Currency] => IDR|IDR|...|-</p><p>  [ErrorCode] => ||...|-</p><p>  [ErrorDesc] => ||...|-</p></td></tr></tbody></table>

### 5. Query by multiple transaction ID (batch output)

#### Request

**URL:** <mark style="color:purple;"><https://api.e2pay.co.id/RMS/query/q\\_by\\_tids.php></mark>

#### Method: POST or GET

| Variable / Parameter | Type Format / Max Length                              | Description / Example                                                   |                                 |
| -------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------- |
| tIDs                 | concatenated transaction ID with “\|” up to 100 items | A group of transaction ID, must be URLencoded                           |                                 |
| domain               | alphanumeric, 32 chars                                | Merchant ID in PG system                                                |                                 |
| skey                 | 32 chars hexadecimal string                           | This is the data integrity protection hash string                       |                                 |
| url                  | optional, URL for POST response                       | The URL to receive POST response from PG                                |                                 |
| type                 | optional, 1-digit integer                             | <p>0 = plain text result (default)</p><p>1 = result via POST method</p> |                                 |
| format               | optional, 1-digit integer, apply for type=1 only      | <p>0 = result string with delimiter (                                   | )</p><p>1 = result in array</p> |
| req4token            | optional, 1-digit integer                             | <p>0 = No (default)</p><p>1 = Yes for more card related information</p> |                                 |

#### Response

| Variable / Parameter | Type Format / Max Length                    | Description / Example                                                                                                                                                               |
| -------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TranID               | integer, 10 digits                          | Unique transaction ID for tracking purpose.                                                                                                                                         |
| Amount               | 2 decimal points numeric value              | The payment amount                                                                                                                                                                  |
| BillingDate          | date (YYYY-MM-DD HH:mm:ss)                  | Transaction date                                                                                                                                                                    |
| BillingName          | alphanumeric, 128 chars                     | Buyer full name                                                                                                                                                                     |
| VrfKey               | 32 chars hexadecimal string                 | This is the data integrity protection hash string.                                                                                                                                  |
| StatCode             | 2-digit numeric                             | <p>00 = Success</p><p>11 = Failure</p><p>22 = Pending</p>                                                                                                                           |
| StatName             | alphanumeric                                | <p>Success: captured, settled, authorized</p><p>Failure: failed, cancelled, chargeback, release, reject/hold, blocked, ReqCancel, ReqChargeback</p><p>Pending: Pending, Unknown</p> |
| OrderID              | alphanumeric, 32 chars                      | Merchant order ID for tracking purpose.                                                                                                                                             |
| Currency             | 3 chars ISO-4217 currency code              | The payment currency. E.g. MYR, USD, EUR, AUD, SGD, CNY, IDR                                                                                                                        |
| ErrorCode            | alphanumeric                                | Error code defined by channel for failed transactions only                                                                                                                          |
| ErrorDesc            | alphanumeric                                | Error description defined by channel for failed transactions only                                                                                                                   |
| token                | optional, with req4token=1                  | Card payment only: if PAN has been tokenized                                                                                                                                        |
| ccbrand              | optional, with req4token=1                  | Card payment only: Visa, MasterCard, AMEX                                                                                                                                           |
| cclast4              | optional, 4-digit numeric, with req4token=1 | Card payment only: Last 4-digit of PAN                                                                                                                                              |
| cctype               | optional, with req4token=1                  | Card payment only: Credit, Debit, Prepaid                                                                                                                                           |

#### Formula of skey and VrfKey

```
skey       =md5( domain & tIDS & verify_key )
VrfKey     =md5( Amount & secret_key & Domain & TranID & StatCode )
```

## Daily Transaction Report (Reconciliation)

PG Daily Transaction Report provides merchant end-of-day (EoD) reconciliation or to verify all transactions for a specific date.

#### Request

URL: <https://api.e2pay.co.id/RMS/API/PSQ/psq-daily.php>

#### Method: POST or GET

| Variable / Parameter                                  | Type Format / Max Length                       | Description / Example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                                                         |
| ----------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| merchantID                                            | alphanumeric, 32 chars                         | Merchant ID in PG system.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                                                         |
| skey                                                  | 32 chars hexadecimal string                    | This is the data integrity protection hash string.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                                                         |
| rdate                                                 | date (YYYY-MM-DD) or date(YYYY-MM-DD HH:ii:ss) | <p>The date or beginning time of transactions to query</p><p>2020-10-10 or 2020-10-10 07:11:24</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                                                         |
| rduration                                             | optional, second in numeric                    | Without rduration, the search duration is 24 hours or 86400 seconds starting from rdate                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                         |
| status                                                | optional, alphanumeric, 32 chars               | <p>00 - success</p><p>11 - failed</p><p>22 - pending</p><p><br></p><p>Combine with delimiter “                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | ” for multiple status or left empty for all status.</p> |
| version                                               | version                                        | 2 or 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |                                                         |
| <p>additional\_fields</p><p>\[New from Version 2]</p> | optional, predefined tags                      | <p>BillingEmail - billing email</p><p>TransactionRate - transaction rate</p><p>BillingInfo - billing info</p><p>TransactionCost - transaction cost</p><p>Channel - channel</p><p>BillingMobileNumber - billing mobile</p><p>TransactionFee - transaction fee</p><p>GST - GST (tax)</p><p>NetAmount - net amount</p><p>IPAddress - IP address</p><p>BankName - bank name</p><p>BIN - card no (hidden)</p><p>ExpiryDate - card expiry date</p><p>StatusDescription - status description</p><p>SettlementDate - settlement date</p><p>PaidDate - paid date</p><p>TerminalID - terminal ID</p><p>PayTransactionID - transaction ID</p><p>BuyerName - buyer name<br>CaptureRefID - Capture Reference ID (Only in v3)<br>RefundRefID - Refund Reference ID (Only in v3)</p><p>all - for all additional fields</p><p><br></p><p>Combine with delimiter “,” for multiple fields</p> |                                                         |
| <p>response\_type<br>\[New from Version 2]</p>        | optional                                       | Response format in either text/json/csv(only in v2 and v3)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                                                         |

#### Formula of Skey

```
skey   =md5( rdate & merchantID & secret_key )
```

#### Response

(plain text with newline & TAB characters)

| Variable / Parameter                                                                                                                                                                                                                                                                                                            | Type Format / Max Length        | Description / Example                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| BillingDate                                                                                                                                                                                                                                                                                                                     | date/time (YYYY-MM-DD HH:mm:ss) | Transaction date/time                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| OrderID                                                                                                                                                                                                                                                                                                                         | alphanumeric, 32 chars          | Invoice or order number from merchant system.                                                                                                                                                                                                                                                                                                                                                                                                                    |
| TranID                                                                                                                                                                                                                                                                                                                          | integer, 10 digits              | Unique transaction ID for tracking purpose.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Channel                                                                                                                                                                                                                                                                                                                         | Predefined string in PG system  | Channel references for the merchant system.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Amount                                                                                                                                                                                                                                                                                                                          | 2 decimal points numeric value  | The payment amount                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| StatCode                                                                                                                                                                                                                                                                                                                        | 2-digit numeric                 | <p>00 = Success</p><p>11 = Failure</p><p>22 = Pending</p>                                                                                                                                                                                                                                                                                                                                                                                                        |
| StatName                                                                                                                                                                                                                                                                                                                        | word                            | <p>Success: captured, settled, authorized</p><p>Failure: failed, cancelled, chargeback, release, reject/hold, blocked, ReqCancel, ReqChargeback</p><p>Pending: Pending, Unknown</p>                                                                                                                                                                                                                                                                              |
| BillingName                                                                                                                                                                                                                                                                                                                     | alphanumeric, 128 chars         | Buyer full name                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ServiceItem                                                                                                                                                                                                                                                                                                                     | text                            | Billing Information / Description (newline will be replaced by whitespace)                                                                                                                                                                                                                                                                                                                                                                                       |
| <p>Additional fields:</p><p>BillingEmail</p><p>TransactionRate</p><p>TransactionCost</p><p>BillingMobileNumber</p><p>TransactionFee</p><p>GST</p><p>NetAmount</p><p>IPAddress</p><p>BankName</p><p>ExpiryDate</p><p>StatusDescription</p><p>SettlementDate</p><p>PaidDate</p><p>TerminalID<br>PayTransactionID<br>BuyerName</p> | text (default) or JSON string   | <p>BillingEmail = <ABC@e2pay.co.id></p><p>TransactionRate = 0.0290</p><p>TransactionCost =  0.0000</p><p>BillingMobileNumber = 0123456789</p><p>TransactionFee = 100.0</p><p>GST = 0</p><p>NetAmount = 1900.0</p><p>IPAddress = 192.168.0.1</p><p>BankName = unknownbank</p><p>ExpiryDate = 2020</p><p>StatusDescription = This is status description</p><p>SettlementDate = 2020-05-26 10:51:51</p><p>PaidDate = 2020-05-31 10:51:51</p><p>TerminalID = 999</p> |

## Void Pending-Cash API

For merchants to cancel and void the cash payment request order, before getting paid or the expiry time, and force-to-expired.

#### Request

URL: <https://api.e2pay.co.id/RMS/API/VoidPendingCash/index.php>

#### Method: POST or GET

| Field Name | Data Type(Size) | M/O | Description                                                                                     |
| ---------- | --------------- | --- | ----------------------------------------------------------------------------------------------- |
| tranID     | n{1..10}        | M   | PG Transaction ID                                                                               |
| amount     | n{10,2}         | M   | The total amount to be paid in one purchase order. 2 decimal points, comma( , ) is not allowed. |
| merchantID | an{1..32}       | M   | Merchant ID provided by PG                                                                      |
| checksum   | an{32}          | M   | This is request integrity protection hash string.                                               |

<mark style="color:red;">Checksum= md5(  tranID . amount . merchantID .  verify\_key )</mark>

#### Response

PG responds JSON format to merchant upon a successful request

| Field Name | Data Type(Size) | M/O | Description                                                                                                                                                                                                                                                                                                                          |
| ---------- | --------------- | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| StatCode   | n{2}            | M   | <p>00 = Success (voided)</p><p>11 = Missing required parameter (\<FieldName>).</p><p>12 = Merchant info not found</p><p>13 = Invalid checksum value.</p><p>14 = Transaction not found</p><p>15 = Transaction not Pending</p><p><br></p><p>99 = System is busy now, temporary out of services. Please try again later.</p><p><br></p> |
| tranID     | n{1..10}        | O   | PG Transaction ID                                                                                                                                                                                                                                                                                                                    |
| orderid    | an{1..32}       | O   | Merchant order                                                                                                                                                                                                                                                                                                                       |
| amount     | n{10,2}         | O   | The total amount to be paid in one purchase order                                                                                                                                                                                                                                                                                    |
| merchantID | an{1..32}       | O   | Merchant ID provided by PG                                                                                                                                                                                                                                                                                                           |
| channel    | an{1..32}       | O   | Channel references for the merchant system                                                                                                                                                                                                                                                                                           |
