Generate an account statement
Generate an account statement for a custom time period using the API or on your Dashboard.
Account statements include all booked transactions (SEPA Credit Transfers, SEPA Direct Debit, card transactions, fees, internal transfers, and all other transaction types). This is different from transaction confirmation statements, which only confirm specific SEPA Credit Transfer transactions.
API guide​
- Call the
generateAccountStatementmutation. - Add the
accountId(line 4). - Add the
openingDateandclosingDateusing formatYYYY-MM-DDT00:00:00.000Z(lines 5-6).- Maximum period: three months.
- Set the
languagefor your account statement, and provide the fileformat(PDForCSV) (lines 7-8). - Add all information you'd like to review about the statement (lines 11-27).
Mutation​
Open in API Explorermutation GenerateAccountStatement {
generateAccountStatement(
input: {
accountId: "$ACCOUNT_ID"
openingDate: "2024-04-12T00:00:00.000Z"
closingDate: "2024-06-12T00:00:00.000Z"
language: nl
format: PDF
}
) {
closingDate
createdAt
feeCredits {
currency
value
}
feeDebits {
currency
value
}
id
openingDate
period
statusInfo {
status
}
updatedAt
}
}
Payload​
The mutation returns all of the requested information.
The period field shows Custom (line 16) for on-demand statements. Swan automatically generates statements with period values of Monthly or Custom.
The statusInfo.status shows Pending while Swan generates the statement (line 18).
{
"data": {
"generateAccountStatement": {
"closingDate": "2024-06-12T00:00:00.000Z",
"createdAt": "2024-06-20T15:56:50.096Z",
"feeCredits": {
"currency": "EUR",
"value": "5.50"
},
"feeDebits": {
"currency": "EUR",
"value": "12.00"
},
"id": "$ACCOUNT_STATEMENT_ID",
"openingDate": "2024-04-12T00:00:00.000Z",
"period": "Custom",
"statusInfo": {
"status": "Pending"
},
"updatedAt": "2024-06-20T15:56:52.423Z"
}
}
}
Retrieve generated statement​
After generating the account statement, the statusInfo > status changes to Generated.
When the status is Generated, you can retrieve the download URL.
- Call the
accountStatementquery. - Add the account statement
id(line 2). - Add
statusInfofor all statuses (line 8). The URL to download the statement is provided instatusInfo>GeneratedStatusInfo>url(line 12).
query GetAccountStatement {
accountStatement(id: "$ACCOUNT_STATEMENT_ID") {
closingDate
createdAt
id
openingDate
period
statusInfo {
status
... on GeneratedStatusInfo {
status
url
}
... on PendingStatusInfo {
status
}
... on FailedStatusInfo {
status
}
... on VoidedStatusInfo {
status
url
}
}
updatedAt
}
}
Payload​
The period field shows Custom (line 8) for on-demand statements.
Use the url to download the statement (line 12).
- Copy the
urlfrom the payload. - Paste the
urlinto your preferred browser and press enter. - The document downloads automatically.
{
"data": {
"accountStatement": {
"closingDate": "2024-06-12T00:00:00.000Z",
"createdAt": "2024-06-20T15:56:50.096Z",
"id": "$ACCOUNT_STATEMENT_ID",
"openingDate": "2024-04-12T00:00:00.000Z",
"period": "Custom",
"statusInfo": {
"__typename": "GeneratedStatusInfo",
"status": "Generated",
"url": "$DOWNLOAD_URL"
},
"updatedAt": "2024-06-20T15:56:58.234Z"
}
}
}
Pending: The statement is being generated.Generated: The statement is ready to download. Theurlfield contains the download link.Failed: Statement generation failed. Double-check your account ID and generate a new statement.Voided: The statement has been voided. A voided statementurlis still available for reference.
Dashboard​
You can also generate statements from your Dashboard.
- Go to Dashboard > Data > Accounts.
- Open the account for which you want to generate a statement (not pictured).
- Go to the Account statements tab.
- Click + New

- Enter the opening date and closing date. The time period can cover up to three months.
- Choose the format and language.
- Click Save.

Your new statement appears on your list of account statements with the status Pending.
After the status changes to Generated, you can download your statement.
