Hi Kiruthiga,
To retrieve all transactions of a given order using GraphQL, you can follow the pattern below:
{
order(id: "gid://shopify/Order/450789469") {
transactions(first: 100) {
edges {
node {
id
kind
status
amountSet {
shopMoney {
amount
currencyCode
}
presentmentMoney {
amount
currencyCode
}
}
}
}
}
}
}
You’ll need to replace the 450789469 in gid://shopify/Order/450789469 with your actual order ID. This query will return the first 100 transactions of the specified order, including the transaction id, kind, status, and amount.
Also, note that the order ID is a global ID in the format of gid://shopify/Order/450789469, not just a number. You can get the global ID from the response of a previous API request, or convert an order’s regular ID to a global ID by prepending it with gid://shopify/Order/.
Hope this helps!