πŸ“…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:

  1. Create a report task

  2. Check the task status

  3. 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_at or activated_at

  • You can send both filters together

  • Maximum period is 31 days

  • Report format must be csv

Example request

Main parameters

  • filters β€” filters for report data

  • create_at β€” transaction creation date

  • activated_at β€” transaction activation date

  • statuses β€” transaction statuses

  • type β€” operation type: in or out

  • format β€” file format, must be csv

  • columns β€” 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 queue

  • processing β€” report is being created

  • completed β€” report is ready

  • failed β€” report creation failed

  • expired β€” task is no longer available

  • cancelled β€” task was cancelled

  • 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-8

  • Delimiter: ;

  • First row: column names

  • Decimal separator: .

  • Date format: ISO 8601

  • Column order matches the order sent in the columns parameter

Required fields for payment checks

The minimum recommended fields are:

  • custom_transaction_id

  • amount

  • amount_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_id

  • amount

  • amount_after_commision

  • status

  • created_at

  • updated_at

  • activated_at

  • custom_user_id

  • order_id

  • transaction_id

Error responses

Possible error codes:

  • 400 β€” invalid request parameters

  • 401 β€” unauthorized

  • 404 β€” file not found

  • 410 β€” file expired

  • 422 β€” 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