# List

## Endpoint URL

| Environment | URL                                                     | Method |
| ----------- | ------------------------------------------------------- | ------ |
| Sandbox     | <https://sandbox.securepay.my/api/v1/transactions/list> | GET    |
| Production  | <https://securepay.my/api/v1/transactions/list>         | GET    |

## Credentials

|                                 |                                      |
| ------------------------------- | ------------------------------------ |
| uid (Merchant API UID)          | 2aaa1633-e63f-4371-9b85-91d936aa56a1 |
| token (Merchant API Auth Token) | ZyUfF8EmyabcMWPcaocX                 |

## Parameters

| Parameter       | Description                                                                       |
| --------------- | --------------------------------------------------------------------------------- |
| per\_page       | How many data to display, default is 10 data and maximum 100 per page             |
| page            | Jump into a page. e.g: the data have 5 pages, to visit 3rd page just set page = 3 |
| payment\_status | Success payment is set to true and false for unsuccessful.                        |
| start\_date     | Search data by date range e.g start\_date: 2020-09-10                             |
| end\_date       | Search data by date range e.g end\_date: 2020-09-15                               |

{% hint style="info" %}
Default parameters list will be applied (refer Default section), If no parameters are supply during API request.
{% endhint %}

{% hint style="warning" %}
Both start\_date and end\_date need to be supplied for date range search. E.g For daily transaction on 20/09/2020 need to set start\_date=2020-09-20 and end\_date=2020-09-20&#x20;
{% endhint %}

| <https://sandbox.securepay.my/api/v1/transactions/list?start\\_date=2020-09-20\\&end\\_date=2020-09-20> |
| ------------------------------------------------------------------------------------------------------- |

## Default

Per page: 10\
Maximum per page: 100 (Please use pagination if data more than 100)\
Payment status: Success (True)\
Data search limit: 3 months (90 days)

## Paginate <a href="#paginate" id="paginate"></a>

‌

Fetch 5 payments per page‌

<https://sandbox.securepay.my/api/v1/payments/list?per\\_page=5>

```
curl -u 2aaa1633-e63f-4371-9b85-91d936aa56a1:ZyUfF8EmyabcMWPcaocX https://sandbox.securepay.my/api/v1/transactions/list?per_page=1 | json_pp 
```

```
‌{
   "next_page" : 2,
   "current_page" : 1,
   "per_page" : 1,
   "total_page" : 375,
   "prev_page" : null,
   "total_entries" : 375,
   "transactions" : [
      {
         "merchant_reference_number" : "IJNQS1629161503",
         "fpx_debit_auth_code" : "00",
         "interface_uid" : "4a73a364-6548-4e17-9130-c6e9bffa3081",
         "payment_stage" : "payment_successful",
         "buyer_name" : "abu",
         "fpx_model" : "B2C",
         "currency" : "MYR",
         "merchant_name" : "SP SDN BHD",
         "client_ip" : "103.145.216.156",
         "payment_id" : 8172,
         "order_number" : "7A2C840800",
         "created_at" : "2021-08-17T08:51:51.156+08:00",
         "source" : "FPX",
         "retry_url" : null,
         "fpx_transaction_time" : "20210817085144",
         "payment_method" : "fpx_online_banking",
         "payment_mode" : "merchant",
         "fpx_bank" : "SBI BANK A",
         "merchant_co_number" : "1273013-P",
         "receipt_url" : "https://sandbox.securepay.my/api/v1/receipt/IJNQS1629161503.pdf?uid=67a90303bfa6d891070c",
         "transaction_amount" : "20.00",
         "fpx_name" : "N@m3()/PYN .-&B'UYER",
         "fpx_transaction_id" : "2108170851440009",
         "fpx_status" : true,
         "status_url" : "https://sandbox.securepay.my/api/v1/status/IJNQS1629161503?uid=67a90303bfa6d891070c",
         "uid" : "67a90303bfa6d891070c",
         "created_at_unixtime" : "1629161512",
         "payment_status" : true,
         "transaction_fee" : "1.20",
         "fpx_status_message" : "Transaction Approved",
         "transaction_amount_received" : "20.00",
         "interface_name" : "Default",
         "buyer_phone" : "",
         "buyer_email" : "nawawijamili@gmail.com"
      }
   ]
}

```

**Getting second page‌**

<https://sandbox.securepay.my/api/v1/transactions/list?per\\_page=5\\&page=2>

**Example fetch 100 payments**&#x20;

<https://sandbox.securepay.my/api/v1/transactions/list?per\\_page=100>

**Example fetch 100 payments on page 3**

<https://sandbox.securepay.my/api/v1/transactions/list?per\\_page=100\\&page=3‌>

## Payment status <a href="#payment-status" id="payment-status"></a>

‌

There are true and false for payment status.‌

True status - Payment successfully received‌

False Status - Payment not successfully go through‌

To request the list by payment status e.g:&#x20;

1\. request success payment status (default) `https://sandbox.securepay.my/api/v1/transactions/list?payment_status`‌

`https://sandbox.securepay.my/api/v1/transactions/list?payment_status=true`‌

2\. request failed payment status `https://sandbox.securepay.my/api/v1/transactions/list?payment_status=false`‌

3\. request success and failed status`https://sandbox.securepay.my/api/v1/transactions/list?payment_status=all`‌

4\. request success payment status with 10 data on page 2 `https://sandbox.securepay.my/api/v1/transactions/list?payment_status=true&per_page=10&page=2`

By default, if no payment\_status is set the API will return success (true) status.‌

## Data created date and time <a href="#data-created-date-and-time" id="data-created-date-and-time"></a>

‌

Each data will have two types of format:&#x20;

1\. created\_at e.g: 2020-09-27T17:19:43.593+08:00 2. created\_at\_unixtime e.g: 1601198383​![](https://gblobscdn.gitbook.com/assets%2F-MHFsN346MN-4Eibh12Q%2F-MIADYzriRPM9l4dcsR1%2F-MIDvPjStEFupUKv8-Uw%2FScreenshot%202020-09-27%20at%205.38.31%20PM.png?alt=media\&token=8bf20b22-031d-4b38-a916-e920da2f3d3e)‌

## Get daily transaction list <a href="#get-daily-transaction-list" id="get-daily-transaction-list"></a>

‌

Below example set start\_date = 2020-09-27 and end\_date = 2020-09-27

```
https://sandbox.securepay.my/api/v1/transactions/list?payment_status=all&per_page=50&end_date=2020-09-28&start_date=2020-09-27​
```

‌

## Search by date range <a href="#search-by-date-range" id="search-by-date-range"></a>

‌

Below example set start\_date = 2020-09-15 and end\_date = 2020-09-27

```
https://sandbox.securepay.my/api/v1/transactions/list?payment_status=false&per_page=5&end_date=2020-09-28&start_date=2020-09-15​
```

‌

## Example using curl <a href="#example-using-curl" id="example-using-curl"></a>

Example 2 with header

```
curl -u 2aaa1633-e63f-4371-9b85-91d936aa56a1:ZyUfF8EmyabcMWPcaocX https://sandbox.securepay.my/api/v1/transactions/list?per_page=2 | json_pp 
```

## Response values <a href="#response-values" id="response-values"></a>

| Parameter                     | Description                                                |
| ----------------------------- | ---------------------------------------------------------- |
| source                        | FPX, Credit Card or other                                  |
| payment\_status               | true - success payment and false - failed payment          |
| currency                      | RM - Ringgit Malaysia (other currencies are not supported) |
| transaction\_amount           | Amount in RM for this transaction.                         |
| transaction\_amount\_received | Amount received, if payment\_status false set to 0.00      |
| order\_number                 | Order Number sent previously by merchant.                  |
| merchant\_reference\_number   | This number is generated by securepay platform             |
| exchange\_number              | This number is generated by securepay platform             |
| buyer\_name                   | Buyer name                                                 |
| buyer\_phone                  | Buyer phone                                                |
| buyer\_email                  | Buyer email                                                |
| payment\_id                   | For reference                                              |
| transaction\_fee              | Transaction fee                                            |
| fpx\_model                    | B2C or B2B1                                                |
| payment\_mode                 | merchant, buyer or merchant\_credit                        |
| payment\_method               | fpx\_online banking or credit card                         |
| client\_ip                    | Client IP address                                          |
| status\_url                   | SecurePay Status URL                                       |
| retry\_url                    | Any failed payment, can make retry using this links        |
| receipt\_url                  | SecurePay PDF receipt URL                                  |
| created\_at                   | Created date and time ISO8601 format                       |
| created\_at\_unixtime         | Created date and time in unix time epoch format            |
