Get Transactions
curl --request GET \
--url https://dashu.sa/api/external/getTransactionsimport requests
url = "https://dashu.sa/api/external/getTransactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://dashu.sa/api/external/getTransactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dashu.sa/api/external/getTransactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dashu.sa/api/external/getTransactions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dashu.sa/api/external/getTransactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashu.sa/api/external/getTransactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"items": [
{
"id": 1,
"payment_method": "ap-mada",
"amount": "313.00",
"service_charge": "1.00",
"time": "2021-01-21 13:12:59"
}
],
"page_num": 1,
"total_pages": 1,
"total_rows": 1
}
}
{
"success": false,
"code": "1",
"message": "Missing or invalid api key"
}
General Endpoints
Get Transactions
Using this endpoint you’ll have the ability to get a list of transactions with some filtering & sorting capabilities.
GET
/
getTransactions
Get Transactions
curl --request GET \
--url https://dashu.sa/api/external/getTransactionsimport requests
url = "https://dashu.sa/api/external/getTransactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://dashu.sa/api/external/getTransactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://dashu.sa/api/external/getTransactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dashu.sa/api/external/getTransactions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dashu.sa/api/external/getTransactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashu.sa/api/external/getTransactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"items": [
{
"id": 1,
"payment_method": "ap-mada",
"amount": "313.00",
"service_charge": "1.00",
"time": "2021-01-21 13:12:59"
}
],
"page_num": 1,
"total_pages": 1,
"total_rows": 1
}
}
{
"success": false,
"code": "1",
"message": "Missing or invalid api key"
}
Query Parameters
string
required
The API Key of your account.
string
required
The starting date of the result.Sample:
2021-05-27 15:31:39string
required
The ending date of the result.Sample:
2021-06-28 23:59:59integer
required
The current page number (used for pagination in your system)
integer
required
Specifies the total items that should be return for each request (each page).
It should be a number between 1 and 50.
{
"success": true,
"result": {
"items": [
{
"id": 1,
"payment_method": "ap-mada",
"amount": "313.00",
"service_charge": "1.00",
"time": "2021-01-21 13:12:59"
}
],
"page_num": 1,
"total_pages": 1,
"total_rows": 1
}
}
{
"success": false,
"code": "1",
"message": "Missing or invalid api key"
}
Response properties
boolean
required
A boolean value indicates the response status.
object
required
Hide properties
Hide properties
object
required
Hide properties
Hide properties
integer
required
A unique integer value indicating the deposit request in DashPay system.
string
required
The payment method used by the customer to complete the payment process.This can be one of the following values:
madavisamasteramexap-mada(ApplePay Mada)ap-visa(ApplePay Visa)ap-master(ApplePay Mastercard)ap-amex(ApplePay AmericanExpress)
string
required
The total amount of the transaction.
string
required
The fee amount of the transaction (DashPay fees).
string
required
Date of creating the transaction.
integer
required
The current page number.
integer
required
Total pages available (according to the date range specified and the total items per page).
integer
required
Total rows of the current page (total transactions returned in this request).
Error Codes
Here’s a list of possible error codes of this endpoint.| Code | Description |
|---|---|
| 1 | Missing or invalid api key |
| 3 | You cannot pass a number greater than 50 for the parameter itemsPerPage |
| 4 | Invalid `startDate“. |
| 5 | invalid `endDate“. |
⌘I