Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.

Skip to main content

Get a payment ID

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

Dashboard​

All payment IDs for your project are on your Dashboard.

  1. On your Dashboard, go to Data > Transactions.
  2. Open a transaction connected to the payment you're searching for. This will redirect you to a transaction page for a specific account.

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

  1. Scroll to the bottom of the page.
  2. Located the information named Payment.
  3. Click to copy the payment ID.

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

API guide​

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

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

Query​

Open in API Explorer
query GetPaymentId {
payments(first: 5) {
edges {
node {
id
createdAt
}
}
totalCount
}
}

Payload​

Find the transaction ID you need in the returned information. If the payload contents aren't sufficient, run the query again with modified parameters.

{
"data": {
"payments": {
"edges": [
{
"node": {
"id": "cto_70f4f83c243e5235f8e75818d660199a",
"createdAt": "2023-05-15T12:49:02.779Z"
}
},
{
"node": {
"id": "cto_631d8374a0bd35b004e887c49b32a334",
"createdAt": "2023-05-15T11:33:25.785Z"
}
},
{
"node": {
"id": "cti_7d045ad3bcd9dd159896a328dbd158c1",
"createdAt": "2023-05-03T12:34:05.227Z"
}
},
{
"node": {
"id": "cti_4e29152507d799f69f67e1bc5056c7af",
"createdAt": "2023-03-30T14:34:37.176Z"
}
},
{
"node": {
"id": "cto_d3bd55aeaed728d812b87c7b28d2dc72",
"createdAt": "2023-03-30T14:22:22.995Z"
}
}
],
"totalCount": 26
}
}
}