API Conventions
Core integration conventions from Transafe technical documentation:
- All
POSTrequests useContent-Type: application/json. - Character encoding is UTF-8.
- Request and response payloads are JSON.
- Signature algorithm is
OPENSSL_ALGO_SHA256(merchant private key signs; platform public key verifies). - Evaluate protocol fields first, then business fields, then transaction status.
- Amount unit is yuan/local major unit as documented per market; do not force trailing
.00style values when unnecessary. - All API responses include a
statusfield; non-200means failure. Do not expose rawmsgdirectly to end users. - Submitted data must not contain Chinese characters.
- Collection/payout platform callbacks must return HTTP
200; otherwise retries occur within 12 hours (up to 5 times). - Add your server IP to the merchant console allowlist, and allowlist platform callback IPs on your side.
See also: