Base API
Use this interface to send order service request to AlipayHK.
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_AES,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 |
Please also check the extra fields for each business scenarios. |
Request parameters
requestId string REQUIRED
An unique request ID (uuid) to identify this API request.
More information:
- Maximum length: 32 characters
merchantBizNo string REQUIRED
Order ID of your system.
Must be consistent, we use this to reference the same order.
More information:
- Maximum length: 32 characters
orderStatus string REQUIRED
Status of the order.
Please refer to each business scenario.
More information:
- Maximum length: 32 characters
userId string
ID of AlipayHK user.
to provide either one
openIdoruserId.
More information:
- Maximum length: 64 characters
openId string
Authorization ID of AlipayHK user for merchant.
to provide either one
openIdoruserId.
More information:
- Maximum length: 64 characters
merchantBizType string REQUIRED
Type of order service.
PASS_TICKET: Admission Tickets.ALIPAY_COUPON: Auto-deducting voucher used within AlipayHK app.GIFT_CARD_COUPON: Coupon with scanning or written code.CHARGING_PILE: Ev charging.MOVIE_TICKET: Movie tickets.LINE_UP: Queue up.RIDE_HAILING: Ride hailing.SELF_PICK: Self pick up order.-
TRAIN_TICKET: Train tickets.
orderCreateTime number REQUIRED
Creation timestamp of first business event occurrence timestamp, should be consistent.
orderModifyTime number REQUIRED
Business event occurrence timestamp, used for sequential control of order status or rapidly changing data to prevent disorder, should be new for each update.
merchantAccountId string
Secondary merchant ID provided by AlipayHK after contract signed.
Provide when you are not the direct merchant (i.e. ISV)
More information:
- Maximum length: 64 characters
merchantId (deprecated) string
Secondary merchant ID provided by AlipayHK after contract signed.
Provide when you are not the direct merchant (i.e. ISV)
More information:
- Maximum length: 64 characters
tinyAppId string
ID of the miniprogram.
Response parameters
result Result REQUIRED
A metadata object indicates the result of the request.
orderId string
ID of this service order.
More information:
- Maximum length: 128 characters
orderStatus string
Existing status of this service order in AlipayHK.
More information:
- Maximum length: 64 characters
Request
Response
Result/Error codes
| Code | Value | Message |
|---|---|---|
| SUCCESS | S | Success |
| PARAM_ILLEGAL | F | Request is invalid, usually missing parameters. |
| ORDER_STATUS_INVALID | F | Order status is invalid, please refer to the relevant business scenario. |
| UNKNOWN_EXCEPTION | F | Unknown exception, please retry again. |
| UN_SUPPORT_BUSINESS | F | Service is not available, please check with support. |