Statement-Download-v2
Barion API: Download statement file
GET | /v2/Statement/Download |
---|
The /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.
Authentication
Input properties
Property name | Property type | Limitations and constraints | Description |
---|---|---|---|
Year | int |
|
The statement year. |
Month | int |
|
The statement month. |
Day | int |
|
The statement day. If specified, the system will serve a daily statement file. |
Currency | string |
Accepted values:
|
The currency of the statement's account. Accounts with separate currencies have separate statement files. If the user does not have an account in the specified currency, the API returns an error message with an HTTP 400 Bad request status code. |
Output
Depending on the parameters supplied to the call, the endpoint responds with one of the following outputs:
- an .xlsx-format daily statement with an XML digital signature to guarantee data integrity
- a PDF-format monthly statement if only the year and month parameters were supplied
- If the caller fails to authenticate, the API will produce an empty output with an
HTTP 401 Unauthorized
status 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 found
status 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 Forbidden
status code.
Transaction time | The locale-specific-formatted date and time of the transaction. |
Transaction type | The type of the transaction. |
Customer/beneficiary | The identifier of the payee, payer, or payment method, as appropriate to the transaction: name, username, email address, or the card scheme and last four digits of the debited or credited card. |
Transaction amount | The locale-specific-formatted amount of the transaction. Deposits are positive, and withdrawals are negative. |
Balance after transaction | The locale-specific-formatted balance of the Barion Wallet after the transaction. Note that payment reservations and delayed capture transactions may not immediately affect the Barion Wallet balance. |
Currency | The currency of the statement, as specified in the call to the endpoint. |
Payment ID generated by shop | The identifier of the payment, if applicable, generated by the webshop that requested the payment, if applicable. |
Transaction ID generated by shop | The identifier of the transaction generated by the webshop associated with it, if applicable. |
Unique payment ID generated by Barion | Barion's GUID for the payment. |
Unique transaction ID generated by Barion | Barion's GUID for the transaction. |
Order ID generated by shop | The identifier generated by the webshop associated with the transaction, if applicable, to identify the order that the transaction was part of, if applicable. |
Card number | Only applies to transactions credited to or debited from a bank card. Last four digits of the debited or credited bank card. |
Authorization code | Only applies to transactions credited to or debited from a bank card. The combination of letters and numbers that the card-issuing bank generates to indicate that the transfer of funds from the account associated with the card was successful. |
Comment associated with transaction | Comments associated with the transaction. |
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.
Examples
Downloading the daily statement of an EUR account for October 6th 2019:
https://api.barion.com/v2/statement/download?year=2019&month=10&day=6¤cy=EUR
Downloading the monthly statement of an HUF account for April 2019:
https://api.barion.com/v2/statement/download?year=2019&month=4¤cy=HUF