SecurePay
Search…
List (deprecated and no longer available)
Merchant can fetch their transactions. This endpoint is no longer available, please refer to new one.

Endpoint URL

Environment
URL
Method
Sandbox
https://sandbox.securepay.my/api/v1/payments/list
GET
Production
https://securepay.my/api/v1/payments/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
Default parameters list will be applied (refer Default section), If no parameters are supply during API request.
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
https://sandbox.securepay.my/api/v1/payments/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

Fetch 5 payments per page
https://sandbox.securepay.my/api/v1/payments/list?per_page=5
and the response will be paginated and also will include pagination headers
Get pagination info from header
Pagination headers
CURL
PHP
RUBY
1
curl -i -H "Application/json" -u 2aaa1633-e63f-4371-9b85-91d936aa56a1:ZyUfF8EmyabcMWPcaocX https://sandbox.securepay.my/api/v1/payments/list?per_page=5
2
Copied!
1
Copied!
1
Copied!
1
X-Total: 6
2
X-Total-Pages: 2
3
X-Page: 1
4
X-Per-Page: 5
5
X-Next-Page: 2
6
X-Prev-Page:
7
X-Offset:
Copied!
Getting second page
https://sandbox.securepay.my/api/v1/payments/list?per_page=5&page=2
1
X-Total: 6
2
X-Total-Pages: 2
3
X-Page: 2
4
X-Per-Page: 5
5
X-Next-Page:
6
X-Prev-Page: 1
7
X-Offset:
Copied!
Example fetch 100 payments data
https://sandbox.securepay.my/api/v1/payments/list?per_page=100
1
X-Total: 380
2
X-Total-Pages: 4
3
X-Page: 1
4
X-Per-Page: 100
5
X-Next-Page: 2
6
X-Prev-Page:
7
X-Offset:
Copied!
https://sandbox.securepay.my/api/v1/payments/list?per_page=100&page=3
1
X-Total: 380
2
X-Total-Pages: 4
3
X-Page: 3
4
X-Per-Page: 100
5
X-Next-Page: 4
6
X-Prev-Page: 2
7
X-Offset:
Copied!

Payment status

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: 1. request success payment status (default) https://sandbox.securepay.my/api/v1/payments/list?payment_status
https://sandbox.securepay.my/api/v1/payments/list?payment_status=true
2. request failed payment status https://sandbox.securepay.my/api/v1/payments/list?payment_status=false
3. request success and failed statushttps://sandbox.securepay.my/api/v1/payments/list?payment_status=all
4. request success payment status with 10 data on page 2 https://sandbox.securepay.my/api/v1/payments/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

Each data will have two types of format: 1. created_at e.g: 2020-09-27T17:19:43.593+08:00 2. created_at_unixtime e.g: 1601198383

Get daily transaction list

Below example set start_date = 2020-09-27 and end_date = 2020-09-27
1
https://sandbox.securepay.my/api/v1/payments/list?payment_status=all&per_page=50&end_date=2020-09-28&start_date=2020-09-27
2
Copied!

Search by date range

Below example set start_date = 2020-09-15 and end_date = 2020-09-27
1
https://sandbox.securepay.my/api/v1/payments/list?payment_status=false&per_page=5&end_date=2020-09-28&start_date=2020-09-15
2
Copied!

Example using curl

Example 1 print pretty JSON
Example 2 with header
1
curl -u 2aaa1633-e63f-4371-9b85-91d936aa56a1:ZyUfF8EmyabcMWPcaocX https://sandbox.securepay.my/api/v1/payments/list?per_page=2 | json_pp
2
% Total % Received % Xferd Average Speed Time Time Time Current
3
Dload Upload Total Spent Left Speed
4
100 1367 0 1367 0 0 14698 0 --:--:-- --:--:-- --:--:-- 14698
5
[
6
{
7
"payment_status" : true,
8
"exchange_number" : "TCKVR1601378132",
9
"client_ip" : "175.139.210.207",
10
"payment_id" : 2171,
11
"retry_url" : null,
12
"status_url" : "https://sandbox.securepay.my/api/v1/status/TCKVR1601378130?uid=266c1e922692a8dc1187",
13
"source" : "FPX",
14
"created_at_unixtime" : "1601378142",
15
"transaction_amount" : "50.00",
16
"created_at" : "2020-09-29T19:15:42.419+08:00",
17
"transaction_amount_received" : "50.00",
18
"buyer_name" : "ADAM HARIS AHMAD",
19
"merchant_reference_number" : "TCKVR1601378130",
20
"receipt_url" : "https://sandbox.securepay.my/api/v1/receipt/TCKVR1601378130.pdf?uid=266c1e922692a8dc1187",
21
"order_number" : "20200929111530266",
22
"currency" : "MYR",
23
"buyer_phone" : "+60123121977",
24
"buyer_email" : "[email protected]"
25
},
26
{
27
"retry_url" : null,
28
"exchange_number" : "KWATI1601198351",
29
"payment_status" : true,
30
"payment_id" : 2161,
31
"client_ip" : "14.192.214.33",
32
"created_at_unixtime" : "1601198383",
33
"source" : "FPX",
34
"transaction_amount" : "50.00",
35
"status_url" : "https://sandbox.securepay.my/api/v1/status/KWATI1601198371?uid=201b7fa16595498091cb",
36
"merchant_reference_number" : "KWATI1601198351",
37
"buyer_name" : "AMIR DAUD AHMAD",
38
"receipt_url" : "https://sandbox.securepay.my/api/v1/receipt/KWATI1601198371.pdf?uid=201b7fa16595498091cb",
39
"transaction_amount_received" : "50.00",
40
"created_at" : "2020-09-27T17:19:43.593+08:00",
41
"buyer_phone" : "+60123121977",
42
"currency" : "MYR",
43
"buyer_email" : "[email protected]",
44
"order_number" : "20200927091930866"
45
}
46
]
47
Copied!
1
curl -i -H "Application/json" -u 2aaa1633-e63f-4371-9b85-91d936aa56a1:ZyUfF8EmyabcMWPcaocX https://sandbox.securepay.my/api/v1/payments/list?per_page=2
2
HTTP/1.1 200 OK
3
Server: nginx
4
Date: Tue, 29 Sep 2020 11:36:24 GMT
5
Content-Type: application/json
6
Transfer-Encoding: chunked
7
Connection: keep-alive
8
X-Total: 28
9
X-Total-Pages: 14
10
X-Per-Page: 2
11
X-Page: 1
12
X-Next-Page: 2
13
X-Prev-Page:
14
X-Offset:
15
ETag: W/"a2d73a83d773e66cc023fe31be19d70f"
16
Cache-Control: max-age=0, private, must-revalidate
17
X-Request-Id: 276151ec-7fb4-4e62-b7da-6b44ff00f6ea
18
X-Runtime: 0.028449
19
Vary: Origin
20
X-XSS-Protection: 1; mode=block
21
Expect-CT: max-age=0
22
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
23
24
[{"source":"FPX","payment_status":true,"currency":"MYR","transaction_amount":"50.00","transaction_amount_received":"50.00","order_number":"20200929111530266","merchant_reference_number":"TCKVR1601378132","exchange_number":"TCKVR1601378132","buyer_name":"ADAM HARIS AHMAD","buyer_phone":"+60123121977","buyer_email":"[email protected]","payment_id":2171,"client_ip":"175.139.210.207","status_url":"https://sandbox.securepay.my/api/v1/status/TCKVR1601378130?uid=266c1e922692a8dc1187","retry_url":null,"receipt_url":"https://sandbox.securepay.my/api/v1/receipt/TCKVR1601378130.pdf?uid=266c1e922692a8dc1187","created_at":"2020-09-29T19:15:42.419+08:00","created_at_unixtime":"1601378142"},{"source":"FPX","payment_status":true,"currency":"MYR","transaction_amount":"50.00","transaction_amount_received":"50.00","order_number":"20200927091930816","merchant_reference_number":"KWATI1601198371","exchange_number":"KWATI1601198371","buyer_name":"AMIR HARIS AHMAD","buyer_phone":"+60123121979","buyer_email":"[email protected]","payment_id":2161,"client_ip":"14.192.214.33","status_url":"https://sandbox.securepay.my/api/v1/status/KWATI1601198371?uid=201b7fa16595498091cb","retry_url":null,"receipt_url":"https://sandbox.securepay.my/api/v1/receipt/KWATI1601198371.pdf?uid=201b7fa16595498091cb","created_at":"2020-09-27T17:19:43.593+08:00","created_at_unixtime":"1601198383"}]a
Copied!

Response values

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
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
Last modified 1yr ago