Get a list of transactions
You can call the API to get a list of all transactions executed from an account.
Transaction information is also available on your Dashboard > Data > Transactions, as well as Swan's Web Banking interface if you're using it.
Prerequisites
You need a project access token to call the query.
Guide​
- Call the
account
query. - Add the account ID.
- Add all information you'd like to review about each transaction. This example queries for transactions with the status
Upcoming
, retrieves their futureexecutionDate
, and includes thereference
. - Add pagination if you're looking for transactions for a certain interval, or you're expecting a long list.
Query​
🔎 Open the query in API Explorer
query UpcomingTransactions {
account(accountId: "$YOUR_ACCOUNT_ID") {
balances {
available {
currency
value
}
}
transactions(first: 2, filters: { status: Upcoming }) {
edges {
node {
amount {
value
currency
}
id
type
label
createdAt
reference
side
updatedAt
statusInfo {
... on UpcomingTransactionStatusInfo {
__typename
executionDate
}
}
}
}
totalCount
}
}
}
Payload​
Review the first two Upcoming
transactions and their executionDate
.
{
"data": {
"account": {
"balances": {
"available": {
"currency": "EUR",
"value": "2075.00"
}
},
"transactions": {
"edges": [
{
"node": {
"amount": {
"value": "100.00",
"currency": "EUR"
},
"id": "$YOUR_TRANSACTION_ID",
"type": "SepaDirectDebitIn",
"label": "MyBrand - SWAN",
"createdAt": "2024-01-22T18:16:31.801Z",
"reference": "YourReference",
"side": "Credit",
"updatedAt": "2024-01-22T18:16:31.842Z",
"statusInfo": {
"__typename": "UpcomingTransactionStatusInfo",
"executionDate": "2024-04-12T18:00:00.000Z"
}
}
},
{
"node": {
"amount": {
"value": "15.00",
"currency": "EUR"
},
"id": "$YOUR_TRANSACTION_ID",
"type": "SepaDirectDebitIn",
"label": "MyBrand - SWAN",
"createdAt": "2024-01-22T18:15:53.765Z",
"reference": "YourReference",
"side": "Credit",
"updatedAt": "2024-01-22T18:15:53.770Z",
"statusInfo": {
"__typename": "UpcomingTransactionStatusInfo",
"executionDate": "2024-01-31T18:00:00.000Z"
}
}
},
],
"totalCount": 7
}
}
}
}