alipay.intl.user.pass.updatePass
Overview
Endpoint: /api/open/alipay/v1/ipass/pass/manage/updatePass
The merchant can use this interface to update the released cards. This interface includes three main functions: verify cards, invalid cards, and update cards. Only verify cards and invalid cards are supported now.
Sample
Request
{
"merchantId":"6228480402564890018",
"userId":"2160400000000135",
"templateId":"5228480402564890018",
"passId":"2995228480402564890018",
"status":"USED",
"verifyCode":"52284804025648900182995228480402564890018",
"verifyType":"qrcode"
}
Response
{
"resultInfo":{
"resultCode": "SUCCESS"
"resultMessage":"success",
"resultStatus": "S"
}
}
Structure
Request parameters
Header
No | Name | Description | Type | Required | Sample |
1 | clientId | Client ID | String | ME | 211020000000000000044 |
2 | signature | Message signature information | String | M | algorithm=sha256withrsa,keyVersion=2, signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz== |
3 | encrypt | Message encryption information | String | O | algorithm=rsa, keyVersion=2 |
4 | Contenttype | Http content type | String | M | application/json; charset=UTF-8 |
Body
No | Name | Description | Type | Length | Required | Remarks | Sample |
1 | merchantId | The merchant ID, which identifies the settlement target that Alipay would settle to. | String | 32 | M | 2312314123123123 | |
2 | userId | AlipayHK user ID | String | 32 | C | At least one of userId and openId needs to be passed. | 2188200000000000 |
3 | openId | The unique openId for the merchant that is authorized by AlipayHK. | String | 32 | C | At least one of userId and openId needs to be passed. | fj398457jd8iue98d8w7w93j |
4 | templateCode | Card template ID | String | 32 | O | 893297312932193811231231 | |
5 | passId | The unique card ID that is assigned by Alipay. | String | 32 | M | ||
6 | status | The status of the card. Possible values are:
| String | 32 | M | USED | |
7 | updateDetailType | When the status of the card is | String | 32 | C | UPDATE_SCORE | |
8 | passVerifyCode | The verification code. This field is required when the status is | String | 128 | O | ||
9 | passVerifyType | The verification type. Manual input methods such as wave, QR code, barcode, input are supported now. Pass and verify_type can not both be null. | String | 32 | O | ||
10 | endDate | The valid end time of the card. | String | 128 | O | 2021-01-11T00:00:00+08:00 | |
11 | dataInfo | Dynamic data to be updated. JSON data type. | String | 32 | O |
Response
Header
No | Name | Description | Type | Required | Sample |
1 | clientId | Client ID | String | ME | 211020000000000000044 |
2 | signature | Message signature information | String | M | algorithm=sha256withrsa,keyVersion=2, signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz== |
3 | encrypt | Message encryption information | String | O | algorithm=rsa, keyVersion=2 |
4 | Contenttype | Http content type | String | M | application/json; charset=UTF-8 |
5 | tracerId | Each request will be assigned with a unique ID to identify a unique system request, which is not used to identify a unique business request. | String | M | 645864f51556420636666454470556 |
Body
No | Name | Description | Type | Length | Required |
1 | result | Result information | ResultInfo | M |
More information
This section gives additional information about request samples of member cards.
Sample 1. The card is used
{
"merchantId":"6228480402564890018",
"userId":"2160400000000135",
"templateId":"5228480402564890018",
"passId":"2995228480402564890018",
"status":"USED",
"verifyCode":"52284804025648900182995228480402564890018",
"verifyType":"52284804025648900182995228480402564890018"
}
Sample 2. The card is updated and the update type is UPDATE_LEVEL
.
{
"merchantId":"6228480402564890018",
"userId":"2160400000000135",
"templateId":"5228480402564890018",
"passId":"2995228480402564890018",
"status":"UPDATE",
"updateType":"UPDATE_LEVEL"
"dataInfo": {
"zh_HK": {
"$level$": "",
"$orther$":""
},
"en_US": {
"$level$": "gold card",
"$orther$":"orther"
}
},
}
Sample 3. The card is updated and the update type is UPDATE_SCORE
.
{
"merchantId":"6228480402564890018",
"userId":"2160400000000135",
"templateId":"5228480402564890018",
"passId":"2995228480402564890018",
"status":"UPDATE",
"updateType":"UPDATE_SCORE"
"dataInfo": {
"zh_HK": {
"$score$": "12000",
},
"en_US": {
"$score$": "12000",
}
},
}
Result code
No. | resultCode | resultStatus | resultMessage |
1 | PARAM_ILLEGAL | F | Illegal parameters. For example, non-numeric input, invalid date. |
2 | SUCCESS | S | Success |
3 | UNKNOWN_EXCEPTION | U | API failed due to unknown reasons. |
4 | USER_NOT_EXIST | F | The user does not exist. |
5 | PASS_UPDATE_FAIL | F | Failed to update pass information |
6 | PASS_HAS_NOT_EXIST | F | Pass does not exist |
7 | PASS_USED_OCCUPIED | F | The used pass is occupied. |
8 | PASS_STATUS_ILLEGAL | F | Pass status is illegal. |