Get Transaction Data
The Get Transaction Data is an endpoint using to get all transaction data
Request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://staging.fawaterk.com/api/v2/getInvoiceData/1001267',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer 0b3fefb44fd628870b751793224d6334fea5d38300641e36aa'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var client = new RestClient("https://staging.fawaterk.com/api/v2/getInvoiceData/1001267");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer 0b3fefb44fd628870b751793224d6334fea5d38300641e36aa");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var client = new RestClient("https://staging.fawaterk.com/api/v2/getInvoiceData/1001267");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer 0b3fefb44fd628870b751793224d6334fea5d38300641e36aa");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
import requests
import json
url = "https://staging.fawaterk.com/api/v2/getInvoiceData/1001267"
payload={}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer 0b3fefb44fd628870b751793224d6334fea5d38300641e36aa'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
success response
{
"status": "success",
"data": {
"invoice_id": 1001267,
"invoice_key": "l1aQQG0AzvtnDZH",
"due_date": "2021-10-31T00:00:00.000000Z",
"pay_load": null,
"frequency": "once",
"custom_due_date": "default",
"customer_email": "[email protected]",
"payment_method": "Credit-Debit Card",
"commission": 5.22262,
"currency": "EGP",
"total": 57.5,
"paid": 1,
"paid_at": "2021-11-10T12:33:44.000000Z",
"invoice_created_at": "2021-10-31T11:42:32.000000Z"
}
}