A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
Based on the calls we have made internally, we can see that the TenderTransaction API is not returning any transactions processed through Shopify gift cards. Is there any way we can improve that? Or what other API can we use to retrieve such data with the processed_at filtering?
Kind regards,
Hey @amdev - Gift Cards are processed a little differently than other types of payment within Shopify, so this is why we're not seeing them through the Tender Transactions endpoint. You are correct that gift card transactions aren't available to be queried through the TenderTransaction resource, but you can access Gift Card transactions through the Orders API, by querying the transactions related to a specific order.
It's not the most ideal workaround, but it would provide information on Gift Card related transactions. Here's an example of what the response payload would return:
GET https://[yourstore].myshopify.com/admin/api/2023-01/orders/[orderID]/transactions.json
l
Hope this helps - let us know if we can clarify anything on our end!
Al | Shopify Developer Support
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Thanks for your answer.
However, in our scenario, we are actually trying to find out all the orders' ids that have any transaction processed at a specific timeframe. So it won't be practical for us to call the other endpoint as you have suggested above since we need the order_id, to begin with.
Would there be another workaround to solve this issue?
Hey @amdev, there is a way that you can pull some information through the general transaction endpoint in REST, if that workaround would be something you'd like to look into. For example, you could pull a segment of orders using the Orders API and then query the transaction endpoint for the specific orders to pull the exact type of transaction was made on a specific order. It may not be the quickest workaround but it would work. Here's a quick high-level way you could achieve this:
1. Make a GET query for the segment of orders you want to pull: GET https://[yourstore].myshopify.com/admin/api/2023-01/orders.json?created_at_min=2023-04-01T00:00:00Z&created_at_max=2023-04-30T23:59:59Z
2. Pull the individual transaction records per order: GET https://[yourstore].myshopify.com/admin/api/2023-01/orders/[orderID]/transactions.json
3. You should then see any orders that had transactions that were processed using a shop's gift card like this:
This would require some programatic logic at a code level that our team can't help with at the moment, but I did want to share a potential workaround in case this helps.
Let us know if you have any further questions - happy to dig into this further if need be.
Al | Shopify Developer Support
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi @ShopifyDevSup,
I really appreciate the detailed response, however, it still doesn't quite meet our requirements. The main problem with this suggested workaround is that this logic relies on orders' creation time for filtering purposes but not the payment processing time. In many scenarios, payments are done at a much later date. It is not feasible for us to be calling a large date range for filtering purposes just to make sure we are capturing the late payments.
We would love to see the tender transactions endpoint or another new endpoint to be including gift card transactions in the near future with processed at filtering capability. Thank you.
Hey @amdev - definitely understand where you're coming from. I just wanted to get back in touch to let you know that I'm going to put through a report to our product team on this. I can't guarantee that your request here will be implemented, but I can share that we do take all feedback into consideration, so our team will still review this from a product perspective and there will be developer eyes on this.
Thanks again for getting in touch - feel free to reply back here in this thread if you'd like to share further use cases for the tender transactions endpoint or open up a new thread if you have any other questions.
Al | Shopify Developer Support
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
@ShopifyDevSup Any update on this?
Regarding the workaround, I have found a quite common case where it doesn't work. When a customer updates an order, and adds an item which is paid for by a gift card. The created date is the time of the original order, while the processed time can be the time of the update.
We can modify your workaround to also request updated_at, however that doesn't work in the case of multiple updates. (From my experience working with Shopify Orders, this is quite often the case.)