Agent Wranglers

PAY-58Required

Show the total price with every mandatory fee

Every price you list or advertise includes each fee the customer cannot avoid, such as service, booking or handling fees. Add later only what the law allows, such as US sales tax or shipping of physical goods.

How to do it

California's honest pricing law, Civil Code 1770(a)(29), applies from 1 July 2024 to online and physical shops. It bans a listed price that leaves out a mandatory fee. Showing the fee later in checkout does not cure it. A card fee counts as mandatory when cards are the only way to pay. In the EU, the Consumer Rights Directive asks for the total price with every extra charge before the order, next to the pay button. The US FTC fees rule, in force since 12 May 2025, sets the same bar for event tickets and short stays. Optional extras stay out of the price and need the customer's own choice, never a ticked box. Build each listed price and the checkout total from one server function, so they cannot drift. Tax display per market is in Show prices the way each market expects. Card fees in the EU are in Adding a fee for paying by consumer card in the EU.

Examples

JavaScript example

function listedPriceMinor(product) {
  const mandatoryFees = product.fees.filter(fee => fee.mandatory)
  return product.amountMinor + mandatoryFees.reduce((sum, fee) => sum + fee.amountMinor, 0)
}

test('the checkout total matches the listed price', async () => {
  const cart = await createCart([{ productId: 'bread-box', quantity: 1 }])
  expect(cart.totalMinor - cart.taxMinor - cart.shippingMinor).toBe(listedPriceMinor(breadBox))
})

Python example

def listed_price_minor(product):
    mandatory_fees = [fee for fee in product.fees if fee.mandatory]
    return product.amount_minor + sum(fee.amount_minor for fee in mandatory_fees)

def test_checkout_total_matches_listed_price():
    cart = create_cart([{"product_id": "bread-box", "quantity": 1}])
    assert cart.total_minor - cart.tax_minor - cart.shipping_minor == listed_price_minor(bread_box)

How to check

A test puts each product in the cart with no optional extras. The checkout total minus tax and shipping equals the product page price in minor units. A catalogue query finds no mandatory fee left out of a listed price.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/payments/checkout-and-card-data/total-price-upfront">Agent Wranglers payments playbook</a>. In code you write, add a comment next to it with the same link.