I want to use(https://shopify.dev/api/admin-rest/2022-07/resources/transactions) this shopify transaction api in my shopify custom app. My api version is 5.1. I wanna ask to u that It is possible to make api request above mentioned URL in my api version? or which version support this api endpoint. and one more thing is that how can I use it with fetch api method kindly provide me response I’m waiting.
Thanks
1 Like
Hi @hasnainmalik 
The GraphQL Admin and REST Admin APIs require a Shopify access token (for public apps and custom apps) for making authenticated requests. The access token needs to be included as a X-Shopify-Access-Token header in your requests. For custom apps created from the merchant Admin, you can find the steps here to get an access token, otherwise you will need to follow the OAuth authorization flow in the OAuth guide here.
Currently our stable Admin API versions are 2023-01, 2022-10, 2022-07 and 2022-04. I’d recommend reviewing this guide to help get started with REST Admin API. Once you’re familiar with how to authenticate and appropriate scopes have been granted to your app, you can use the following curl request to fetch a list of transactions:
curl -X GET "https://STORE-NAME.myshopify.com/admin/api/2023-01/shopify_payments/balance/transactions.json" \
-H "X-Shopify-Access-Token: ADMIN-ACCESS-TOKEN"
Hope that helps!
How to make this request in postman or in node.js?
1 Like
In Postman, the access token is added as X-Shopify-Access-Token in the header of your request in the same way. If you’d prefer to use NodeJS, we provide a shopify-api-js library for your convenience. You can use an instance of shopify.clients.Rest to make requests to the Shopify Admin REST API.
In postman I am using the same way that you have told but still I’m getting an error 404 please let me know how can I resolve it.
1 Like
Would you please confirm whether you’re making this request to a development store? Generally, payouts wouldn’t exist for a development store.
1 Like