Formula
Fee = (Amount × Percentage) + Fixed Fee

Every time a customer pays by card online, the payment processor — Stripe, PayPal, Square, and similar services — takes a cut before the money reaches the seller. The standard structure is a percentage of the transaction plus a small flat fee per transaction, commonly around 2.9% + $0.30 in the US for Stripe, slightly higher for PayPal's checkout product.

International cards, currency conversion, and manually-keyed transactions typically carry extra percentage points on top of the standard rate, which is why the same seller can see meaningfully different effective rates month to month depending on where their customers are paying from.

Sellers who want to pass the fee on to the customer, rather than absorb it, need to charge slightly more than the amount they actually want to receive — a flat percentage markup equal to the processor's rate isn't quite enough, because the fee is calculated on the higher, grossed-up charge amount.