How can we help?

Base API

{"content":{"bizType":"NOTIFICATION","endpoint":"/api/open/alipay/v1/merchant/order/sync","hideEndpoint":false,"description":"

Use this interface to send order service request to AlipayHK.


General Headers

Name

Description

Type

Sample

Client-Id

REQUIRED

An ID provided by AlipayHK, used to identify partner and application system.

String

4Q5Y8W0WSG45P907917

Content-Type

REQUIRED

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

REQUIRED

A key-value pairs string separated by commas (,), which keys and values are joined by equal signs (key=value).

Valid keys include:

  • algorithm: The digital signature algorithm used in generating the signature, RSA256 or ECC224, uses RSA256 by default.
  • keyVersion: The key version of the signing key configured with Client-Id, uses the latest version by default.
  • signature: The signature value of this request.

String

algorithm=RSA256,keyVersion=1,signature=KEhXthj4bJ801Hqw8kaLvEKc0Rii8KsNUazw7kZgjxyGSPuOZ48058UVJUkkR21iD9JkHBGR rWiHPae8ZRPuBagh2H3qu7fxY5GxVDWayJUhUYkr9m%2FOW4UQVmXaQ9yn%2Fw2dCtzwAW0htPHYrKMyrT pMk%2BfDDmRflA%2FAMJhQ71yeyhufIA2PCJV8%2FCMOa46303A0WHhH0YPJ9%2FI0UeLVMWlJ1XcBo3Jr bRFvcowQwt0lP1XkoPmSLGpBevDE8%2FQ9WnxjPNDfrHnKgV2fp0hpMKVXNM%2BrLHNyMv3MkHg9iTMOD% 2FFYDAwSd%2B6%2FEOFo9UbdlKcmodJwjKlQoxZZIzmF8w%3D%3D

Encrypt

REQUIRED 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:

  • algorithm: The symmetric key algorithm used in encryptingthe signature, only RSA_AES is supported.
  • keyVersion: The key version of the signing key configured with Client-Id, uses the latest version by default.
  • symmetricKey: The encrypted symmetric key.

String

algorithm=RSA_AES,keyVersion=1,symmetricKey=bqS8HSmdaRrpKSuPy7CqUlyd8lJurG93

Request-only Headers

Name

Description

Type

Sample

Request-Time

REQUIRED

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

REQUIRED

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.

","descriptionLake":"

Use this interface to send order service request to AlipayHK.


","titleTag":"","result":[{"code":"SUCCESS","value":"S","message":"Success"},{"code":"PARAM_ILLEGAL","value":"F","message":"Request is invalid, usually missing parameters.","action":"","actionLake":""},{"code":"ORDER_STATUS_INVALID","value":"F","message":"Order status is invalid, please refer to the relevant business scenario.","action":"","actionLake":""},{"code":"UNKNOWN_EXCEPTION","value":"F","message":"Unknown exception, please retry again.","action":"","actionLake":""},{"code":"UN_SUPPORT_BUSINESS","value":"F","message":"Service is not available, please check with support.","action":"","actionLake":""}],"more":"


","moreLake":"


","moreCodes":[],"request":[{"name":"requestId","description":"

An unique request ID (uuid) to identify this API request.

","descriptionLake":"

An unique request ID (uuid) to identify this API request.

","editType":"string","type":"string","warning":"","warningLake":"","required":true,"maxLength":32},{"name":"merchantBizNo","description":"

Order ID of your system.

","descriptionLake":"

Order ID of your system.

","editType":"string","type":"string","warning":"

Must be consistent, we use this to reference the same order.

","warningLake":"

Must be consistent, we use this to reference the same order.

","required":true,"maxLength":32},{"name":"orderStatus","description":"

Status of the order.

","descriptionLake":"

Status of the order.

","editType":"string","type":"string","warning":"

Please refer to each business scenario.

","warningLake":"

Please refer to each business scenario.

","required":true,"maxLength":32},{"name":"userId","description":"

ID of AlipayHK user.

","descriptionLake":"

ID of AlipayHK user. 

","editType":"string","type":"string","warning":"

REQUIRED to provide either one openId or userId.

","warningLake":"

 to provide either one openId or userId.

","maxLength":64},{"name":"openId","description":"

Authorization ID of AlipayHK user for merchant.

","descriptionLake":"

Authorization ID of AlipayHK user for merchant.

","editType":"string","type":"string","warning":"

REQUIRED to provide either one openId or userId.

","warningLake":"

 to provide either one openId or userId.

","maxLength":64},{"name":"merchantBizType","description":"

Type of order service.

  • LINE_UP: Queue up.
  • SELF_PICK: Self pick up order.
","descriptionLake":"

Type of order service.

  • LINE_UP: Queue up.
  • SELF_PICK: Self pick up order.
","editType":"string","type":"string","warning":"","warningLake":"","required":true},{"name":"orderCreateTime","description":"

Creation timestamp of first business event occurrence timestamp, should be consistent.

","descriptionLake":"

Creation timestamp of first business event occurrence timestamp, should be consistent.

","editType":"number","type":"number","warning":"","warningLake":"","required":true},{"name":"orderModifyTime","description":"

Business event occurrence timestamp, used for sequential control of order status or rapidly changing data to prevent disorder, should be new for each update.

","descriptionLake":"

Business event occurrence timestamp, used for sequential control of order status or rapidly changing data to prevent disorder, should be new for each update.

","editType":"number","type":"number","warning":"","warningLake":"","required":true},{"name":"merchantId","description":"

Secondary merchant ID provided by AlipayHK after contract signed.

","descriptionLake":"

Secondary merchant ID provided by AlipayHK after contract signed.

","editType":"string","type":"string","warning":"

Provide when you are not the direct merchant (i.e. ISV)

","warningLake":"

Provide when you are not the direct merchant (i.e. ISV)

","maxLength":64},{"name":"tinyAppId","description":"

ID of the miniprogram.

","descriptionLake":"

ID of the miniprogram.

","editType":"string","type":"string","warning":"","warningLake":""}],"response":[{"name":"result","description":"

A metadata object indicates the result of the request.

","descriptionLake":"

A metadata object indicates the result of the request.

","editType":"object","type":"Result","warning":"","warningLake":"","required":true,"kvs":[{"name":"resultCode","description":"

The status code of this result, used for troubleshooting.

","descriptionLake":"

The status code of this result, used for troubleshooting.

","editType":"string","type":"string","warning":"","warningLake":"","required":true,"maxLength":64},{"name":"resultStatus","description":"

The status of this request.

  • ​S​: Success.
  • F: Failed.
  • U: Unknown exception.
","descriptionLake":"

The status of this request.

  • S: Success.
  • F: Failed.
  • U: Unknown exception.
","editType":"string","type":"string","warning":"","warningLake":"","required":true,"maxLength":2},{"name":"resultMessage","description":"

A description message of the result.

","descriptionLake":"

A description message of the result.

","editType":"string","type":"string","warning":"","warningLake":"","maxLength":256}]},{"name":"orderId","description":"

ID of this service order.

","descriptionLake":"

ID of this service order.

","editType":"string","type":"string","warning":"","warningLake":"","maxLength":128},{"name":"orderStatus","description":"

Existing status of this service order in AlipayHK.

","descriptionLake":"

Existing status of this service order in AlipayHK.

","editType":"string","type":"string","warning":"","warningLake":"","maxLength":64}],"examples":[{"scene":[],"request":"{ \"requestId\": \"263e63e6-2ca4-460b-8bfc-10f9e6c3\", \"merchantBizNo\": \"17363315200000\", \"orderStatus\": \"CALL_NUM\", \"userId\": \"216012345678910\", \"merchantBizType\": \"LINE_UP\", \"orderCreateTime\": \"17363315200000\", \"orderModifyTime\": \"17363315200000\", \"tinyAppId\": \"2102000032500019\"}"}],"exampleResponse":[{"scene":[],"response":"{ \"result\": { \"resultCode\": \"SUCCESS\", \"resultMessage\": \"success\", \"resultStatus\": \"S\" }, \"orderId\": \"ORDER_ID_12345678\", \"orderStatus\": \"CREATED\"}"}]},"sceneConfig":[{"name":"APP","items":[{"icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*g-x4R5biJnsAAAAAAAAAAAAAARQnAQ","name":"ALIPAY","width":70,"text":""},{"icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*oWi6R65CbmgAAAAAAAAAAAAAARQnAQ","name":"ALIPAY_HK","width":70,"text":""},{"icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*BGsoRLcqPFAAAAAAAAAAAAAAARQnAQ","name":"GCASH","width":70,"text":""},{"icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*3gswS6s147sAAAAAAAAAAAAAARQnAQ","name":"DANA","width":70,"text":""},{"icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*aN3iTZOdEhgAAAAAAAAAAAAAARQnAQ","name":"KAKAO_PAY","width":70,"text":""}]},{"name":"CLIENT","direction":"row","items":[{"name":"APP","icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*sHjISq1PKn8AAAAAAAAAAAAAARQnAQ","width":40},{"name":"H5","icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*cOz7T50g1I0AAAAAAAAAAAAAARQnAQ","width":40},{"name":"DESKTOP","icon":"https://gw.alipayobjects.com/mdn/rms_b3f2c2/afts/img/A*NKaIRq-KfQYAAAAAAAAAAAAAARQnAQ","width":40}]},{"name":"MERCHANT","items":[{"name":"INST","text":"机构商户"},{"name":"DIRECT","text":"直联商户"}]},{"name":"GRANT_TYPE","items":[{"name":"AUTHORIZATION_CODE","text":"AUTHORIZATION_CODE"},{"name":"REFRESH_TOKEN","text":"REFRESH_TOKEN"}]},{"name":"CREATE_MEMBERSHIP_CARD","items":[{"name":"WITH_USER_INFO","text":"With user information"},{"name":"WITHOUT_USER_INFO","text":"Without user information"}]},{"name":"COLLECT_PMS_INFORMATION","items":[{"name":"MERCHANT_PMS","text":"MERCHANT_PMS"},{"name":"IPAY_TRADE_NO","text":"IPAY_TRADE_NO"}]},{"name":"Card Type","items":[{"name":"COUPON","text":"COUPON"},{"name":"TICKET","text":"TICKET"}]},{"name":"Ticket Type","items":[{"name":"PASS","text":"PASS"},{"name":"MOVIE","text":"MOVIE"},{"name":"AIR TICKET","text":"AIR TICKET"},{"name":"TRAIN TICKET","text":"TRAIN TICKET"},{"name":"BUS TICKET","text":"BUS TICKET"},{"name":"SHIP TICKET","text":"SHIP TICKET"}]},{"name":"Display Code Type","items":[{"name":"BARCODE","text":"BARCODE"},{"name":"QR CODE","text":"QR CODE"},{"name":"PROMO CODE","text":"PROMO CODE"},{"name":"NONE","text":"NONE"}]},{"name":"Card Status","items":[{"name":"USED","text":"USED"},{"name":"CLOSED","text":"CLOSED"},{"name":"UPDATE","text":"UPDATE"},{"name":"REFUND","text":"REFUND"}]}]}