# Account Statements

Account Statements synthesize all operations affecting the Balance of a Wallet for a given month, along with the Balance at the start and end of that month. It also displays the sum of debits, and the sum of credits.

Account Statement Mockup
Toolbox icon

Feature activation – Accounts Statements are not yet enabled by default

You can request access to this feature by contacting your Treezor Account Manager.

Banks are legally obligated to provide Accounts Statements for a duration of 5 years, although the requirements differ depending on the nature of the end user.

Account statements must provide mandatory information about:

  • The account holder – Name, legal status, address, capital, VAT n° (TVA), Companies Register n° (RCS)
  • The mediator – Name, legal status, address, capital, VAT n° (TVA), Companies Register n° (RCS)
Note icon

Note – Account statements and parent-children relations

Parent Users can access Accounts Statement of their Children Users.

Treezor provides Account Statements in 2 formats:

  • As PDF – Customize statement templates and Treezor generates the statements in PDF.
  • As JSON – Retrieve the raw information in JSON and you generate the statements.
books icon

Reading – Your legal obligations explained

Learn more about the requirements regarding statement of account and statement of fees (opens new window).

# As PDF Incompatible with the crypto feature

Templated statements are Account Statements generated by Treezor in PDF file format. They can be provided as-is to your Users.

You may customize the HTML template of those Statements and request an Account Statement for any given month but the current one.

Account Statements for the previous month are generated between the 1st and 3rd of the current month.

# Request an Account Statement

To request an Account Statement you may use the following request.

# Mandatory parameters

Attribute Type Description
walletId string The unique identifier of the Wallet.
month integer The month of the statement (2 digits leading with 0)
year integer The year of the statement (4 digits, e.g., 2022)

Returns an object containing a download URL (link).

The provided download URL expires after 5 minutes.

# Customize the template

# Produce the template

The templating engine that should be used for the template is Twig with some limitations.

Providing a new template will not affect previously generated Accounts Statments.

You can check the list of all available variables.

Note icon

Notes

  • The operation.type variable is always provided in French.
  • The totalAmountFees must be present
  • The totalAmountCreditNote is optional

# Upload the template

Don't forget to encode your template in base64.

This should return an HTTP Status Code 201 without any content.

If something goes wrong, you can also get an error.

You may also customize the template using the Dashboard.

# Test the template

To test your template you may use the following request, which will populate your template with dummy data.

Answer with a 201 HTTP Status Code.

You can then follow with a normal request of Account Statement to download it.

Bulb icon

Tips

  • Use the same value for payin and payinrefund to include payin refunds in your test.
  • Use a fairly high payin value, as types (cheque, sctr) are generated randomly.
  • An Account Statement generated for a given month can't be overriden nor regenerated.

# As JSON

# Workflow

  • Retrieve the data needed for the building a statement via an API Call to Treezor
  • Optionally decrypt the data
  • Generate a PDF on your own, using the collected data

# Retrieve the raw data

# Mandatory parameters

Attribute Type Description
walletId string The unique identifier of the Wallet.
month integer The month of the statement (2 digits leading with 0)
year integer The year of the statement (4 digits, e.g., 2022)

Outputs an object containing all the necessary data.

If you get a 404 HTTP Status Code, the Statement data is not yet ready or the Wallet doesn't exist.

# Build a template

You will then need to:

  • Build a template using your favorite template engine
  • Decipher the data (Only if the encryption feature is enabled in your Treezor Connect account)
  • Inject the data into the template
  • Generate a PDF
  • Send the generated PDF to your end user.

# Variables

Below is a list of available variables for Account Statement templates.

Variable Related to Additional information (if any)
wallet.iban Wallet
wallet.bic Wallet
user.title User
user.firstname User
user.lastname User
user.address1 User
user.address2 User
user.address3 User
user.postcode User
user.city User
user.country User
operations[*].date Operations
operations[*].type Operations Always provided in French.
operations[*].name Operations
operations[*].direction Operations
operations[*].amount Operations
firstBalance.currency Balances
firstBalance.date Balances The date of the first Balance of the month.
firstBalance.amount Balances The amount of the first Balance of the month.
lastBalance.currency Balances
lastBalance.date Balances The date of the last Balance of the month.
lastBalance.amount Balances The amount of the last Balance of the month.
totalDebit Balances The cumulated amount of debit Operations.
totalCredit Balances The cumulated amount of credit Operations.
totalOperation Totals The sum of all Operations Mandatory
totalAmountFees Totals The sum of Transfers of type Fees Mandatory
totalAmountCreditNote Totals The sum of Transfers of type Credit note Optional

# Endpoints

Endpoint Description Scope
/core-connect/statements/{walletId}/computed Request a templated statement for a given Wallet read_only
/core-connect/statements/{walletId}/raw Retrieve statement information for a given Wallet read_only
Updated on: 4/24/2024, 12:38:33 PM