Skip to main content

Get a list of card transactions

You can call the API to get a list of all card 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​

  1. Call the card query.
  2. Add the card ID.
  3. Add transactions.
  4. Add all information you'd like to review about each card transaction.
  5. Add pagination if you're expecting a long list.

Query​

🔎 Open the query in API Explorer

query ListCardTransactions {
card(cardId: "$YOUR_CARD_ID") {
transactions {
edges {
node {
... on CardTransaction {
id
category
label
statusInfo {
status
}
type
amount {
currency
value
}
}
paymentId
}
}
}
}
}

Payload​

Review these two card transactions for an eCommerce purchase: the authorization and the final payment. Each transaction has its own transaction ID (lines 8, 24) but share the same payment ID (lines 19,35)

{
"data": {
"card": {
"transactions": {
"edges": [
{
"node": {
"id": "decao_14fd19a4320c78b9aa7716940530604f",
"category": "eCommerce",
"label": "Book purchase",
"statusInfo": {
"status": "Booked"
},
"type": "CardOutDebit",
"amount": {
"currency": "EUR",
"value": "15.00"
},
"paymentId": "cro_50680a1bfb6590742056a3d257c54b76"
}
},
{
"node": {
"id": "aucao_455c6e1d97ed66fcff868e09c87dd313",
"category": "eCommerce",
"label": "Book purchase",
"statusInfo": {
"status": "Released"
},
"type": "CardOutAuthorization",
"amount": {
"currency": "EUR",
"value": "0.00"
},
"paymentId": "cro_50680a1bfb6590742056a3d257c54b76"
}
},
]
}
}
}
}