2. Create AlipayHK Membership card
General Headers
Name | Description | Type | Sample |
Client-Id | An ID provided by AlipayHK, used to identify partner and application system. | String | 4Q5Y8W0WSG45P907917 |
Content-Type | The RFC 2616 media type of the request body, the charset should be as same as the one used for cryptographic operations. | String | application/json; charset=UTF-8 |
Signature | A key-value pairs string separated by commas (,), which keys and values are joined by equal signs (key=value). Valid keys include:
| String | algorithm=RSA256, keyVersion=1, signature=KEhXthj4bJ801Hqw8kaLvEKc0Rii8KsNUazw7kZgjxyGSPuOZ48058UVJUkkR21iD9JkHBGR rWiHPae8ZRPuBagh2H3qu7fxY5GxVDWayJUhUYkr9m%2FOW4UQVmXaQ9yn%2Fw2dCtzwAW0htPHYrKMyrT pMk%2BfDDmRflA%2FAMJhQ71yeyhufIA2PCJV8%2FCMOa46303A0WHhH0YPJ9%2FI0UeLVMWlJ1XcBo3Jr bRFvcowQwt0lP1XkoPmSLGpBevDE8%2FQ9WnxjPNDfrHnKgV2fp0hpMKVXNM%2BrLHNyMv3MkHg9iTMOD% 2FFYDAwSd%2B6%2FEOFo9UbdlKcmodJwjKlQoxZZIzmF8w%3D%3D |
Encrypt | when message content needs to be encrypted. A key-value pairs string separated by commas (,), which keys and values are joined by equal signs (key=value). Valid keys include:
| String | algorithm=RSA, keyVersion=1, symmetricKey=bqS8HSmdaRrpKSuPy7CqUlyd8lJurG93 |
Request-only Headers
Name | Description | Type | Sample |
Request-Time | The ISO-8601 datetime of this API request with timezone. | String | 2024-05-22T06:42:21+05:30 |
Response-only Headers
Name | Description | Type | Sample |
Response-Time | The ISO-8601 datetime of this API response with timezone. | String | 2024-05-22T06:42:21+05:30 |
Tracer-Id | An ID for tracing this request. | String | abcdefg135202000000000263818 |
Request parameters
merchantId string REQUIRED
An ID assigned by AlipayHK to identify a merchant.
userId string
Unique Id to identify an Alipay user.
to provide either
userId
oropenId
.
openId string
The authorization ID that of Alipay user to the merchant.
to provide either
userId
or openId
.
templateCode string REQUIRED
Member card template id
bizSerialId string REQUIRED
An ID to identify the merbership card creation record in merchant backend system.
bizSerialType string REQUIRED
Card business serial type.
OUT_PLAT_FORM
startDate number REQUIRED
Effective timestamp of membership card in millisecond.
endDate number REQUIRED
Expiration timestamp of the membership card in millisecond.
bizCreate number REQUIRED
Creation timestamp of the membership card in millisecond.
type string REQUIRED
Type of card.
CARD
product string REQUIRED
Type of product.
MEMBER_CARD
codeInfo object REQUIRED
Card code value information.
dataInfo string REQUIRED
Specific fields are assigned according to template variables.
When points and/or levels were defined in member card template, the corresponding points and/or levels information should be assigned in this field.
More information:
- Maximum length: 8192 characters
extInfo string REQUIRED
Pass extendInfo field from Create Merchant’s Membership Card API
Sample:
{"createCardRecordId":"111","uid":"222","mid":"333"}
Response parameters
result Result REQUIRED
A metadata object indicates the result of the request.
passId string REQUIRED
System-generated unique identifier.
More information:
- Maximum length: 32 characters
Request
Response
Result/Error codes
Code | Value | Message |
---|---|---|
SUCCESS | S | Success |
PARAM_ILLEGAL | F | Illegal parameters. For example, non-numeric input, invalid date. |
UNKNOWN_EXCEPTION | U | API failed due to unknown reason, please check with support. |