{ "errors": "[API] Invalid Username provided for Basic Auth API access" }

Topic summary

Accessing the Shopify Transactions REST endpoint in a custom app; clarification sought on supported API versions and how to call it via fetch/Postman/Node.js.

Support explains authentication: an Admin access token is required and must be sent as the X-Shopify-Access-Token header. Tokens come from custom app credentials in the merchant Admin or via OAuth. Stable Admin API versions: 2023-01, 2022-10, 2022-07, 2022-04.

Example provided: curl GET to /admin/api/2023-01/shopify_payments/balance/transactions.json with the access token. In Postman, add the same header; in Node.js, use the shopify-api-js library and its Rest client.

Issue raised: the caller receives HTTP 404 in Postman (screenshot shared). Support asks whether the request targets a development store, noting payouts/transactions generally don’t exist there, which can lead to 404.

Action items: verify store type (development vs production), confirm endpoint path and API version, ensure required scopes and a valid access token, consider using the official Node client.

Status: unresolved; pending confirmation of store context and further troubleshooting steps.

Summarized with AI on February 1. AI used: gpt-5.

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 :waving_hand:

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