Hello Shopify Team/Community,
We are using the Admin GraphQL API to query shopifyPaymentsAccount.balanceTransactions
to reconcile payout data.
We’ve encountered balance transactions where the type
field returned by the API is "SHOPIFY_COLLECTIVE_CREDIT"
. For these specific transactions, we consistently find that the associatedOrder
field in the API response is null
. We also checked the adjustmentsOrders
field, and it returns an empty array ([]
).
However, when we locate these exact same SHOPIFY_COLLECTIVE_CREDIT
transactions within the Shopify Admin web interface (specifically in the Finance/Payout/Payout details), the associated order number is clearly displayed and linked.
Other transaction types within the same query, such as CHARGE
, correctly populate the associatedOrder
field with the relevant order GID and name.
This discrepancy between the Admin UI and the GraphQL API response makes it difficult to programmatically associate these Collective credits back to their originating orders using the API.
Example Snippet of the problematic transaction from API response:
{
"adjustmentReason": "shopify_collective_credit",
"adjustmentsOrders": [],
"amount": { "amount": "34.15", "currencyCode": "USD" },
"associatedOrder": null, // <--- Problem: This is null
"associatedPayout": { "id": "gid://shopify/ShopifyPaymentsPayout/...", "status": "PAID" },
"fee": { "amount": "0.0", "currencyCode": "USD" },
"id": "gid://shopify/ShopifyPaymentsBalanceTransaction/...",
"net": { "amount": "34.15", "currencyCode": "USD" },
"sourceId": "7782400155",
"sourceOrderTransactionId": null,
"sourceType": "ADJUSTMENT",
"test": false,
"transactionDate": "...",
"type": "SHOPIFY_COLLECTIVE_CREDIT" // <--- The type being queried/returned
}
Could you please clarify:
- Is this a known limitation or a bug in the GraphQL Admin API where the
associatedOrder
(oradjustmentsOrders
) field is not populated for
SHOPIFY_COLLECTIVE_CREDIT
TAX_ADJUSTMENT_DEBIT
TAX_ADJUSTMENT_CREDIT
balance transactions? - Is there an alternative method within the GraphQL API to retrieve the associated order information for these specific transaction types, consistent with the data shown in the Admin UI?
Thank you for your assistance.