📅Report
Use A-pay Reports API to create transaction reports in CSV format for payment checks and daily operations.
The report is created asynchronously: first you create a task, then check its status, and finally download the file when it is ready.
How it works
The process has 3 simple steps:
Create a report task
Check the task status
Download the CSV file
This approach is useful for large amounts of data and helps avoid timeouts.
Authentication
Reports API uses Bearer Token authentication.
First, sign in and get an access token. Then send this token in the Authorization header for all report requests.
Example:
Authorization: Bearer {token}Step 1. Create a report task
Use POST /reports/create to create a new report task.
Request rules
You must send at least one date filter:
create_atoractivated_atYou can send both filters together
Maximum period is 31 days
Report format must be
csv
Example request
Main parameters
filters— filters for report datacreate_at— transaction creation dateactivated_at— transaction activation datestatuses— transaction statusestype— operation type:inoroutformat— file format, must becsvcolumns— list of fields included in the report
Example response
Step 2. Check report status
Use GET /reports/status/{task_id} to check if the report is ready.
Possible statuses
pending— task is in queueprocessing— report is being createdcompleted— report is readyfailed— report creation failedexpired— task is no longer availablecancelled— task was cancelled
Recommended check interval
Check every 5 seconds
Maximum recommended wait time: 200 seconds
Example response while processing
Example response when completed
Step 3. Download the report
When the task status is completed, use GET /reports/download/{file_id} to download the file.
Request headers
Example response
CSV format
The report file has the following format:
Encoding:
UTF-8Delimiter:
;First row: column names
Decimal separator:
.Date format:
ISO 8601Column order matches the order sent in the
columnsparameter
Required fields for payment checks
The minimum recommended fields are:
custom_transaction_idamountamount_after_commision
Example:
These fields help you match transactions and calculate the fee:
fee = amount - amount_after_commision
Available columns
You can request all available columns or only the columns you need.
Commonly used columns:
custom_transaction_idamountamount_after_commisionstatuscreated_atupdated_atactivated_atcustom_user_idorder_idtransaction_id
Error responses
Possible error codes:
400— invalid request parameters401— unauthorized404— file not found410— file expired422— date range is too large
Summary
A-pay Reports API lets you:
create report tasks
check task status
download CSV reports
choose only the fields you need for payment checks and reporting
Last updated