Base API
POST /api/open/alipay/intl/promotion/order/contractCardSync
Environment | Domain |
Production | open.alipay.hk |
Testing | open-id-pre.alipay.com |
Use this interface to send performance notification service request to AlipayHK.
Request
Headers
Please check API Structure for basics.
Body
Name | Description | Type | Sample |
bizDate | Business event occurrence timestamp, used for sequential control of order status or rapidly changing data to prevent disorder. | Number | 1632833743000 |
command | Operation commands for performance notifications, valid input includes:
| String | "SEND" |
syncDataInfo | An extended object information for updating the notification. Please reference to the datainfo below. | See SyncDataInfo. | |
merchantBizNo | An order ID specified by merchant, must be consistent to reference the same notification. | String | "20240524000001" |
orderStatus | Status of the order. Please reference to each business domain. | String | "WAIT_PAY" |
productTemplateCode | A notification template code provided by AlipayHK.
| String | "PAYMENT_ORDER_DEFAULT" |
requestId | An unique request ID (uuid) to identify this API request. | String | "d1c221e1-5993-4162-bdbf-f06f33389472" |
endDate | A timestamp indicates the expiry date of notification, 24 hours from created for each order by default. | Number | 1632833743000 |
openId | Authorization ID of AlipayHK user for merchant. to provide either openId or userId. | String | |
userId | ID of AlipayHK user. to provide either openId or userId. | String | "2160xxxxxxxxxxxx" |
SyncDataInfo
Name | Description | Type | Sample |
languageBusinessInfo | An object providing business dedicated display information of different locale, key must be zh_HK or en_US. Performance notifications will be hided if user switched to a language not provided. | BusinessInfo | { "zh_HK": "JSONString(BusinessInfo)", "en_US": "JSONString(BusinessInfo)" } |
amount | Total amount of the order in cents. (1 for $0.01, 100 for $1) | Number | 100000 |
amountCurrency | if amount is provided, support HKD or CNY. | String | "HKD" |
merchantOrderDetailUrl | The URL reference of the order details. | String | "alipayhk://platformapi/startapp?appId=2102020185475244&page=pages/alipay/orderDetail/index?orderCode=20240421389609183133&query=" |
payAmount | Actual paying amount in cents. (1 for HKD 0.01, 100 for 1 HKD) | Number | 10000 |
payAmountCurrency | if payAmount is provided, support HKD or CNY. | String | "HKD" |
tinyAppId | ID of merchant's miniprogram. | String | "2102020185475244" |
tradeNo | Transaction number of this order from AlipayHK. | String |
Example
{
"merchantId": "216022000000xxx",
"userId": "2160220044640xxx",
"requestId": "1111110000000000001",
"command": "SEND",
"merchantBizNo": "GDBJ0529000000000001",
"orderStatus": "WAIT_PAY",
"bizDate": 1632833743000,
"productTemplateCode": "PAYMENT_ORDER_DEFAULT",
"syncDataInfo": {
"tinyAppId": "12333",
"languageBusinessInfo": "{\"zh_HK\":{\"bill_desc\":\"煤氣十月賬單已發出\",\"bill_name\":\"煤氣賬單\",\"bill_moth_time\":\"2024-10\",\"bill_due_time\":\"2024-10-15\",\"bill_amount\":\"57000\",\"bill_amount_currency\":\"HKD\",\"action_url\":\"alipayhk://platformapi/startapp?appId=2102020185475244&page=pages/alipay/orderDetail/index?orderCode=20240421389609183133\",\"order_Url\":\"alipayhk://platformapi/startapp?appId=2102020185475244&page=pages/alipay/orderDetail/index?orderCode=20240421389609183133\"},\"en_US\":{\"bill_desc\":\"OCT Gas Bill Issued\",\"bill_name\":\"Gas BILL\",\"bill_moth_time\":\"2024-10\",\"bill_due_time\":\"2024-10-15\",\"bill_amount\":\"57000\",\"bill_amount_currency\":\"HKD\",\"action_url\":\"alipayhk://platformapi/startapp?appId=2102020185475244&page=pages/alipay/orderDetail/index?orderCode=20240421389609183133\",\"order_Url\":\"alipayhk://platformapi/startapp?appId=2102020185475244&page=pages/alipay/orderDetail/index?orderCode=20240421389609183133\"}}"
}
}For languageBusinessInfo, please check the relevant business scenario.
Response
Headers
Please check API Structure for basics.
Body
Please check API Structure for basics.
Example
{
"result":{
"resultStatus":"S",
"resultCode":"SUCCESS",
"resultMessage":"success"
}
}Error Handling
Result Codes
Result Code | Result Status | Remarks |
SUCCESS | S | Request is successful. |
ORDER_NOT_FOUND | F | The merchantBizNo is invalid. |
ORDER_STATUS_INVALID | F | Order status is invalid, please refer to the relevant business scenario. |
PARAM_ILLEGAL | F | Request is invalid, usually missing parameters. |
UNKNOWN_EXCEPTION | F | Unknown exception, please check with support. |
UN_SUPPORT_BUSINESS | F | Service is not available, please check with support. |