Skip to main content
The /transaction endpoint is the core of the Centsless API. You send a transaction, and the engine resolves the jurisdiction, applies the correct rounding rule for that location, and returns the legally correct cash total — complete with compliance certification and a fraud score. Every transaction is committed to an immutable audit hash chain, giving you a tamper-evident record for regulators and auditors.

Endpoint

Authentication

All requests require an x-api-key header. Use your merchant key or partner key.
string
required
Your merchant or partner API key.

Request body

string
required
Unique merchant identifier issued by Centsless or your POS vendor.
integer
required
Pre-tax subtotal in cents. Tax is always calculated on this pre-rounded amount.
integer
required
Sales tax in cents. Always pass the tax calculated on the pre-rounded subtotal — never recalculate tax after rounding.
string
required
Payment tender type. One of: cash, card, ebt, mobile. Only cash transactions are subject to rounding. EBT transactions are never rounded per 7 CFR 278.2.
string
ZIP code for automatic jurisdiction resolution. Recommended — the engine resolves state, county, city, and the applicable rounding rule from a single field.
string
Two-letter state code (e.g., AZ, IN). Use when you don’t have a ZIP code.
string
County name for sub-state jurisdiction resolution. Combined with state for county-level rules.
string
City name for municipal-level jurisdiction resolution. Combined with state and county.
string
Explicit rounding mode override. One of: swedish_rounding, mandatory_round_down, mandatory_round_up, symmetrical_rounding, nearest_nickel, none. Use for testing only — omit this field in production to let the engine resolve the correct rule for the jurisdiction.
string
Store location identifier for multi-location merchants.
string
POS terminal identifier. Included in the audit record.
string
Cashier or employee identifier. Included in the audit record.
boolean
Set to true when the customer is splitting payment across multiple tender types.
array
Array of tender components for split tender transactions. Each item has a type (one of cash, card, ebt, mobile) and an amount_cents integer.

Examples

Response fields

object
The processed transaction record.

Response example

The customer pays **7.25insteadof7.25** instead of 7.23. The 2-cent rounding delta is applied per Arizona HB 2938 (mandatory Swedish rounding).