How can I export the transaction fee for the PayPal gateway?

Depending on the payment gateway, the transaction fee may or may not be availabe in the Shopify order transaction data.  The data structure could vary as well depending on the payment gateway.

For the paypal gateway, this data is available under transactions > receipt > fee_amount subfield.

In EZ Exporter, you can use the formula below in the Calculated Fields to pull out the transaction fee from the transaction data:

get_total([i.receipt for i in load_json_data({{ transactions.successful_transactions }})], "fee_amount")

Related Articles:


App: EZ Exporter

Tags: advanced features, paypal, transaction fee, shopify order transactions