A crypto debit card authorization produces more than one number, and they are not interchangeable:
- the pending hold that appears immediately, which may include a temporary buffer;
- the settled billing amount after foreign-exchange layers and any fixed fee;
- the stablecoin units debited if the card is funded from a token such as USDC rather than from the billing fiat.
Treating the pending figure as "the FX cost," or folding every percentage into one blended rate, makes later reconciliation with a statement harder than it needs to be.
This note shows a small Python model that keeps those layers separate. It is not a review of any card, it does not load any issuer's published fees, and it does not claim that a card was used in person. Every numeric input is an invented example, labeled as such.
The examples run on Python 3.11 with the standard library only.
Three numbers, three rules
Take an invented purchase of 80.00 EUR on a card that bills in USD and is funded from a USDC balance.
- A mid-market EUR to USD rate is an input, not something the program should invent. In this example it is 1.1000, so the mid-market principal is
80.00 * 1.1000 = 88.00USD. - FX markups, when they exist as their own documented fields, are applied to that converted principal. Some issuers also include a card-network component inside a single published markup. If the network component is unpublished or already included, it must stay out of the model. In this example only an issuer markup of 1.2% is present, so
88.00 * 1.012 = 89.056USD. - A fixed per-authorization fee, if one is documented, is an amount in billing currency. It is added after the percentage layers, not blended into them. This example uses 0.25 USD, then rounds to the cent with banker's rounding:
89.306becomes89.31USD. That is the settled billing total in the model. - A stablecoin conversion, if the balance is USDC, is a separate step with its own documented rule. This example uses a 0.4% spread in which one unit of USDC yields
(1 - 0.004)units of billing currency, so the program divides the billing total by0.996.
None of those steps is a pending hold. A hold is a temporary authorization, sometimes larger than the expected settlement, which can later drop when the payment posts. In this example, a 5% buffer on the mid-market principal would show a pending amount of 88.00 * 1.05 = 92.40 USD. That 92.40 is not FX, and it is not the 89.31 billing total. It is a third figure, and it should be stored as such.
These percentages and the 0.25 USD fee are illustrative only. They are not taken from any issuer.
Why composition order matters
Two ways of writing "issuer plus network" disagree once both layers are present. With invented mid-market principal P, issuer spread i, and network spread n:
P * (1 + i + n) P * (1 + i) * (1 + n) They differ because the second spread is applied to a different base. For a single payment the gap may be a fraction of a cent. Across a ledger it becomes a reconciliation bug.
A further mistake is to apply a layer that is not separately disclosed. If an issuer's FX field already includes the network component, and the model also applies a network spread, the same conversion is counted twice. The safe default is: a missing or already-included layer is None, not zero. Zero is a published claim that the spread is free. None means "this step is not in the model."
Implementation
Money is a Decimal. Binary floats are the wrong type for a sum you want to compare with a statement.
from dataclasses import dataclass from decimal import Decimal, ROUND_HALF_EVEN from typing import Optional CENTS = Decimal("0.01") MICRO = Decimal("0.000001") def d(value: str) -> Decimal: return Decimal(value) @dataclass(frozen=True) class ExampleAuth: """Invented parameters for one worked example. Not issuer fees.""" mid_rate_merchant_to_billing: Decimal issuer_fx_spread: Optional[Decimal] network_fx_spread: Optional[Decimal] fixed_fee_billing: Decimal stablecoin_to_billing_spread: Decimal hold_buffer: Optional[Decimal] # temporary hold, not a fee def apply_spread(amount: Decimal, spread: Optional[Decimal]) -> Decimal: if spread is None: return amount if spread < 0: raise ValueError("spread must be None or >= 0") return amount * (1 + spread) def mid_principal(merchant_amount: Decimal, rate: Decimal) -> Decimal: if merchant_amount < 0 or rate <= 0: raise ValueError("merchant_amount must be >= 0 and rate must be > 0") return merchant_amount * rate def settled_billing(merchant_amount: Decimal, auth: ExampleAuth) -> Decimal: mid = mid_principal(merchant_amount, auth.mid_rate_merchant_to_billing) after_issuer = apply_spread(mid, auth.issuer_fx_spread) after_network = apply_spread(after_issuer, auth.network_fx_spread) total = after_network + auth.fixed_fee_billing return total.quantize(CENTS, rounding=ROUND_HALF_EVEN) def pending_hold(merchant_amount: Decimal, auth: ExampleAuth) -> Decimal: mid = mid_principal(merchant_amount, auth.mid_rate_merchant_to_billing) held = apply_spread(mid, auth.hold_buffer) return held.quantize(CENTS, rounding=ROUND_HALF_EVEN) def stablecoin_debit(billing_amount: Decimal, spread: Decimal) -> Decimal: if spread < 0 or spread >= 1: raise ValueError("stablecoin spread must be in [0, 1)") units = billing_amount / (1 - spread) return units.quantize(MICRO, rounding=ROUND_HALF_EVEN) If a product charges the stablecoin spread as a multiplier (1 + spread) on the token side, that is a different rule. It should be a different function, not a silent change of sign.
A breakdown you can log
@dataclass(frozen=True) class AuthBreakdown: mid_billing: Decimal pending_hold: Decimal after_issuer_fx: Decimal after_network_fx: Decimal settled_billing: Decimal stablecoin_units: Decimal def breakdown(merchant_amount: Decimal, auth: ExampleAuth) -> AuthBreakdown: mid = mid_principal(merchant_amount, auth.mid_rate_merchant_to_billing) after_issuer = apply_spread(mid, auth.issuer_fx_spread) after_network = apply_spread(after_issuer, auth.network_fx_spread) settled = (after_network + auth.fixed_fee_billing).quantize( CENTS, rounding=ROUND_HALF_EVEN ) return AuthBreakdown( mid_billing=mid.quantize(MICRO), pending_hold=pending_hold(merchant_amount, auth), after_issuer_fx=after_issuer, after_network_fx=after_network, settled_billing=settled, stablecoin_units=stablecoin_debit( settled, auth.stablecoin_to_billing_spread ), ) Worked example with the invented parameters above:
example = ExampleAuth( mid_rate_merchant_to_billing=d("1.1000"), issuer_fx_spread=d("0.012"), network_fx_spread=None, # unpublished or already included fixed_fee_billing=d("0.25"), stablecoin_to_billing_spread=d("0.004"), hold_buffer=d("0.05"), # invented 5% pending buffer, not a fee ) parts = breakdown(d("80.00"), example) # parts.mid_billing == Decimal("88.000000") # parts.pending_hold == Decimal("92.40") # parts.after_issuer_fx == Decimal("89.056") # parts.after_network_fx == Decimal("89.056") # network layer skipped # parts.settled_billing == Decimal("89.31") # parts.stablecoin_units == Decimal("89.668675") This is a deliberately simplified hold model, not a universal card-network or issuer authorization formula. It applies the illustrative buffer to the mid-market principal only and does not model issuer-specific authorization rules, network conversion rates, or fixed authorization fees. Actual pending amounts must be checked against the issuer's own documentation and transaction records.
The pending hold is 92.40 USD. The settled billing total is 89.31 USD (89.056 plus the 0.25 fixed fee, rounded to the cent). The example USDC debit is 89.31 / 0.996, quantized to six decimal places. If a later statement disagrees, you can see which step diverged.
Same-currency purchases should set both FX spreads to None and the mid-rate to 1. Only the fixed fee, the optional hold buffer, and the stablecoin conversion remain.
Checks on dummy inputs
These assertions use the same invented parameters. They are checks on the functions, not observations from a live card.
def check_example() -> None: auth = ExampleAuth( mid_rate_merchant_to_billing=d("1.1000"), issuer_fx_spread=d("0.012"), network_fx_spread=None, fixed_fee_billing=d("0.25"), stablecoin_to_billing_spread=d("0.004"), hold_buffer=d("0.05"), ) parts = breakdown(d("80.00"), auth) assert parts.mid_billing == d("88.000000") assert parts.pending_hold == d("92.40") assert parts.pending_hold > parts.settled_billing assert parts.after_network_fx == parts.after_issuer_fx assert parts.settled_billing == d("89.31") assert parts.stablecoin_units == d("89.668675") no_hold = ExampleAuth( mid_rate_merchant_to_billing=d("1.1000"), issuer_fx_spread=d("0.012"), network_fx_spread=None, fixed_fee_billing=d("0.25"), stablecoin_to_billing_spread=d("0.004"), hold_buffer=None, ) settled_only = breakdown(d("80.00"), no_hold) assert settled_only.pending_hold == settled_only.mid_billing.quantize(CENTS) The last check documents a modeling choice: when no buffer is configured, the function reports the mid-market principal as the hold, not the settled total. If a caller would rather treat "no buffer" as "hold equals settlement," that should be an explicit flag, not a silent change.
What this function does not do
- It does not fetch mid-market rates. The rate is an argument so a caller can pass a quote timestamped to the authorization.
- It does not decide how a particular issuer describes a hold. The buffer is an optional input. Some issuers document a percentage, some use a fixed margin, some show no extra pending amount. Read the product's own help pages before filling
hold_buffer. - It does not load ATM, monthly, or top-up fees. Those attach to other events.
- It does not supply official fee figures. Before you replace the invented spreads, read the issuer's current fee page and keep those numbers in dated configuration, outside the composition function.
A side-by-side of how published load, FX, and transaction fields are laid out — not a source of rates for the functions above — is in a calculator that is organized by those fee fields. Use the official fee page to fill the inputs.
Disclosure
I help maintain CryptoCardsLab, a third-party site that compares crypto debit cards from issuer-published documentation. This article is a modeling note with invented parameters. It is not a recommendation to use any card, and it is not a claim about any issuer's current fees.
