Barion API: Download statement file
/statement/download API endpoint is used to download monthly or daily statement files generated by the Barion system.
Prerequisites before use:
v2 This API endpoint is available in API v2 only.
Barion users are authenticated either with username/password provided in the querystring or with basic authentication. You can find more information about basic authentication here
|Property name||Property type||Limitations and constraints||Description|
||The login name of the Barion user. This is currently the user's e-mail address.|
||The password of the Barion user.|
||The statement year.|
||The statement month.|
||The statement day. If specified, the system will serve a daily statement file.|
|The currency of the statement's account. Accounts with separate currencies have separate statement files.|
Output and response
Depending on the given input parameters the endpoint will produce the following outputs:
- If the caller fails to authenticate with a valid username and password, the API will produce an empty output with an
HTTP 401 Unauthorizedstatus code.
- If only year and month were specified for the statement, the endpoint will try to serve the monthly statement for the corresponding year and month as a PDF (Printable Document Format) document.
- If year, month, and day were specified for the statement, the endpoint will try to serve the daily statement for the corresponding date as a signed XLSX (Microsoft Excel) document.
- If the requested statement file is not available, the API returns an error message with an
HTTP 404 Not foundstatus code. This can happen if the requested statement file has not been generated yet.
- If generation of the given statement type is disabled for the user, the API returns an error message with an
HTTP 403 Forbiddenstatus code.
- If the user does not have an account in the specified currency, the API returns an error message with an
HTTP 400 Bad requeststatus code.
Things to know
- To get daily statement files please contact Barion from the Customer Center in your Barion wallet.
- Daily statement files will not show up on the secure.barion.com site for download. They can only be downloaded via this API endpoint.
- Once the statement files have been generated, they are available to download for an indefinite time.
Downloading the daily statement of an EUR account for October 6th 2019:
Downloading the monthly statement of an HUF account for April 2019: