Skip to content

API Overview

Updated: 9/16/26, 9:53:37 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

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)

Official Website · Released under the GNU LGPL v3.0