> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction Costs: Track Payment Gateway Fees

> Track transaction cost metrics in Upstack. Includes Gateway Cost, Transaction Fees, and payment processing expenses by customer type.

Transaction cost metrics track payment processing expenses—gateway fees, interchange costs, and other transaction charges.

<Info>
  **Data Source:** [Shopify](/sources/shopify)\
  **Metrics:** 11
</Info>

## Metrics in This Group

| Metric                                                                                                                       | Description                                   | When to Use                 |
| ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | --------------------------- |
| [Gateway Cost](/reference/metrics/orders/transaction/gateway-cost)                                                           | Payment gateway fees                          | Track processing costs      |
| [Gateway Cost Per Order](/reference/metrics/orders/transaction/gateway-cost-per-order)                                       | Gateway cost per order                        | Per-order fees              |
| [Gateway Cost %](/reference/metrics/orders/transaction/gateway-cost-percent)                                                 | Gateway as % of revenue                       | Fee burden                  |
| [Other Transaction Cost](/reference/metrics/orders/transaction/other-transaction-cost)                                       | Additional transaction fees                   | Misc processing costs       |
| [Total Transaction Cost](/reference/metrics/orders/transaction/total-transaction-cost)                                       | All transaction costs combined                | Total processing burden     |
| [New Customer Gateway Cost](/reference/metrics/orders/transaction/new-customer-gateway-cost)                                 | Gateway fees for new customers                | Segment analysis            |
| [Returning Customer Gateway Cost](/reference/metrics/orders/transaction/returning-customer-gateway-cost)                     | Gateway fees for returning customers          | Compare segments            |
| [New Customer Other Transaction Cost](/reference/metrics/orders/transaction/new-customer-other-transaction-cost)             | Other fees for new customers                  | Detailed new customer costs |
| [Returning Customer Other Transaction Cost](/reference/metrics/orders/transaction/returning-customer-other-transaction-cost) | Other fees for returning customers            | Detailed returning costs    |
| [New Customer Total Transaction Cost](/reference/metrics/orders/transaction/new-customer-total-transaction-cost)             | All transaction costs for new customers       | Total NC payment burden     |
| [Returning Customer Transaction Cost](/reference/metrics/orders/transaction/returning-customer-transaction-cost)             | All transaction costs for returning customers | Total RC payment burden     |

## How These Metrics Relate

Transaction costs impact contribution margin at the CM2 level:

* **Total Transaction Cost** = Gateway Cost + Other Transaction Cost
* **New Customer Total Transaction Cost** = NC Gateway Cost + NC Other Transaction Cost
* **Returning Customer Transaction Cost** = RC Gateway Cost + RC Other Transaction Cost
* **CM2** = CM1 - Fulfillment Costs - Transaction Costs
* Gateway Cost % typically ranges from 2-3% of revenue for most processors

## Choosing the Right Metric

* **Payment optimization**: Use Gateway Cost % to benchmark processor fees
* **Per-order economics**: Use Per Order metrics for unit economics
* **Total processing**: Use Total Transaction Cost for full payment burden
* **Customer profitability**: Compare New vs Returning transaction costs
