get detailed transaction info by payout_id

Shopify Partner
15 1 3

What I want to achieve: For a specific payout I want to fetch all transactions associated with it, and then for each transaction I want to display transaction information like amount, type of transaction, currency, payment gateway, if it was card, cash or bank transfer etc. It seems like not all information exists in the endpoint where you can pass in a payoutId


If I understand correctly there are 3 versions of the transaction resource, and they all differ in what type of information is contained within them:


  1. /admin/api/2023-04/shopify_payments/balance/transactions.json?payout_id=<PAYOUT_ID>
    1. This endpoint contains very little info, but you can fetch all transactions that are associated with a certain payout
  2. /admin/api/2023-04/orders/<ORDER_ID>/transactions.json

    1. How can I associate the transaction here with a payoutId? Do I have to fetch the equivalent transaction from option 1 above in order to the payoutId from that transaction
  3. The nested transaction object you can get when querying the orders endpoint: /admin/api/2023-04/orders.json?status=any
    1. This nested object contains the most information but I can't easily query it. How would I know which order to fetch if there is no payoutId for me to query by? Would I have to do the same thing as option 2 above where I first fetch the payout and then fetch the transactions by payoutId to to get the entire order for that transaction in order to get at more detailed version of the order? This seems very cumbersome.

So to my questions:

  1. My understanding is that they represent the same event, do they?
  2. How to I fetch the transaction data I need in the most efficient way? Do I really need to make 3 roundtrips?



Replies 0 (0)