Count the number of processed transactions
Warning
DWH v.1 is no longer supported and will soon be deactivated. Please use DWH v.2 instead.
Use these requests to get the number of processed transactions:
- GET request;
- POST request: use this request if the number of symbols of the request URL exceeds the maximum allowed value;
- POST request (deprecated): the data can be sorted by the date, transaction status and payment method type.
GET request
Request
The requests must:
- use HTTP Basic authentication with your PSP ID and secret key as a username and a password respectively;
- have the
Content-Typeheader set toapplication/json; - have the
Acceptheader set toapplication/json; - be UTF-8 encoded.
Send a GET request to {YOUR DWH URL}/api/v1/transactions with the following parameters:
| Parameter | Type | Description |
|---|---|---|
| response_type * required | string | A response data type. To get the number of processed transactions, set to count. |
| date_from * required | string | A start date of the reporting period in the YYYY-MM-DD hh:mm:ss format, for example 2024-01-01 12:00:00.The date must occur within 90 days before the value of the date_to parameter. |
| date_to * required | string | An end date of the reporting period in the YYYY-MM-DD hh:mm:ss format, for example 2024-01-01 12:00:00.The date must occur within 90 days after the value of the date_from parameter. |
| date_type | string | A date type. Possible values: created_at is a date when a transaction is created (set by default);paid_at is a date when a transaction is paid;settled_at is a date when a transaction is cleared;updated_at is a date when a transaction is updated;manually_corrected_at is a date when transaction details are manually corrected. |
| time_zone | string | A name of the timezone used to parse dates in the request and the response as defined here, for example Europe/London.Default value is Etc/UTC. |
| merchant_id | string | A string of comma-separated merchant account identifiers to count the number of processed transactions. Don't send along with shop_id. |
| shop_id | string | A string of comma-separated shop account identifiers to count the number of processed transactions. Don't send along with merchant_id. |
| gateway_id | string | A string of comma-separated payment gateway identifiers to count the number of processed transactions. |
| transaction_type | string | A string of comma-separated transaction types to count the number of processed transactions. Possible values: authorization,payment,tokenization,payout,capture,void,refund,credit,chargeback. |
| payment_method_type | string | A string of comma-separated payment method types to count the number of processed transactions. Possible values: credit_card stands for card payment methods;alternative stands for non-card-based payment methods. |
| status | string | A string of comma-separated transaction statuses to count the number of processed transactions. Possible values: successful,failed,incomplete,error,pending. |
| currency | string | A string of comma-separated transaction currencies to count the number of processed transactions in the ISO-4217 format, for example USD. |
| brand | string | A string of comma-separated payment brands to count the number of processed transactions, for example visa. |
| agent_id | string | A string of comma-separated agent account identifiers to count the number of processed transactions. |
| token_provider | string | A string of comma-separated token providers to count the number of processed transactions, for example apple_pay. |
| merchant_country | string | A string of comma-separated merchant countries to count the number of processed transactions in the ISO 3166-1 alpha-2 format. |
| gateway_type | string | A string of comma-separated comma-separated names of payment gateway providers and acquirers to count the number of processed transactions, for example Bogus. |
Request example
curl -v "{YOUR DWH URL}/api/v1/transactions?response_type=count&date_type=created_at&date_from=2024-06-06 10:30:25&date_to=2024-07-06 00:00:00&gateway_type=Bogus,InvestBank" \
-H "Authorization: Basic MTpwc3BfMV9rZXk=" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Response
The response contains the following parameters:
| Parameter | Type | Description |
|---|---|---|
| data | object | A section of transaction details. |
| count | integer | A number of transactions matching the request parameters. |
Response
{
"data": {
"count": 18298
}
}
POST request
Request
The requests must:
- use HTTP Basic authentication with your PSP ID and secret key as a username and a password respectively;
- have the
Content-Typeheader set toapplication/json; - have the
Acceptheader set toapplication/json; - be UTF-8 encoded.
Send a POST request to {YOUR DWH URL}/api/v1/transactions with the following parameters:
| Parameter | Type | Description |
|---|---|---|
| response_type* required | string | A response data type. To get the number of transactions, set to count. |
| date_from * required | string | A start date of the reporting period in the YYYY-MM-DD hh:mm:ss format, for example 2024-01-01 12:00:00.The date must occur within 90 days before the value of the date_to parameter. |
| date_to * required | string | An end date of the reporting period in the YYYY-MM-DD hh:mm:ss format, for example 2024-01-01 12:00:00.The date must occur within 90 days after the value of the date_from parameter. |
| date_type | string | A date type. Possible values: created_at is a date when a transaction is created (set by default);paid_at is a date when a transaction is paid;settled_at is a date when a transaction is cleared;updated_at is a date when a transaction is updated;manually_corrected_at is a date when transaction details are manually corrected. |
| time_zone | string | A name of the timezone used to parse dates in the request and the response as defined here, for example Europe/London.Default value is Etc/UTC. |
| merchant_id | string | A string of comma-separated merchant account identifiers to count the number of processed transactions. Don't send along with shop_id. |
| shop_id | string | A string of comma-separated shop account identifiers to count the number of processed transactions. Don't send along with merchant_id. |
| gateway_id | string | A string of comma-separated payment gateway identifiers to count the number of processed transactions. |
| transaction_type | string | A string of comma-separated transaction types to count the number of processed transactions. Possible values: authorization,payment,tokenization,payout,capture,void,refund,credit,chargeback. |
| payment_method_type | string | A string of comma-separated payment method types to count the number of processed transactions. Possible values: credit_card stands for card payment methods;alternative stands for non-card-based payment methods. |
| status | string | A string of comma-separated transaction statuses to count the number of processed transactions. Possible values: successful,failed,incomplete,error,pending. |
| currency | string | A string of comma-separated transaction currencies to count the number of processed transactions in the ISO-4217 format, for example USD. |
| brand | string | A string of comma-separated payment brands to count the number of processed transactions, for example visa. |
| agent_id | string | A string of comma-separated agent account identifiers to count the number of processed transactions. |
| token_provider | string | A string of comma-separated token providers to count the number of processed transactions, for example apple_pay. |
| merchant_country | string | A string of comma-separated merchant countries to count the number of processed transactions in the ISO 3166-1 alpha-2 format. |
| gateway_type | string | A string of comma-separated payment gateway providers and acquirers to count the number of processed transactions, for example Bogus. |
Request example
{
"response_type":"count",
"date_type":"created_at",
"date_from":"2022-06-06 10:30:25",
"date_to":"2022-08-10 21:00:00",
"gateway_type":"Bogus",
"status":"successful,failed",
"currency":"EUR,USD"
}
Response
The response contains the following parameters:
| Parameter | Type | Description |
|---|---|---|
| data | object | A section of transaction details. |
| count | integer | A number of transactions that meet the request parameters. |
Response example
{
"data": {
"count": 1251
}
}
POST request (deprecated)
Request
The requests must:
- use HTTP Basic authentication with
xas a username and your PSP secret key as a password; - have a body with parameters in the JSON or XML formats, or as an HTML form data;
- have the
Content-Typeheader set toapplication/jsonorapplication/xmldepending on the request body format; - have the
Acceptheader set toapplication/jsonorapplication/xmldepending on the preferred response format; - be UTF-8 encoded.
Send a POST request to {YOUR_BACKOFFICE_URL}/api/psp/reports/count with the following parameters:
| Parameter | Type | Description |
|---|---|---|
| report_params | object | A section of transaction report parameters. |
| date_type | required string |
A date type. Possible values: created_at is a date when a transaction is created (set by default);paid_at is a date when a transaction is paid;settled_at is a date when a transaction is cleared;updated_at is a date when a transaction is updated;manually_corrected_at is a date when transaction details are manually corrected at. |
| from | required string |
A start date of the reporting period in the YYYY-MM-DD hh:mm:ss format, for example 2024-01-01 12:00:00. |
| to | required string |
An end date of the reporting period in the YYYY-MM-DD hh:mm:ss format, for example 2024-01-01 12:00:00. |
| status | required string |
A transaction status to count the number of processed transactions. Possible values: all,successful,failed,pending,incomplete. |
| payment_method_type | required string |
Payment method types to count the number of processed transactions. Possible values: credit_card stands for card payment methods;alternative stands for non-card-based payment methods. |
| time_zone | required string |
A timezone name as defined here, for example Europe/London. |
Request example
{
"report_params": {
"date_type": "created_at",
"from": "2022-01-25 00:00:00",
"to": "2022-01-27 23:59:59",
"status": "successful",
"payment_method_type": "credit_card",
"time_zone": "Etc/UTC"
}
}
Response
The response contains the following parameters:
| Parameter | Type | Description |
|---|---|---|
| transactions | object | A section of transaction report parameters. |
| count | integer | A number of transactions that meet the request parameters. |
Response example
{
"transactions": {
"count": 17
}
}