Получить агрегированный отчёт по обработанным транзакциям
Получить агрегированный отчёт по обработанным транзакциям
Этот метод используется для получения агрегированных отчетов по транзакциям с разбивкой по валютам / типам транзакции / статусам и другим параметрам, указанным в запросе на создание отчета.
Запрос
Запрос должен:
- иметь авторизацию типа Basic c PSP ID и секретным ключом PSP как имя пользователя и пароль соответственно;
- иметь заголовок
Content-Type, установленный какapplication/json; - иметь заголовок
Accept, установленный какapplication/json; - использовать кодировку UTF-8.
Отправьте POST запрос на {YOUR DWH URL}/api/v2/reports/aggregation со следующими параметрами:
|
||||||||||||||||||||||||||||||||||
{
"date_from": "2025-04-21T00:00:00",
"date_to": "2025-05-01T00:00:00",
"date_type": "paid_at",
"group_by": "monthly",
"transaction_parameters": {
"currency": [
"EUR",
"USD"
],
"type": [
"payment",
"capture"
],
"status": [
"successful",
"failed"
],
"merchant_id": "all"
}
}
Ответ
|
||||||||||||||||||||||||||||||||||||||
{
"data": {
"grouped_data": [
{
"count": 26,
"currency": "BRL",
"status": "successful",
"type": "payment",
"volume": 16800.0
},
{
"count": 8,
"currency": "BYN",
"status": "successful",
"type": "payment",
"volume": 2.5
},
{
"count": 68,
"currency": "EUR",
"status": "successful",
"type": "payment",
"volume": 2888.24
},
{
"count": 46,
"currency": "GBP",
"status": "successful",
"type": "payment",
"volume": 2005.99
},
{
"count": 1,
"currency": "ILS",
"status": "successful",
"type": "payment",
"volume": 100.1
},
{
"count": 77,
"currency": "USD",
"status": "successful",
"type": "payment",
"volume": 2993.92
}
],
"total_count": 226
}
}
{
"data": {
"grouped_data": [
{
"agent_id": 0,
"count": 9,
"country": "GB",
"currency": "EUR",
"gateway_type": "DemoAcquirer",
"merchant_id": 1199,
"method_brand": "credit_card",
"recurring_type": "",
"shop_id": 1542,
"status": "successful",
"type": "payment",
"volume": 468.67
},
{
"agent_id": 0,
"count": 4,
"country": "GB",
"currency": "GBP",
"gateway_type": "DemoAcquirer",
"merchant_id": 1199,
"method_brand": "credit_card",
"recurring_type": "",
"shop_id": 1542,
"status": "successful",
"type": "payment",
"volume": 276.5
},
{
"agent_id": 0,
"count": 6,
"country": "GB",
"currency": "USD",
"gateway_type": "DemoAcquirer",
"merchant_id": 1199,
"method_brand": "credit_card",
"recurring_type": "",
"shop_id": 1542,
"status": "successful",
"type": "payment",
"volume": 148.91
},
{
"agent_id": 0,
"count": 8,
"country": "GB",
"currency": "EUR",
"gateway_type": "DemoAcquirer",
"merchant_id": 1283,
"method_brand": "credit_card",
"recurring_type": "",
"shop_id": 1932,
"status": "successful",
"type": "payment",
"volume": 342.48
},
{
"agent_id": 0,
"count": 7,
"country": "GB",
"currency": "GBP",
"gateway_type": "DemoAcquirer",
"merchant_id": 1283,
"method_brand": "credit_card",
"recurring_type": "",
"shop_id": 1932,
"status": "successful",
"type": "payment",
"volume": 256.97
},
{
"agent_id": 0,
"count": 9,
"country": "GB",
"currency": "USD",
"gateway_type": "DemoAcquirer",
"merchant_id": 1283,
"method_brand": "credit_card",
"recurring_type": "",
"shop_id": 1932,
"status": "successful",
"type": "payment",
"volume": 359.03
}
],
"total_count": 43
}
}