POST https://sandbox.payme.io/api/get-transaction-statisticsPOST https://live.payme.io/api/get-transaction-statisticsNo credentials are documented for this endpoint.
This endpoint enable to get transaction average, based on the chosen period (time_resolution), transaction's status (pending/validated) and currency.
This endpoint takes no path, query or header parameters.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
payme_client_key |
string | no | PayMe Partner Key. |
time_resolution |
string | no | The selected period. |
start_date |
string | no | The start date of the selected period. |
end_date |
string | no | The start date of the selected period. |
transaction_status |
array | no | Filter the status of the transactions that will take into account in the calculation. For all the transaction statuses click here. Example: pending |
sale_currency |
array | no | Sale currency. 3-letter ISO 4217 name. Example: ILS |
{
"payme_client_key": "XXXXXXXX",
"time_resolution": "day",
"start_date": "YYYY-MM-DD HH:MM:SS",
"end_date": "YYYY-MM-DD HH:MM:SS",
"transaction_status": [
"pending",
"validated"
],
"sale_currency": [
"ILS",
"USD"
]
}
curl -X POST 'https://sandbox.payme.io/api/get-transaction-statistics' \
-H 'Content-Type: application/json' \
--data-raw '{
"payme_client_key": "XXXXXXXX",
"time_resolution": "day",
"start_date": "YYYY-MM-DD HH:MM:SS",
"end_date": "YYYY-MM-DD HH:MM:SS",
"transaction_status": [
"pending",
"validated"
],
"sale_currency": [
"ILS",
"USD"
]
}'
const response = await fetch("https://sandbox.payme.io/api/get-transaction-statistics", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"payme_client_key": "XXXXXXXX",
"time_resolution": "day",
"start_date": "YYYY-MM-DD HH:MM:SS",
"end_date": "YYYY-MM-DD HH:MM:SS",
"transaction_status": [
"pending",
"validated"
],
"sale_currency": [
"ILS",
"USD"
]
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/get-transaction-statistics",
json={
"payme_client_key": "XXXXXXXX",
"time_resolution": "day",
"start_date": "YYYY-MM-DD HH:MM:SS",
"end_date": "YYYY-MM-DD HH:MM:SS",
"transaction_status": [
"pending",
"validated",
],
"sale_currency": [
"ILS",
"USD",
],
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"payme_client_key": "XXXXXXXX",
"time_resolution": "day",
"start_date": "YYYY-MM-DD HH:MM:SS",
"end_date": "YYYY-MM-DD HH:MM:SS",
"transaction_status": [
"pending",
"validated"
],
"sale_currency": [
"ILS",
"USD"
]
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/get-transaction-statistics');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| Field | Type | Description |
|---|---|---|
status_code |
integer | Status of the request (0 - success, 1 - error) |
start_date |
string | The start date of the selected period. |
end_date |
string | The end date of the selected period. |
time_resolution |
string | The selected period. |
statistics |
object | |
statistics.pending |
object | Transaction statistics in the chosen status |
statistics.pending.ILS |
array | Transaction statistics in the chosen currency |
statistics.pending.ILS[].sum |
integer | |
statistics.pending.ILS[].count |
integer | |
statistics.pending.ILS[].average |
integer |
{
"status_code": 0,
"start_date": "YYYY-MM-DD HH:MM:SS",
"end_date": "YYYY-MM-DD HH:MM:SS",
"time_resolution": "day",
"statistics": {
"pending": {
"ILS": [
{
"sum": 0,
"count": 0,
"average": 0
},
{
"sum": 0,
"count": 0,
"average": 0
}
]
}
}
}