How can we help?

Coupon with Code

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

This page discuss the extended information for coupon with code scenarios, please also check the base API.

Order Status


Notification can start from any status below and status can be skipped if necessary, but not in reverse.

Order Status

Description

Card Wallet Display

TICKETED

When the coupon is issued.

\"image.png\"

REFUNDED

(End status)

When the order is refunded.

Coupon will disappear.

USED

(End status)

When the coupon is used.

Coupon status change to USED.


Below is the extra fields of this scenario, please also check the base API fields.

","descriptionLake":"

This page discuss the extended information for coupon with code scenarios, please also check the base API.

Order Status

","result":[{"code":"SUCCESS","value":"S","message":"success","action":"

success

","actionLake":"

success

"},{"code":"PARAM_ILLEGAL","value":"F","message":"Request is invalid, usually missing parameters.","action":"","actionLake":""},{"code":"ORDER_STATUS_INVALID","value":"F","message":"The order status is illegal. The status is not matched or the state machine does not support changes to this status","action":"","actionLake":""},{"code":"UNKNOWN_EXCEPTION","value":"U","message":"Unknown error. Merchants can try later first & contact with AlipayHK","action":"","actionLake":""},{"code":"UN_SUPPORT_BUSINESS","value":"F","message":"The service is not supported. eg: The merchant is not onboard & the API is offline","action":"","actionLake":""}],"moreCodes":[],"request":[{"name":"tradeNo","description":"

The transaction number provided by Alipay.

","descriptionLake":"

The transaction number provided by Alipay.

","editType":"string","type":"string","warning":"","warningLake":""},{"name":"amount","description":"

The original amount of this order.

","descriptionLake":"

The original amount of this order.

","editType":"object","type":"object","warning":"","warningLake":"","kvs":[{"name":"value","description":"

Value in cents.

","descriptionLake":"

Value in cents.

","editType":"string","type":"string","warning":"","warningLake":"","required":true},{"name":"currency","description":"

A 3-letter ISO 4217 currency code, i.e. HKD

","descriptionLake":"

A 3-letter ISO 4217 currency code, i.e. HKD

","editType":"string","type":"string","warning":"","warningLake":"","required":true}]},{"name":"payAmount","description":"

The actual amount user paid for this order.

","descriptionLake":"

The actual amount user paid for this order.

","editType":"object","type":"object","warning":"","warningLake":"","kvs":[{"name":"value","description":"

Value in cents.

","descriptionLake":"

Value in cents.

","editType":"string","type":"string","warning":"","warningLake":"","required":true},{"name":"currency","description":"

A 3-letter ISO 4217 currency code, i.e. HKD

","descriptionLake":"

A 3-letter ISO 4217 currency code, i.e. HKD

","editType":"string","type":"string","warning":"","warningLake":"","required":true}]},{"name":"extInfo","description":"","descriptionLake":"","editType":"object","type":"object","warning":"","warningLake":"","required":true,"kvs":[{"name":"merchant_bill_detail","description":"

An URL redirects to the order detail page, starts with allpayhk://.

","descriptionLake":"

An URL redirects to the order detail page, starts with allpayhk://.

","editType":"string","type":"string","warning":"","warningLake":""},{"name":"merchant_bill_id","description":"

Merchant's order ID.

","descriptionLake":"

Merchant's order ID.

","editType":"string","type":"string","warning":"","warningLake":""},{"name":"code_info","description":"

An object controls the display code value.

","descriptionLake":"

An object controls the display code value.

","editType":"object","type":"object","warning":"

REQUIRED when status is TICKETED.

","warningLake":"

when status is TICKETED.

","kvs":[{"name":"code_msg","description":"

Message of the display code.

","descriptionLake":"

Message of the display code.

","editType":"string","type":"string","warning":"","warningLake":"","required":true},{"name":"code_value","description":"

Value of the display code.

","descriptionLake":"

Value of the display code.

","editType":"string","type":"string","warning":"","warningLake":"","required":true}]},{"name":"template_code","description":"

A template code ID provided by AlipayHK.

","descriptionLake":"

A template code ID provided by AlipayHK.

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

REQUIRED when status is TICKETED.

","warningLake":"

when status is TICKETED.

"},{"name":"available_time","description":"

Notification / Ticket display start datetime to the user in milliseconds.

","descriptionLake":"

Notification / Ticket display start datetime to the user in milliseconds.

","editType":"number","type":"number","warning":"

REQUIRED when status is TICKETED.

","warningLake":"

when status is TICKETED.

"},{"name":"expired_time","description":"

Notification / Ticket display end datetime of this ticket in milliseconds.

","descriptionLake":"

Notification / Ticket display end datetime of this ticket in milliseconds.

","editType":"number","type":"number","warning":"

REQUIRED when status is TICKETED.

","warningLake":"

when status is TICKETED.

"}]}],"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":"

The order ID from AlipayHK

","descriptionLake":"

The order ID from AlipayHK

","editType":"string","type":"string","warning":"","warningLake":"","required":true},{"name":"orderStatus","description":"

Refer 'Order Status' tab above.

","descriptionLake":"

Refer 'Order Status' tab above.

","editType":"string","type":"string","warning":"","warningLake":"","required":true}],"examples":[{"scene":[],"request":"{ \"requestId\": \"1748242546100\", \"merchantBizNo\": \"1748231759885\", \"merchantId\": \"2160xxxxxxxxxxxx\", \"orderStatus\": \"TICKETED\", \"userId\": \"2160xxxxxxxxxxxx\", \"merchantBizType\": \"GIFT_CARD_COUPON\", \"orderCreateTime\": 1748242546100, \"orderModifyTime\": 1748242546100, \"amount\": { \"value\": \"10000\", \"currency\": \"HKD\" }, \"payAmount\": { \"value\": \"2000\", \"currency\": \"HKD\" }, \"tradeNo\": \"2160xxxxxxxxxxxx_1748242546100\", \"extInfo\": { \"merchant_bill_detail\": \"alipayhk://platformapi/startapp?appId=2102000032500019\", \"merchant_bill_id\": \"P2046\", \"code_info\": { \"code_msg\": \"code_msg\", \"code_value\": \"code_value\" }, \"template_code\": \"22025052600135606000000018619844\", \"available_time\": 1748242546100, \"expired_time\": 1748246146100 }}"}],"exampleResponse":[{"scene":[],"response":"{}"}]},"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":"TICKET_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"}]},{"name":"內容入庫","items":[{"name":"Catering (BRAND)","text":"Catering (BRAND)"},{"name":"Catering (STORE)","text":"Catering (STORE)"},{"name":"SKU_MOVIE","text":"MOVIE"},{"name":"E-Commerce (STORE)","text":"E-Commerce (STORE)"},{"name":"E-Commerce (SKU)","text":"E-Commerce (SKU)"},{"name":"Telecom (SKU)","text":"Telecom (SKU)"},{"name":"Medical (SKU)","text":"Medical (SKU)"}]},{"name":"订单中心","items":[{"name":"Gift Card","text":"Gift Card"}]},{"name":"缴费","items":[{"name":"redirect to merchant","text":"redirect to merchant"},{"name":"order by alipay","text":"order by alipay"}]}]}