Payment Inquiry
curl --request POST \
--url https://dashu.sa/api/external/paymentInquiry \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"data": {},
"test": true
}
'import requests
url = "https://dashu.sa/api/external/paymentInquiry"
payload = {
"apiKey": "<string>",
"data": {},
"test": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', data: {}, test: true})
};
fetch('https://dashu.sa/api/external/paymentInquiry', 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/paymentInquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'data' => [
],
'test' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dashu.sa/api/external/paymentInquiry"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"data\": {},\n \"test\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dashu.sa/api/external/paymentInquiry")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"data\": {},\n \"test\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashu.sa/api/external/paymentInquiry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"data\": {},\n \"test\": true\n}"
response = http.request(request)
puts response.read_body{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"InvoiceId": 2817877,
"InvoiceStatus": "Paid",
"InvoiceReference": "2023016636",
"CustomerReference": null,
"CreatedDate": "2023-10-04T14:40:56.723",
"ExpiryDate": "February 1, 2024",
"ExpiryTime": "14:40:56.723",
"InvoiceValue": 200,
"Comments": null,
"CustomerName": "Anonymous",
"CustomerMobile": "+965",
"CustomerEmail": null,
"UserDefinedField": null,
"InvoiceDisplayValue": "200.000 KD",
"DueDeposit": 104.894,
"DepositStatus": "Not Deposited",
"InvoiceItems": []
}
}
{
"success": false,
"code": 2,
"message": "`Key` is a required parameter."
}
General Endpoints
Payment Inquiry
Using this endpoint you’ll have the ability to get the complete information about a specific invoice or payment using it’s identifier (e.g: InvoiceId)
POST
/
paymentInquiry
Payment Inquiry
curl --request POST \
--url https://dashu.sa/api/external/paymentInquiry \
--header 'Content-Type: application/json' \
--data '
{
"apiKey": "<string>",
"data": {},
"test": true
}
'import requests
url = "https://dashu.sa/api/external/paymentInquiry"
payload = {
"apiKey": "<string>",
"data": {},
"test": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({apiKey: '<string>', data: {}, test: true})
};
fetch('https://dashu.sa/api/external/paymentInquiry', 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/paymentInquiry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'apiKey' => '<string>',
'data' => [
],
'test' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://dashu.sa/api/external/paymentInquiry"
payload := strings.NewReader("{\n \"apiKey\": \"<string>\",\n \"data\": {},\n \"test\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://dashu.sa/api/external/paymentInquiry")
.header("Content-Type", "application/json")
.body("{\n \"apiKey\": \"<string>\",\n \"data\": {},\n \"test\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dashu.sa/api/external/paymentInquiry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"apiKey\": \"<string>\",\n \"data\": {},\n \"test\": true\n}"
response = http.request(request)
puts response.read_body{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"InvoiceId": 2817877,
"InvoiceStatus": "Paid",
"InvoiceReference": "2023016636",
"CustomerReference": null,
"CreatedDate": "2023-10-04T14:40:56.723",
"ExpiryDate": "February 1, 2024",
"ExpiryTime": "14:40:56.723",
"InvoiceValue": 200,
"Comments": null,
"CustomerName": "Anonymous",
"CustomerMobile": "+965",
"CustomerEmail": null,
"UserDefinedField": null,
"InvoiceDisplayValue": "200.000 KD",
"DueDeposit": 104.894,
"DepositStatus": "Not Deposited",
"InvoiceItems": []
}
}
{
"success": false,
"code": 2,
"message": "`Key` is a required parameter."
}
Query Parameters
string
required
The API Key of your account.
object
required
boolean
Set this property to
true to send the request to the development
environment.{
"IsSuccess": true,
"Message": "",
"ValidationErrors": null,
"Data": {
"InvoiceId": 2817877,
"InvoiceStatus": "Paid",
"InvoiceReference": "2023016636",
"CustomerReference": null,
"CreatedDate": "2023-10-04T14:40:56.723",
"ExpiryDate": "February 1, 2024",
"ExpiryTime": "14:40:56.723",
"InvoiceValue": 200,
"Comments": null,
"CustomerName": "Anonymous",
"CustomerMobile": "+965",
"CustomerEmail": null,
"UserDefinedField": null,
"InvoiceDisplayValue": "200.000 KD",
"DueDeposit": 104.894,
"DepositStatus": "Not Deposited",
"InvoiceItems": []
}
}
{
"success": false,
"code": 2,
"message": "`Key` is a required parameter."
}
Response properties
boolean
required
The response status.
string
required
The description of the response status.
array|null
required
List of validation errors (if any).
object
required
Hide properties
Hide properties
integer
required
A unique integer value of the invoice.
string
required
A string value indicates the invoice status.Expected values:
Pending, Paid, or Canceled.string
required
Invoice reference that is generated by DashPay system.
string
required
The customer reference data associated with the invoice.
string
required
The creation date of the invoice.
string
required
The expiry date for the invoice.
string
required
Invoice total value with the actual base account currency.
string
required
Comments that are associated with the invoice.
string
required
The customer name that was save along with the invoice.
string
required
Customer mobile number.
string
required
Customer email address.
string
required
The user defined filed that was stored during the invoice creation.
string
required
Invoice value that is displayed in case of different currency from the base one.
number
required
The amount that will be deposited to the vendor account.
string
required
The deposit status of the invoice, if it is
Deposited or Not Deposited.array
required
Invoice items as stored in the invoice creation.
Error Codes
Here’s a list of possible error codes of this endpoint.| Code | Description |
|---|---|
| 1 | Missing or invalid api key |
| 2 | Key is a required parameter. |
| 3 | KeyType is a required parameter. |
| 4 | Key is invalid. |
| 5 | Unknown error. |
| 6 | General error occurred, please try again. |
⌘I