{"uid":"cap_eEnli4iMZcbeP3Rwbxka9","slug":"x402toll-order-total-calculator-e116406e","name":"x402toll Order Total Calculator","description":"Order total from subtotal, discount, tax rate, and shipping — tax excludes shipping by default (toggle with taxShipping).","url":"https://x402toll.com/v1/commerce/order-total","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"shipping":{"type":"number","default":0},"subtotal":{"type":"number"},"taxRatePct":{"type":"number","default":0},"discountPct":{"type":"number"},"taxShipping":{"type":"boolean","default":false},"discountAmount":{"type":"number"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dmGUt03L4rCP9zRYMNle1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the final order total from subtotal, optional discount (percent or amount), tax rate, and shipping, with configurable tax-on-shipping behavior.","exampleAgentPrompt":"Calculate the final order total for a cart with a $120.00 subtotal, a 15% discount, 8.5% tax rate, and $9.99 shipping — and tax should apply to shipping too.","exampleUseCases":null,"resultDescription":"Returns a computed breakdown including the discounted subtotal, tax amount, shipping, and the final order total, reflecting whether shipping is included in the tax base.","failureModes":["Missing required subtotal field returns a validation error","Negative values for subtotal or shipping may produce unexpected results","Both discountPct and discountAmount supplied may cause ambiguity in discount application","Invalid types (e.g. string instead of number) return a schema validation error","Payment not completed (x402 flow) returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need a fast, deterministic order total calculation that handles discounts (percentage or flat), tax rates, and shipping in a single call — especially when you want configurable tax-on-shipping behavior. Prefer this over building custom arithmetic when accuracy and auditability of the commerce math matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:53:52.476Z","isFirstParty":false}