Merchant Transactions
Both merchant types can calculate cart tax and manage exemption certificates. TaxCloud-connected merchants with credentials on file can also record and update orders and issue refunds.
Before you begin
Send your Ziptax API key and the ID of a
merchant on your account. Connected cart, order, and
refund calls need TaxCloud credentials on file. These calls return 404
(credentials not found) when the credentials are missing.
Common conventions
All Merchant Transactions endpoints share the same shape.
You never send compliance credentials in the request. Ziptax resolves them server-side from the merchant’s stored TaxCloud credentials, so your integration only ever handles your own Ziptax API key.
Test vs Live environments
Each TaxCloud-connected merchant has two environments: Live (production) and Test
(sandbox). By default, cart, order, and refund requests sent to TaxCloud run against Live. To run a request against
the merchant’s Test environment instead — for example, to validate your
integration without creating real orders or affecting tax filings — set the
X-ENV header to TEST.
X-ENV accepts LIVE (the default) or TEST. Configure the merchant’s
TaxCloud Test environment before using it.
Ziptax certificate endpoints use the same certificate store regardless of
X-ENV. Use a dedicated test merchant to create or disable test certificates.
Operations
The full set of endpoints, and which merchants each one serves:
Ziptax stores new certificates for both merchant types. For order and refund calls, connect the merchant to TaxCloud and store its credentials.
Responses and errors
A successful call returns the requested resource as JSON (a cart calculation, an order, a certificate, or a refund).
See certificate errors for /merchant/cert/*
and exemption errors for carts and orders. Other errors
fall into two groups.
Ziptax-level errors are returned before the operation runs, when the request can’t be authorized or routed to a valid merchant. They use a simple envelope:
Operation-level errors are returned when the request reaches the compliance service but fails validation or processing. They carry more structured detail:
Usage and rate limits
Merchant Transactions are metered separately from your tax-lookup (rate
request) usage. Each transaction call counts as one merchant request against
your plan’s merchant allowance, and every call is subject to per-key rate
limiting. Exceeding your rate returns 429 with response code 108, the same
as the rest of the API. See Rate Limiting & Errors
for backoff guidance.
Every request that passes Ziptax’s up-front checks is metered exactly once,
including calls that end in 502/504. Requests rejected up front (bad key,
unknown merchant, missing credentials, malformed body, rate limit) do not
count against your merchant usage.
Retries and idempotency
Read operations are safe to retry. Write operations are not retried automatically, and you should not blindly retry them either: a retried create can produce a duplicate order, certificate, or refund.
If a write call times out (504) or the service is briefly unavailable
(502), don’t immediately retry. First confirm whether the operation
succeeded, for example by fetching the order with
order/get, then retry only if it did not.
502 and 504 only arise on the TaxCloud-connected path, where Ziptax calls an
upstream service. Cart calculation for a
self-managed merchant has no upstream call, so
those statuses never appear for it.