1. Home
  2. /
  3. Integrations
  4. /
  5. Stripe
Payments

Factor Payment Processing Costs into Every Margin Calculation

Agentis reads your Stripe fee schedule — including Amex vs Visa differentials, BNPL surcharges, and international card fees — to calculate true net margin per order.

How It Works

Agentis connects to your Stripe account via the Balance Transaction API to read the actual processing fee for each payment. Instead of using a flat 2.9% estimate, Agentis knows the exact fee: 3.5% for Amex, 2.9% + 0.30 for domestic Visa, 4.4% for Klarna/Afterpay BNPL, and so on. This fee flows into the margin calculation at checkout, so your profit floor accounts for the real cost of the payment method the customer selects.

Data Flows

  • →Payment method type and card brand from Stripe → Agentis fee model
  • →Actual processing fees per transaction from Stripe Balance Transactions → Agentis margin engine
  • →BNPL provider surcharge data (Klarna, Afterpay) from Stripe → Agentis cost layer
  • →Dispute and chargeback fees from Stripe → Agentis post-order margin adjustment

Benefits

  • Stop underestimating payment costs — Amex orders cost 20-40% more to process than Visa
  • Automatically adjust profit floors for BNPL orders where fees can exceed 5%
  • Include chargeback and dispute costs in true order-level profitability calculations
  • Identify which payment methods are eroding margin and take action with data

Setup

  1. 1Connect your Stripe account to Agentis via OAuth (read-only scope)
  2. 2Agentis auto-detects your fee schedule, including any negotiated rates
  3. 3Configure whether to enforce margin at checkout by payment method or only report

Technical Details

Agentis uses the Stripe Connect OAuth flow with read-only permissions (balance.read, charges.read) to access your account. We query the Balance Transaction API to extract actual per-transaction fees, and the Payment Intent API to identify the payment method and card brand before the charge is captured. For BNPL providers (Klarna, Afterpay, Affirm), we read the provider-specific fee from Stripe's fee breakdown. Data syncs occur via webhooks (charge.succeeded, charge.dispute.created) for real-time updates.

Frequently Asked Questions

Does Agentis support payment processors other than Stripe?

Stripe is our primary payments integration. We also support Shopify Payments (which runs on Stripe) and are building connectors for Braintree and Adyen. Contact us for your specific processor.

Can Agentis block specific payment methods on low-margin orders?

Yes. You can configure rules like 'disable Amex on orders below 15% margin' or 'disable BNPL on sale items.' Agentis communicates this to Shopify via the Payment Customization API.

How does Agentis handle Stripe's negotiated pricing?

Agentis reads your actual fees from the Balance Transaction API, so it automatically reflects any custom or negotiated rates you have with Stripe. No manual fee configuration needed.

Related Solutions

Solution

Shopify Plus Profit Analytics

Go beyond Shopify’s native reporting with real-time margin intelligence that factors in live COGS from NetSuite, freight zone costs, and FX rates.

Solution

DTC Brand Margin Protection

Stop invisible margin erosion from stacked promos, influencer codes, and free shipping thresholds. Agentis enforces profit floors at checkout for DTC brands on Shopify Plus.

Key Concepts

Margin Analysis

Margin Leakage

The gradual, often undetected loss of profit across many orders — driven by small per-order cost overruns that compound into significant revenue erosion over time.

Margin Analysis

Order Profitability

The true net profit of a single order after deducting all variable costs — COGS, shipping, discounts, payment fees, fulfillment labor, and return allowances.

Margin Analysis

Gross Margin

The percentage of revenue remaining after subtracting the cost of goods sold — a foundational profitability metric that excludes operating expenses, taxes, and interest.

Free Audit — No Commitment

Protect Every Order's Profit Margin

See exactly how much margin Agentis can recover for your store in 7 days — no commitment required.