Connecting a USDT checkout with HMAC and webhooks
How CHINAUSDT signs create-order requests and delivers order.paid webhooks—checklist for engineering leads.
Integrating with CHINAUSDT comes down to two trust boundaries: how you create orders, and how we notify you that payment succeeded.
Create order: HMAC signing string
Checkout APIs (e.g. POST /checkout/v1/orders) require:
X-ZLPay-KeyX-ZLPay-TimestampX-ZLPay-NonceX-ZLPay-Signature
The signing string is exactly five lines:
METHOD
PATH
TIMESTAMP
NONCE
SHA256_HEX(RAW_BODY)
Sign with HMAC-SHA256 over that string using your project secret, then hex-encode. Hash the raw body bytes—never re-serialize JSON after parsing.
Timestamps + nonce stop replays; optional X-ZLPay-Idempotency-Key keeps one business intent to one order.
Notify: webhooks
After on-chain confirm and settlement, CHINAUSDT posts to your webhook_url (e.g. order.paid). You should:
- Verify
X-ZLPay-Signaturewith the webhook secret; - Fulfill idempotently by
out_trade_no; - Return HTTP 2xx or we will retry with backoff.
Put business fields in notify_ref at create time; webhooks echo them back. The payment system does not understand membership semantics.
See the API page in the tenant console for live key material (secrets shown once at creation).