Shopify Payment Fees missing from the Transactions endpoint

Highlighted
Shopify Partner
10 0 0

Hey Team,

 

We have some users who have an order paid for through the Shopify Payments gateway. Normally, for some of our other accounts, we can see the fees as part of the receipt or the metadata fields. However, in this case we don't see any fees at all despite the fact that in the Shopify UI the users can clearly see there are fees associated with the order.

Currently, while we can see the fees in the Payout Transactions, (https://help.shopify.com/en/api/reference/shopify_payments/transaction) there is no way to filter these by source_order_id or source_order_transaction_id. 

 

Short of querying for all Payouts and Transactions since the order was created is there a better way to get these Fees?

 

Our expectation is that these fees would be part of the orders transaction.

 

Thanks!

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 130

Hey @Dev15,

 

The documented way to retrieve Shopify Payments fee data is to query payouts or tenderTransactions as you mentioned. With regards to the receipt field, the response from this field isn't documented since it's contents depend on what the gateway chooses to send. However with that said, I am able to see fee data in this field on my own stores that use Shopify Payments.

 

I'd like to investigate further to determine why you aren't seeing fee data on a particular store. In order to do this, please provide the shop_id or an order_id from the store you're seeing the issue on, and I'll try to find out why you aren't seeing the fees on that shop.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Shopify Partner
10 0 0

Hi @_JB,

 

This seems to be happening for all orders with shopify_payments on the store 11211864.

 

Also, here is an order id the user has provided to us as an example 1883229159502.

 

Hope that helps. :)

0 Likes
Highlighted
Shopify Staff
Shopify Staff
587 72 130

Hey @Dev15,

 

I just did some testing and I can see where the discrepancy is coming from. It seems the fee data is only available when the store is set to automatically capture credit card payments. When a store captures automatically, the created transaction has a kind ofsale, and sale transactions contain the fee data.

 

When a store is set to manually capture credit payments, the transaction created initially has a kind of authorization, and when payment is captured another transaction is created with a kind of capture. Authorization and capture transactions don't contain the fee data, so this is why you're seeing the discrepancy.

 

Even though fee data is currently available for sale transactions in the metadata field, the response for this field isn't documented so it could potentially change at any time. For this reason and considering the data isn't available at all when merchants use manual capture, I'd recommend using the method you originally mentioned of querying payouts and matching those to transactions. 

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
Shopify Partner
10 0 0

Hi _JB,

 

 

Thanks for taking the time to look into this issue for us. 

 

Currently from the Payout APIs we can't query for a Payout by the Order ID. Is this something you guys might add to the Payout/Payout Transaction API endpoints in the near future?

 

Thanks again!

 

0 Likes
Highlighted
Shopify Partner
10 0 0

Hi @_JB

 


We asked this customers to use automatic capture payments however we still don't get Fee information from the transactions.

 

Here is a more recent OrderId: 2101917515854

 

 

Thanks!

0 Likes