Skip to main content
This guide walks you through processing your first jurisdiction-aware cash transaction using curl. By the end, you will have resolved a jurisdiction by ZIP code, applied rounding automatically, confirmed EBT exemption behavior, and generated a compliance receipt — covering the core flow your POS integration will use in production.

Prerequisites

  • An API key for the sandbox environment (contact Centsless to obtain sandbox credentials)
  • A tool for making HTTP requests (curl, Postman, or your preferred language)
1

Check that the API is live

Confirm the API is reachable before making authenticated requests:
curl https://api.centsless.org/api/v1/health
You should receive a 200 OK response with system status. This endpoint requires no API key.
2

Process an Arizona cash transaction

Send a cash transaction with an Arizona ZIP code. The engine resolves the jurisdiction and applies Swedish rounding automatically per AZ HB 2938.
curl -X POST https://api.centsless.org/api/v1/transaction \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "merchant_id": "YOUR-MERCHANT-ID",
    "subtotal_cents": 523,
    "tax_total_cents": 200,
    "payment_method": "cash",
    "zip_code": "85001"
  }'
The response includes the rounded cash total, the rounding delta, the jurisdiction that was resolved, and a compliance status:
{
  "success": true,
  "transaction": {
    "id": "TXN-2026-04-14-A82C2EAA",
    "calculation": {
      "subtotal_cents": 523,
      "tax_total_cents": 200,
      "ledger_total_cents": 723,
      "cash_total_cents": 725,
      "rounding_delta_cents": 2,
      "payment_method": "cash",
      "cash_rounding_mode": "swedish_rounding",
      "jurisdiction": "US-AZ",
      "rounding_applied": true
    },
    "compliance": {
      "compliance_status": "PASS"
    },
    "fraud_score": 0,
    "risk_level": "NONE"
  }
}
The customer pays **7.25insteadof7.25** instead of 7.23. The 2-cent rounding_delta_cents is applied per Arizona HB 2938 (mandatory Swedish rounding). Save the id field — you will need it in step 5.
ledger_total_cents is the pre-rounded total (subtotal + tax). cash_total_cents is what the customer actually pays. Sales tax is always calculated on the pre-rounded amount.
3

Try a different state

Swap the ZIP code for a state code to see a different rounding methodology. Send the same amounts to Indiana:
curl -X POST https://api.centsless.org/api/v1/transaction \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "merchant_id": "YOUR-MERCHANT-ID",
    "subtotal_cents": 523,
    "tax_total_cents": 200,
    "payment_method": "cash",
    "state": "IN"
  }'
Same input amounts, but Indiana SB 243 gives the operator a choice of rounding method (three-tier, permissive). The jurisdiction field in the response will reflect US-IN and the resolved rounding mode will differ from Arizona. This is the core value of jurisdiction-awareness — your POS code stays the same while the correct rule is applied per location.
4

Verify EBT exemption

EBT/SNAP transactions are never rounded, regardless of jurisdiction. Confirm this by submitting the same transaction with payment_method: "ebt":
curl -X POST https://api.centsless.org/api/v1/transaction \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "merchant_id": "YOUR-MERCHANT-ID",
    "subtotal_cents": 523,
    "tax_total_cents": 200,
    "payment_method": "ebt",
    "state": "AZ"
  }'
The response will show rounding_delta_cents: 0 and include an ebt_compliance_flag confirming 7 CFR 278.2 compliance. No rounding is applied even though Arizona mandates it for cash transactions.
5

Generate a compliance receipt

Use the transaction ID from step 2 to generate a receipt. The receipt includes the rounding disclosure language required by state law:
curl https://api.centsless.org/api/v1/transaction/TXN-ID-HERE/receipt \
  -H "x-api-key: YOUR_API_KEY"
Replace TXN-ID-HERE with the id value from the step 2 response (e.g., TXN-2026-04-14-A82C2EAA). The default format is merchant, which is the customer-facing receipt with rounding disclosure. You can request audit or pos formats using the ?format= query parameter.

Next steps

  • Jurisdiction Resolution — understand the full resolution cascade and how ZIP, state, county, and city rules interact
  • Rounding Methods — details on Swedish rounding, symmetrical rounding, three-tier operator choice, and the other methodologies
  • API Reference — complete endpoint documentation for all transaction, receipt, audit, and export operations