API Documentation
API #1: Create Merchant
Endpoint
POST localhost:8082/public/v2/merchants/
// Change the localhost to your server
Headers
Header Name | Value |
---|---|
apiKey |
aW5mb0BlZGZhcGF5LnNhOjEyMzQ1Njc4 |
Content-Type |
application/json |
Cookie |
JSESSIONID=DC95FD72A71E5EB2E95FF221F87361F5 |
Request Body
{
"merchantName": "Afnan A",
"email": "okafnan1@gmail.com",
"phoneNumber": "+923122405392",
"sendEmail": true
}
Response
{
"responseCode": "200",
"responseDescription": "Public Merchant Created Successfully...",
"merchantId": "0e0b76a9-7582-4baf-90d9-7cc7c33e114e"
}
API #2: Add Terminal
Endpoint
POST localhost:8082/public/v2/addTerminal/
// Change the localhost to your server
Headers
Header Name | Value |
---|---|
apiKey |
aW5mb0BlZGZhcGF5LnNhOjEyMzQ1Njc4 |
Content-Type |
application/json |
Cookie |
JSESSIONID=DC95FD72A71E5EB2E95FF221F87361F5 |
Request Body
{
"merchantId": "45af8f60-4ac8-43a8-b7e6-1408f864807b", //use merchantId which created from Merchant API
"merchantEmail": "okafnan@gmail.com",
"onBoardingStatus": false,
"tsn": "1010101",
"terminalId": "1010101",
"hardwareSerialNumber": "1010101"
}
Response
{
"responseCode": "200",
"responseDescription": "Add New Terminal Successfully"
}
API #3: Create User
Endpoint
POST localhost:8082/public/v2/users/
// Change the localhost to your server
Headers
Header Name | Value |
---|---|
apiKey |
aW5mb0BlZGZhcGF5LnNhOjEyMzQ1Njc4 |
Content-Type |
application/json |
Cookie |
JSESSIONID=DC95FD72A71E5EB2E95FF221F87361F5 |
Request Body
{
"merchantId": "45af8f60-4ac8-43a8-b7e6-1408f864807b", //use merchantId which created from Merchant API
"firstName": "Afnan Test",
"lastName": "Test21122121",
"username": "966565656500",
"email": "afnan51020@gmail.com",
"phoneNumber": "+966565656500a",
"outletId": "120853a5-07c4-4e8c-a6df-773f5e20eeaf"
}
Response
{
"responseCode": "200",
"responseDescription": "Public User Created Successfully...",
"userId": "60298cba-d6e4-43df-8040-d95ece4f194a"
}
API #4: FilterTransactions
Overview
This API allows you to filter and retrieve transaction details based on specified criteria. It supports pagination, sorting, and filtering by various transaction attributes such as amount, date range, status, and more.
Endpoint
Authentication
This API requires the following headers for authentication:
- Authorization: Base64-encoded credentials
(e.g.,
dGVzdDEyM0BnbWFpbC5jb206RWRmYXBheUAxMjM=
). - apiKey: API key for authentication (e.g.,
YXlvdW5lc0BlZGZhcGF5LmNvbToxMjM0QXJhZkA=
).
Query Parameters
The following query parameters are supported for filtering and pagination:
Parameter | Type | Description |
---|---|---|
PageSize |
Integer | Number of transactions to return per page (e.g.,
10 ).
|
amountFrom |
Decimal | Minimum transaction amount to filter (optional). |
amountTo |
Decimal | Maximum transaction amount to filter (optional). |
rrn |
String | Retrieval Reference Number (RRN) to filter transactions
(e.g., 000244399083 ). |
cardType |
String | Type of card used for the transaction (optional). |
status |
String | Transaction status to filter (optional). |
operationType |
String | Type of operation (e.g., purchase, refund) to filter (optional). |
reconciliationStatus |
String | Reconciliation status to filter (optional). |
startDate |
Date | Start date for filtering transactions (format:
YYYY-MM-DD , e.g., 2024-01-01 ).
|
endDate |
Date | End date for filtering transactions (format:
YYYY-MM-DD , e.g., 2025-06-12 ).
|
transactionType |
String | Type of transaction to filter (optional). |
merchantId |
UUID | Unique identifier of the merchant (e.g.,
9790555d-fa64-4f62-bfe7-2667e094ef4c ).
|
pageNumber |
Integer | Page number for pagination (e.g., 1 ). |
sortDirection |
String | Sorting direction (ASC for ascending,
DESC for descending).
|
SortBy |
String | Field to sort by (e.g., trxTimestamp ). |
Example Request
```bash curl --location --request GET 'https://apidev.edfapay.com/transactions/filterTransaction/v1/partner/transactions?PageSize=10&amountFrom=&rrn=000244399083&amountTo=&cardType=&status=&operationType=&reconciliationStatus=&startDate=2024-01-01&endDate=2025-06-12&transactionType=&merchantId=9790555d-fa64-4f62-bfe7-2667e094ef4c&pageNumber=1&sortDirection=DESC&SortBy=trxTimestamp' \ --header 'Authorization: dGVzdDEyM0BnbWFpbC5jb206RWRmYXBheUAxMjM=' \ --header 'apiKey: YXlvdW5lc0BlZGZhcGF5LmNvbToxMjM0QXJhZkA='