How do I export only the payment gateway names of pending or successful transactions?

The payment_gateway_names field from the Shopify Order API will contain all gateway names from all order transactions, including failed transactions.

To export only payment gateways from transactions in "success" or "pending" status, you can use the formula below in the Calculated Fields:

",".join(set([i.gateway for i in load_json_data({{ transactions }}) if i.status in ["success", "pending"]]))

The above formula will export a comma-separated list of unique payment gateway names (e.g. shopify_payments,gift_card)


App: EZ Exporter

Tags: payment gateways