When a signing relationship exists, you can use this API to query the signing information of a specific order or proactively query the signing status to complete the next service logic. The common application scenarios are as follows:
No signing callback notification is received due to network or server exceptions during payment.
An unknown signing status is returned when the signing API is called.
Protocol: HTTPS GET
Direction: Your server -> Payment Kit server
URL: https://petalpay-developer.cloud.huawei.com.cn/api/v1/partner/contract/sign/merc-contracts/{mercContractCode}
Data format:
Request: Content-Type: application/json
Response: Content-Type: application/json
Request Header
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | The value is application/json; charset=UTF-8. |
| PayMercAuth | Yes | String | The value is a JSON string of PayMercAuth. |
Request path
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| mercContractCode | Yes | String | Merchant signing contract code. The signing contract code passed when you request signing is generated by the merchant and must be unique. The value contains a maximum of 64 characters. |
GET /api/v1/partner/contract/sign/merc-contracts/{mercContractCode} HTTP/1.1
Content-Type: application/json;charset=UTF-8
PayMercAuth: {"callerId":"10132120***","traceId":"202305151026422776499","time":1684117602555,"authId":"120291744647139***","headerSign":"u+H1Oe3fXV9mGCES89XA7tSjp8+TELYgG4bKyECwrVGwwExHtdWTnKc4WvEpfjLzpzKE2/+KYaq1jD********************eR8r6X46b7491N1jKg/lOG7eAFfwjEWJu5JyvY5KunSeE6DiKs=","bodySign":"yWDtXOBqDoItPgHmF57L6U5G7F/LhsILChu8YSpVV0HwRQCzdGAz53wDkCRLiAEVGDDu6E6KxPAHE0TIkT********************xUasPj10iUIFeaszpiRT2aQDaqLGaxvta6J5UxIUmAp+wGdV/juGEvQ="} Response Header
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | The value is application/json; charset=UTF-8. |
Response Body
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| resultCode | Yes | String | Result code. 000000 indicates success, and other values indicate exceptions. |
| resultDesc | Yes | String | Result description. |
| subCode | No | String | Service result code. |
| subDesc | No | String | Service result description. |
| sign | Yes | String | Signature, which is used to perform anti-tamper verification on response packets. |
| spMercNo | Yes | String | Merchant number of a platform merchant or service provider. The value contains a maximum of 12 characters. |
| subMercNo | No | String | Merchant number of a platform sub-merchant or special merchant. The value contains a maximum of 12 characters. |
| spAppId | No | String | App ID associated with a platform merchant or service provider. |
| subAppId | No | String | App ID associated with a special merchant. Note: App ID binding is not supported for platform sub-merchants. Passing this parameter in a platform merchant request may result in a validation exception. |
| contractId | No | String | ID of the withholding contract. |
| mercContractCode | No | String | Merchant signing contract code. The signing contract code passed when you request signing is generated by the merchant and must be unique. The value contains a maximum of 64 characters. |
| planId | No | String | Contract template ID. The template ID is generated by Huawei Pay when the merchant submits a permission application for withholding to Huawei Pay. |
| signedTime | No | String | Time when a contract is signed, in the format of yyyy-MM-dd hh:mm:ss. |
| expireDate | No | String | Contract expiration time, in the format of yyyy-MM-dd. |
| signStatus | No | String | Signing status. 1: signed 9: contract terminated |
| payer | No | PayerOut | Payer information shown on the client during payment. |
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"mercContractCode": "2024020316555432***",
"signedTime": "2023-09-01 09:01:25",
"resultCode": "000000",
"sign": "MEUCIQDQ206irxpkVWGQPN3********************gsKCEyx/O9Dvy1CaNnXaKU+uZBnrJmdhm5aG4JM=",
"contractId": "2024070914615843071097***",
"planId": "1***",
"resultDesc": "success",
"spMercNo": "10132120***"
} For error codes of resultCode other than 400000, see Common Result Codes.
| Return Code | Result Code | Description | Solution |
|---|---|---|---|
| 400000 | UNKNOW_ERROR | Service temporarily unavailable. Try again later. | Try again later. |
| 400000 | CUST_NOT_EXIST | The user does not exist or has been deregistered. | Replace the signing number and try again. |
| 400000 | CHECK_CONTRACT_STATUS | Invalid signing number. | 1. Check whether the signing relationship exists. 2. Check whether the signing number is correct. |