English
Sign Self-Check
POST /coin/v1/test/sign
Not a production business API — for signature comparison only. Available only in the test environment for the test merchant. Other merchants / production return unauthorized.
Test steps
- Set Header
X-Merchant-IdtoM1781678976331286876, and computeDigest/Authorizationper Request Signing. - Compare the returned
digestwith your localDigest. - Compare the returned
sign_stringwith your local Canonical Signing String (4 lines joined by LF). - Verify the request
Authorization.signaturewith the test public key; if valid and Digest is correct,is_verify=true.
Note: ECDSA signatures differ each time — do not string-compare the request signature with the returned sign.
Request fields (all optional; for realistic body testing)
| Field | Type | Required | Description |
|---|---|---|---|
quote_id | string | No | Quote ID |
trade_sn | string | No | Merchant order ID |
pay_amount | double | No | Pay amount |
receive_amount | double | No | Receive amount |
pay_currency | string | No | Pay currency |
receive_currency | string | No | Receive currency |
Request body example
json
{
"quote_id": "Q202606160001",
"trade_sn": "ORD-001",
"pay_amount": 543.2100,
"receive_amount": 100.00,
"pay_currency": "BRL",
"receive_currency": "USDT"
}Response fields (data)
| Field | Type | Description |
|---|---|---|
is_verify | bool | Digest correct and request signature verified with the test public key |
sign_string | string | Server Canonical Signing String (critical concatenation) |
digest | string | Digest computed by the server from the raw body |
sign | string | ES256 signature of sign_string by the test private key (Base64); usable in Header |
authorization | string | Full Authorization example value |
Success response example
json
{
"status": 200,
"msg": "SUCCESS",
"data": {
"is_verify": true,
"sign_string": "(request-target): post /coin/v1/test/sign\nx-timestamp: 1710000000\nx-nonce: a9f3c1d47e8b9a2c\ndigest: SHA-256=...",
"digest": "SHA-256=...",
"sign": "<base64-signature>",
"authorization": "Signature keyId=\"M1781678976331286876\",alg=\"ES256\",headers=\"(request-target) x-timestamp x-nonce digest\",signature=\"...\""
}
}