We track transaction fees on orders placed thru Shopify Payments on a per-order basis (for a long time, this was the only way we saw to do that). We do this through the admin REST API requesting first orders, and then their related transactions (if they we processed through Shopify).
Up until 5/8/23 @ 10:13 Pacific (17:13 ZULU), all transactions processed through Shopify Payments, whether placed on the web or via the POS, included a “receipts” => “metadata” object that had a “transaction_fee_total_amount” property. (It is also present in the “receipts” => “charges” => “data” => [0] => “metadata” => “transaction_fee_total_amount”.)
For all of my POS orders after that, those “transaction_fee_total_amount” metadata properties are missing. However, for orders that are being placed through our website, those properties still exist.
I have come up with a fairly clunky work-around where I grab the various pending and non-pending transactions and run through those and match them up with orders, but it would be great to have the data restored like it was for years and years.
It should be noted that the fees are still being withdrawn and are shown when looking at an order in the web admin.
Has anyone else seen or been affected by this change? Is there a plan to get this information back?
Hey @wriffle thanks for getting in touch. I was able to do some digging into this and it appears that the metadata array on the transactions object is an undocumented feature that isn’t supported at the moment. If we take a look at the transaction.json endpoint in the dev docs, we can see that there isn’t a metadata resource featured there, although I can confirm that on a few of my own test store transactions do also show this array when the processed orders were made through Shopify Payments. These types of issues can pop up from time to time in certain cases. The most common occurrences I’ve seen are where functionality that is intended to be deprecated is still included in later builds (generally for legacy support in some cases).
We do recommend that business processes not be built around undocumented or early access features since we can change them without notice. If you do need to specifically query transaction fees on Shopify Payments processed orders, the best way to currently do this is through our GraphQL API. We’re unable to guarantee parity between API versions, so I do definitely understand if this disrupts your integrations workflow.
I’d be happy to build a report based on the specifics of your use case for your app and share it with our product team. I can’t guarantee that any desired features will be implemented, but I can for sure say that we will pass this along to developers for their consideration and to advocate for the feature since it does seem like that workaround you mentioned is not ideal. Just reply here with any extra details you’d like to share and I’ll add them to my report and pass it along.
Hope to hear from you soon.
Al | Shopify Developer Support
Thanks @ShopifyDevSup for taking a look. I honestly can’t tell you if the metadata component(s) of the receipt was ever a “documented” feature. Partly that is because you do not allow us to look further back in the documentation than current APIs (which has been lamented on by others in terms of knowing what is or has been deprecated). I do know that my code has used it for quite some time - at least 6 years and perhaps as many as 8.
For historical purposes, we built our process around capturing the fee from each transaction, because that is how it is deducted and reported. Yes, there is a batch fee total, but if you are trying to line up individual transactions when auditing, having the fee on a per-transaction basis makes it much clearer and cleaner to identify errors.
Obviously, that data is available - it is still extant on online orders and was on all POS orders up through early this month. Since it is all back-ended thru Stripe, I can’t imaging that they aren’t providing that data to the POS transactions (and they do a much more developer-friendly job of versioning). I don’t know if anyone else was using it, but I think it is very handy to have and is only a tiny increase in the data already dumped on an order and transaction request (compared with things like taxes which have multiple sections that repeat the same information [yet they fail to give anything but the most general information on taxing authorities, but that’s a different topic]).
Anyway, moving away from a per-transaction fee basis represents a significant rework in our processes. If there’s any way your could restore this “undocumented” feature, it would be appreciated. I mean, obviously someone pushed out a change that got rid of it for POS transactions. Seems like it would be harmless and easy enough for someone to put that back in.
Thanks.
Hey @wriffle - thanks for the extra info here - definitely see your point in terms of process. I’m unable to say exactly why the data availability changed on my end, but I did want to get in touch again to confirm I’ve forwarded a report on to our product team with a link to this thread for visibility. I can’t guarantee anything specifically on my end still, but did want to touch base to confirm I’ve sent your concerns their way.
Thanks again for mentioning this and for waiting on my response - I think you are right that you may not have been the only one using your process and I’m happy to advocate on my end for some further consideration on this via that report.
Al | Shopify Developer Support
Thank you for the follow-up @ShopifyDevSup . I appreciate the advocacy, and I understand that you can’t guarantee anything.
No problem at all @wriffle , happy to help - I wanted to reach out with one more thing that may be helpful here (especially if other folks encounter this thread). We do also have a feedback form within the dev docs themselves. For example here’s what it looks like on the Transactions API for REST doc page:
My understanding is that feedback that is shared there is sent directly to our dev documentation team, so for issues like this where there are undocumented features without notes associated with them, I’d recommend inputting feedback that way. Again, I can’t guarantee what the outcome would be there - but I wanted to share this as another avenue that might be helpful in getting issues like this in front of the product team as well.
Thanks again for your patience here - hope this helps too.
Al | Shopify Developer Support
We are having the same issue, it would have been nice to extract fee for all types of orders in one single place.