## Does Alpha Insights Track Payment Gateway Costs?

Yes! Alpha Insights automatically calculates payment gateway fees for each order based on the payment method used, ensuring accurate profit calculations.

### How It Works

#### Automatic Fee Calculation

For each order, Alpha Insights:

1. Detects payment method used (Stripe, PayPal, etc.)
2. Looks up fee structure configured for that specific gateway
3. Calculates fee based on order total: (Order Total × Percentage) + Static Fee
4. Deducts fee from profit automatically
5. If your payment plugin stores the actual fee charged (e.g., _stripe_fee meta), uses that exact amount instead

### Supported Payment Gateways

#### All WooCommerce Payment Gateways

Alpha Insights automatically detects all enabled payment gateways in your WooCommerce store, including:

- Stripe
- PayPal
- Square
- Authorize.net
- WooCommerce Payments
- Bank Transfer (BACS)
- Check Payments
- Cash on Delivery (COD)
- Any third-party payment gateway plugin

Note: Only payment gateways that are currently enabled in WooCommerce will appear in Alpha Insights settings.

### Setting Up Gateway Fees

#### Configuration Process

1. Go to Alpha Insights → Settings → General Settings
2. Scroll to Payment Gateway Costs section
3. You'll see a table listing ALL your enabled payment gateways automatically
4. For each gateway, configure:
   - Percent Of Order Value: The percentage fee (e.g., 2.9 for 2.9%)
   - Static Fee: The fixed fee per transaction (e.g., 0.30)
5. The Default gateway applies to any payment method not specifically configured
6. Click Save Changes

#### Important Notes

- Payment gateways are automatically detected - you don't need to add them manually
- If you enable a new payment gateway in WooCommerce, it will automatically appear in Alpha Insights settings
- If you disable a gateway in WooCommerce, it disappears from Alpha Insights settings
- The system uses the actual fee from your payment plugin if available (Stripe, PayPal, HitPay plugins store this)

### Fee Structure Examples

Percentage + Fixed:

    	Stripe US: 2.9% + $0.30 Order of $100: Fee = ($100 Ã— 0.029) + $0.30 Fee = $2.90 + $0.30 = $3.20

Percentage Only:

    	International card: 3.5% + $0.00 Order of $100: Fee = $100 Ã— 0.035 = $3.50

Fixed Only:

    	Bank transfer: 0% + $1.50 Order of $100: Fee = $1.50

### Different Rates by Card Type

If you have different rates:

- Domestic cards: 2.9% + $0.30
- International cards: 3.9% + $0.30
- Amex cards: 3.5% + $0.30

Solution: Use average rate or set up separate payment methods in WooCommerce

#### Viewing Payment Fees

### In Order Details

1. Go to order in WooCommerce
2. Scroll to Alpha Insights meta box
3. See profit breakdown including payment fee

Example:

    	Order #12345 Profit Breakdown: Revenue: $125.00 - Product Cost: $50.00 - Shipping Cost: $8.00 - Payment Fee: $3.93 (Stripe) = Profit: $63.07

#### In Reports

Payment fees appear in:

- Profit & Loss Statement (Payment Fees line)
- Order tables (Payment Fee column)
- Cost breakdown charts
- Total Costs metrics

### Impact on Profit

#### Example Impact

    	Monthly Analysis: Revenue: $50,000 Payment Fees: $1,500 (3% average) Annual Impact: Revenue: $600,000 Payment Fees: $18,000 This $18,000 affects your net profit!

### Why It Matters

- 3% fee on $50 order = $1.50
- If profit margin is 20% ($10), fee takes 15% of profit!
- Accurate profit calculation requires including these fees

#### Common Payment Fee Rates

### US Standard Rates

- Stripe:2.9% + $0.30
- PayPal:2.9% + $0.30 (domestic), 4.4% + fixed fee (international)
- Square:2.6% + $0.10
- Authorize.net:2.9% + $0.30 (+ monthly gateway fee)
- Braintree:2.9% + $0.30

#### International Rates

- Typically 1% higher than domestic
- Currency conversion fees may apply
- Check your processor's international pricing

### Enterprise Rates

- High-volume stores negotiate lower rates
- Can be as low as 1.9% + $0.20
- Update in Alpha Insights when rates change

#### Troubleshooting

### Issue: Payment fees seem wrong

Check:

- Fee structure entered correctly (% and $ amounts)
- Using correct payment method ID
- Your actual processor rates (check contract)

### Issue: No payment fee calculated

Causes:

- Payment gateway not enabled in WooCommerce (only enabled gateways are detected)
- Both percentage and static fee are set to 0 for that gateway
- Free order (no payment processed)
- Order total is $0

Solution:

1. Enable the payment gateway in WooCommerce → Settings → Payments
2. Go to Alpha Insights → Settings → General Settings
3. The gateway will appear automatically in the Payment Gateway Costs table
4. Configure the fee structure for that gateway
5. Save changes

#### Issue: Fee higher than expected

Check:

- International card rates are higher
- Amex typically charges more
- Currency conversion fees included
- Dispute fees or chargebacks

### Optimizing Payment Costs

#### Compare Gateway Fees

Use Alpha Insights to compare:

1. Create report
2. Group orders by payment method
3. Calculate average fee % for each
4. See which gateway is most expensive

### Encourage Lower-Fee Methods

- If bank transfer costs less, offer discount for using it
- Highlight lower-cost payment options
- Consider passing fees to customer (controversial but legal in some regions)

#### Negotiate Better Rates

Use Alpha Insights data:

- Show your monthly transaction volume
- Demonstrate growth trajectory
- Request volume discounts from processor