Reporting requests
Reporting requests
The WEBPAY system provides the ability to obtain reports via API from the personal cabinet of the production environment at https://merchant.webpay.by using two methods:
Request field description
| Parameter | Description |
|---|---|
url_payment_module | Address for obtaining the report — https://merchant.webpay.by |
reportType | Type of report to obtain:
|
email | Email for sending the report (the report arrives with a delay of up to 10 minutes) |
reportFormat | Report format:
|
startDate, endDate | Date range for all types of operations. Format: YYYY-MM-DD |
startFinancialCompletionDate, endFinancialCompletionDate | Date range for financial completion operations (must be within startDate,endDate). Otherwise, the report will be generated within the date range specified in the startDate and endDate fields. Format: YYYY-MM-DD |
startReversalDate, endReversalDate | Date range for cancellation/refund operations (must be within startDate, endDate). Otherwise, the report will be generated within the date range specified in the startDate and endDate fields. Format: YYYY-MM-DD |
login | Personal cabinet login |
password | Personal cabinet password in MD5-hash format |
GET method
The URL is formed according to the following scheme:
{url_payment_module}/reports/merchants/{reportType}?email={email}&reportFormat={reportFormat}&startDate={startDate}&endDate={endDate}&startFinancialCompletionDate={startFinancialCompletionDate}&endFinancialCompletionDate={endFinancialCompletionDate}&startReversalDate={startReversalDate}&endReversalDate={endReversalDate}
Authorization header: Authorization: login:password
Example request
https://merchant.webpay.by/reports/merchants/RECONCILIATION_REPORT?email=test@webpay.by&reportFormat=JSON&startDate=2019-12-20&endDate=2019-12-30&startFinancialCompletionDate=2019-12-20&endFinancialCompletionDate=2019-12-30&startReversalDate=2019-10-01&endReversalDate=2019-12-30
POST method
The request is made to the following URL:
{url_payment_module}/reports/get
Info
LIMITATION: The date range should not exceed 3 months or the file should not contain more than 100 000 records.
Example request body
{
"login": "test",
"password": "3434c7ab03ecfbde62ae697a7c66ae8e",
"startDate": "2019-12-20",
"endDate": "2019-12-30",
"reportType": "RECONCILIATION_REPORT",
"reportFormat" : "JSON",
"startFinancialCompletionDate" : "2019-12-20",
"endFinancialCompletionDate" : "2019-12-30",
"startReversalDate" : "2019-12-20",
"endReversalDate" : "2019-12-30"
}