Skip to main content

Get a transaction ID

You can get transactions IDs with the API or on your Dashboard.

Dashboard​

All transaction IDs for your project are on your Dashboard.

  1. On your Dashboard, go to Data > Transactions.
  2. Find the transaction you need.
  3. Scroll horizontally to locate the transaction ID, then click to copy.

Screenshot of Swan Dashboard transactions page with a callout of a single transaction ID

API guide​

Queries are highly customizable. This guide focuses solely on using the transactions query to get transaction IDs. Learn more about this query in the guide to get transaction information.

  1. Call the transactions query.
  2. Check the boxes for edges and node.
  3. Under node, check the boxes for id, createdAt, and label.
    • label often contains a name, which might be helpful.
    • createdAt could help you identity the payment ID you're searching for if you know when the payment was initiated.
    • Additionally, you might choose to get only the first 10 IDs on the list, use pagination to filter further, or add a totalCount.

Query​

🔎 Open the query in API Explorer

query GetTransactionId {
transactions {
edges {
node {
id
createdAt
label
}
}
totalCount
}
}

Payload​

{
"data": {
"transactions": {
"edges": [
{
"node": {
"id": "bosco_05582b065b10c5ca8aa03342bb1cf389",
"createdAt": "2023-05-15T11:34:10.101Z",
"label": "Transfer to Matilde Rana"
}
},
{
"node": {
"id": "bosci_00d62797731fb95ee2f91ca32f4165e9",
"createdAt": "2023-03-30T13:24:39.477Z",
"label": "Transfer from Sasha Oliveira"
}
},
],
"totalCount": 2
}
}
}