FROM CACHE - en_header

Linking Payouts to Order Transactions using API

Solved
Nass1
Tourist
3 0 0

Hello,

I know how to get the list of payouts using the API, I also know how to get transactions (for each orders), I would like now to get the list of transactions (at the order level) that makes one specific payout.

So in other words, for a specific payout ID, I would like to get the list of orders/transactions associated to it.

We are using shopify payments, that information is available in the shopify UI, I would expect it to be available through the API also.

Thanks in advance for any pointer 🙂

Accepted Solution (1)

Accepted Solutions
HunkyBill
Shopify Expert
4769 54 555

This is an accepted solution.

It is really quite simple. I just helped a buddy do exactly this. He wanted to match payouts to orders for his accounting. You just ask Shopify for permission on the payouts scopes, and then you can easily get the payouts and within the payouts, the orders associated with them,

It is very straightforward in the OLD RestAPI, so do not look at the GraphQL to save your bacon here. Best of luck. Again.. it is actually quite simple. You don't need anything but basic API calls and the toughest thing is getting that scope permission granted by Shopify. Tell them it is for your store, and I am sure they will grant it to you.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com

View solution in original post

Replies 12 (12)
Greg_Kujawa
Shopify Partner
1023 84 266

Good luck on your venture. There are a few posts on here recently that outline the difficulties in pulling this together. In short, I don't think there is just a single API request to retrieve this, or even a pair of API requests really...

Nass1
Tourist
3 0 0

That's crazy... Seems quite straightforward. Is there a way to request this for the next release of the graphQL API ?
Not sure how the community/development is organized here, quite new to this 🙂

Thanks for your answer anyway !

HunkyBill
Shopify Expert
4769 54 555

This is an accepted solution.

It is really quite simple. I just helped a buddy do exactly this. He wanted to match payouts to orders for his accounting. You just ask Shopify for permission on the payouts scopes, and then you can easily get the payouts and within the payouts, the orders associated with them,

It is very straightforward in the OLD RestAPI, so do not look at the GraphQL to save your bacon here. Best of luck. Again.. it is actually quite simple. You don't need anything but basic API calls and the toughest thing is getting that scope permission granted by Shopify. Tell them it is for your store, and I am sure they will grant it to you.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
Nass1
Tourist
3 0 0

Thanks a lot @HunkyBill , you saved me a lot of time 🙂

jjacobe
New Member
11 0 0

Hello HunkyBill,

I have reached out to shopify based on your post.  They told me they cannot:

"The payments permissions via the Admin should be accessible to you as per the permissions, for the additional information it might only be visible on the owners portal. Because API's are not supported by Shopify Support, I cannot advise on what the developer has suggested that you do. I would suggest responding to their post asking for further clarification as those forums are the best place for those questions." 

Can you better explain where we can access the payment permission? Can the payments permissions be accessed by the store owner?  

Thanks, 

James 

 

 

 

HunkyBill
Shopify Expert
4769 54 555

It is simple. If you are the owner of the store, and you have an App in play that needs to link Payouts to Orders, just ask Shopify via your partner account to turn that scope ON.

If you an App developer of an App that would require this scope for ALL installations it would make in merchant stores, then you are going to have to have a discussion with Shopify about that, as it does not seem to be a widely available scope by default. There are many of these. Some are limited to Plus as well.

Since you do not make clear what your position is, or why you need this scope, you'll have to fight this fight on your own!

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
mindmasters
Shopify Partner
4 0 1

Hey Bill:

 

"OLD RestAPI", can I have API Version number, currently I am using 2021-01 API version. 

 

Already have Read Access for "Shopify Payments payouts" of my Seller (Access scope: read_shopify_payments_payouts)

 

Please help me out with connecting dots between Payouts and Orders.

Screenshot 2021-12-08 at 7.25.10 AM.png

Thanks,

Sriram,

HunkyBill
Shopify Expert
4769 54 555

It is not easy, but here goes. Under Shopify Payments, you have access to payouts. They are not so interesting. But you also have access to Transactions. These are more interesting. You can see that transactions contain all the juice. A simple glance at a transaction connects two things. A Payout, by ID, and also contains an order, by ID.

 

So you can now connect the dots. Play with transactions. They give you all the good stuff. So you can now look at any payout, and figure out which orders played a role in it.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
mindmasters
Shopify Partner
4 0 1

Thanks Brother,

 

Changed API endpoint from a variation of Transaction to another, I am now getting Payout ID, This is what I did.

 

instead of using below endpoint:

admin/api/2021-01/orders/<Order Number>/transactions.json

 

I used below endpoint to get payout id:

admin/api/2021-01/shopify_payments/balance/transactions.json

 

{
"id": 5467669652211,
"type": "payout",
"test": false,
"payout_id": 767867676,
"payout_status": "paid",
"currency": "SGD",
"amount": "-48.72",
"fee": "0.00",
"net": "-48.72",
"source_id": 787977887,
"source_type": "payout",
"source_order_id": null,
"source_order_transaction_id": null,
"processed_at": "2021-11-11T09:29:59+08:00"
}
 

Thanks,

Sriram

 

HunkyBill
Shopify Expert
4769 54 555

Indeed! One has to be working under Shopify Payments to make sense of any payouts!

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
mindmasters
Shopify Partner
4 0 1

Hey Bill:

 

We have a situation, where we should be able to specify a Product as Pre-Order via API. I've looked up in forums with no resources. Could you please help me out pointing to a resource on exploring this.

 

Thanks,

Sriram.

HunkyBill
Shopify Expert
4769 54 555

Pre-release is always made up. Get creative. I made up pre-release products 6 years ago for my customers. There are so many variables in play, there is no one-size fits all. You can experiment with adding fulfillment services dedicated to pre-release, there are options where you have only so many and you keep count of how many of those sold, etc. etc. Without you having a definite plan, you'll struggle to invent a solution. If you do have a plan, you'll cobble together whatever works. Don't expect to find a low-fruit on the tree App to help, but maybe you will.

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com