目录

Querying Contract Signing Order Information by mercContractCode

Function

Queries details about all orders signed successfully through Huawei Pay.

Scenario

If a signing relationship exists, you can use this API to query the signing information of the specific order or proactively check the signing status to complete the service logic of the next step. The common application scenarios are as follows:

Prototype

Request Parameters

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 contract code. The contract code is passed when you request contract signing. It is generated by the merchant and must be unique. The value contains a maximum of 64 characters.

Request Example

GET /api/v2/contract/sign/merc-contracts/{mercContractCode} HTTP/1.1
Content-Type: application/json;charset=UTF-8
PayMercAuth:
{"callerId":"10132120***","traceId":"202305151047588466083","time":1684118878350,"authId":"120291744647139***","headerSign":"4Xb1tDGRC4f/B58ANI********************znmsDJOALXgvh/RKeReQBbc4lXZp5wnyZmdwTesmPGdszSNP/s=","bodySign":"kf9AZmVjBSGUI2MldsIFShO+Ak00qpPKaXgJo+K********************7gdghaJShhzAsNjt8DE9ulUIlQ0Q95/dZt2jEHcXyLfGNVzDNfFPhvF08NnnGM4="}

Response Parameters

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.
mercNo No String Merchant number for contract signing.
appId No String App ID.
contractId No String ID of the PIN-free payment contract.
mercContractCode No String Merchant contract code. The contract code is passed when you request contract signing. It 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.

Response Example

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
  "mercContractCode": "2024020316555432***",
  "signedTime": "2023-09-01 09:01:25",
  "resultCode": "000000",
  "sign": "MEUCIQDQ206irxpkVWGQPN*************Dvy1CaNnXaKU+uZBnrJmdhm5aG4JM=",
  "contractId": "2024070914615843071097***",
  "planId": "1***",
  "resultDesc": "success",
  "mercNo": "10132120***"
}

Error Codes

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.