Skip to content

API Overview ​

Updated: 10/15/26, 5:44:21 PM

API Style ​

  • RESTful with kebab-case naming (e.g., pay-order not payOrder)
  • HTTP-based, JSON request and response bodies

API Architecture ​

DaxPay exposes the open Payment API:

TierPath PrefixAuthenticationResponse ClassUse Case
Payment API/unipay/*RSA signatureDaxResultServer-to-server calls (pay, refund, query, close)

Audience

Payment API is for merchant backend systems using RSA signature auth (no login session needed). Internal management endpoints used by the merchant web panel are out of scope for this documentation.

Three Categories under Payment API ​

/unipay/* is further divided by scenario:

CategoryPath PrefixScenarioDocs
Direct Pay/unipay/pay, /unipay/close, /unipay/refund, /unipay/query/*, /unipay/sync/*Channel & method already determined by merchant backendPay · Refund
Gateway Pay/unipay/gateway/*Platform cashier / aggregate QR selects the methodGateway Pre-pay
Allocation/unipay/alloc, /unipay/query/alloc-order, /unipay/sync/order/allocInitiate / query / sync allocation on allocatable ordersAllocate
Refund Query/unipay/query/refund-orderExact single refund lookup by refund numberQuery Refund Order

Health and Self-check ​

Two probe endpoints help you tell "network unreachable" from "misconfigured credentials" during early integration:

EndpointRequestAuthWhat it tells you
/unipay/callback/pingGETNoneWhether the service is reachable — returns a fixed marker text with no side effects; shares the channel-callback prefix, so reaching it means the callback path is open at the network level
/unipay/pingPOSTSignedWhether your signing setup is correct — goes through the same verification chain as business APIs (merchant identity → signature → replay protection), echoes the resolved app on success, and the response carries the platform signature so you can verify your platform public key as well

For POST /unipay/ping, the request body only needs mchNo plus the signature fields (appId is optional and falls back to the default app). Call it before your first real business request: if it passes, your mchNo, app, private key and sign-string construction are all correct, and later errors are almost certainly business-level.

WARNING

The signed probe consumes a replay-protection nonce slot — use it for integration self-checks, not as a high-frequency health check.

Base URL ​

http://{your-domain}:{port}

Example: https://your-domain.com (production), local dev default port 9999.

Integration Flow ​

  1. Register merchant: Get merchant number (mchNo) and application ID (appId).
  2. Configure keys: Generate an RSA key pair; register the merchant public key with the platform; obtain the platform public key for response verification.
  3. Call APIs: Construct requests with signature as defined in this documentation.
  4. Receive callbacks: Configure notifyUrl to receive payment/refund result notifications.

Common Headers ​

HeaderRequiredDescription
Content-TypeYesapplication/json

Signature Mechanism ​

Payment API (/unipay/*) uses RSA signature authentication. Signature fields are in the request body, not in headers:

FieldLocationDescription
signRequest bodyRSA signature value (Base64)
reqTimeRequest bodyRequest time (yyyy-MM-dd HH:mm:ss, GMT+8)
reqIdRequest bodyUnique request identifier
nonceStrRequest bodyRandom string

See Signature for details.

Response Body (Payment API) ​

DaxResult structure:

json
{
  "code": 0,
  "msg": "success",
  "data": {},
  "sign": "Base64Signature",
  "resTime": "2024-12-01 20:00:00",
  "reqId": "REQ20241201001"
}
FieldTypeDescription
codeintStatus code, 0 = success
msgstringMessage
dataobjectBusiness data
signstringRSA signature of the response (verifiable with platform public key)
resTimestringResponse time (Beijing time, yyyy-MM-dd HH:mm:ss)
reqIdstringRequest ID (echoed from request)

Field name note

Payment API uses the msg field (not message).

Conventions ​

HTTP Method ​

Trade endpoints of the Payment API all use POST with JSON body; a few auth endpoints use GET (e.g. Get User Identifier).

Date Format ​

All time fields of the Payment API (/unipay/**) — requests, responses and async notifications — use the Beijing time format yyyy-MM-dd HH:mm:ss, without timezone suffix:

json
{ "reqTime": "2024-12-01 12:00:00" }
  • The literal used in the platform's sign string is identical to the one in the message, so always sign the same literal (see Signature);
  • Do not use ISO 8601 (e.g. 2024-12-01T04:00:00Z) or sub-second precision for request time fields, otherwise signature verification fails with 20052;

Currency ​

All amount fields are Long in cents (fen), avoiding floating-point precision loss. Example: ¥1.00 → 100.

Status Values ​

Status fields are String (not numeric), using lowercase semantic codes:

  • Pay status (PayStatusEnum): wait / progress / success / close / cancel / fail / timeout
  • Refund order status (RefundOrderStatusEnum): progress / success / fail / close
  • Refund flag (PayRefundStatusEnum): no_refund / refunding / partial_refund / refunded

Glossary ​

TermDescription
mchNoMerchant Number
appIdApplication ID
RSA Key PairMerchant generates RSA key pair; public key registered with platform, private key used for signing
methodPayment method, e.g., wechat_qr, alipay_pc (see PayMethodEnum)
productPayment product (see Channel Reference)
orderNoSystem order number
bizOrderNoMerchant business order number
tradeNoTrade number (one order may have multiple trade attempts)