App reviews, troubleshooting, and recommendations
Dear Shopify Community,
I am currently developing a custom UI extension for Shopify POS and am seeking guidance on how to access the details of a completed order within the extension. Specifically, I aim to retrieve and display information such as the list of purchased items, total amount, customer details, and other relevant data pertaining to the finalized transaction. In other words, I want to access to the purchase receipt.
The goal of the extension is to send the purchase receipt to our server.
Is there any way to do this? I've been reading all the docs and searching in forums, but I didn't found any way.
Thanks
Hey @Scrogy ,
To access completed order details in a Shopify POS custom UI extension, use the Shopify Admin API to fetch the order details after the transaction. You'll need to make a request like this to get the order data:
fetch('https://your-shop.myshopify.com/admin/api/2024-01/orders/{order-id}.json', {
method: 'GET',
headers: { 'X-Shopify-Access-Token': 'your-access-token' }
})
.then(response => response.json())
.then(data => console.log(data.order));
You can then send the receipt to your server using a POST request. Consider using webhooks (e.g., orders/create) to automate this process when an order is completed.
If I was able to help you, please don't forget to Like and mark it as the Solution!
If you’re looking for expert help with customization or coding, I’d be delighted to support you. Please don’t hesitate to reach out via the email in my signature below—I’m here to help bring your vision to life!
Best Regard,
Rajat
Hi @rajweb ,
Thanks for your answer! I will try this tomorrow and update this post with the results 🙂
Hi again @rajweb
Sorry for not updating fast.
I've been trying a lot of ways to get this working with your solution and others too. But I am not being able to fetch the order from the API.
I think the main problem is that I am building an extension only, and in this way I can not have a valid access token, but I am not sure
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025