4. Query Ticket Template
1. API Path
/api/open/alipay/v1/ipass/template/manage/detail
Production domain: https://open.alipay.hk
Endpoint:https://open.alipay.hk/api/open/alipay/v1/ipass/template/manage/detail
2. API Request
2.1 Request
2.1.1 Header
Name | Type | Required | Description | Sample |
client-id | String | M | Client ID | 2110200000000044 |
signature | String | M | Message signature information | algorithm=sha256withrsa,keyVersion=2,signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz== |
encrypt | String | O | Message encryption information | algorithm=rsa, keyVersion=2 |
Content-type | String | M | Http content type | application/json; charset=UTF-8 |
2.1.2 Body
Name | Type | Length | Description | Sample |
merchantId | String | 64 | MerchantId | 2160120041113167 |
templateCode | String | 32 | Template Id | 82022031000135000000000000624234 |
2.2 Response
Name | Type | Length | Description | Sample | |
templateCode | String | 32 | Template Id | 82022031000135000000000000624234 | |
startDate | Date | / | Template start date time in millisecond timestamp format | 1640970061000 | |
endDate | Date | / | Template end date time in millisecond timestamp format | 1640970061000 | |
status | String | 32 | Template status valid - Template is valid frozen - Template is frozen paused - Template is temporary offline expired - Template is expired closed - Closed the template | valid | |
codeType | String | 16 | code type barcode - Barcode qrcode - QR Code promocode - Promotion Code none - do not display code | barcode | |
codeStandrad | String | 16 | Code standard CODE128 - Default barcode standard EAN-13 - Barcode standard QRCODE - QR Code | CODE128 | |
imageUrl | String | 256 | Image URL square Scale 1:1 Recommend Image size: 350px(W)x350px(H) Safe area: Safe area is the top 2/3 part as shadowed with red in the above sample picture. To ensure the perfect display, please place the main information of the product or service within the safe area. The part out of the safe area might be cropped in some scenarios. | ||
button | Object | / | Button setup information | ||
localeInfo | Object | / | Multi language ticket info | ||
merchantLogo | String | 256 | logo image URL | ||
currentAmountCent | Long | 0~100000000 | O | Sell price (unit: cents) | 1000 = 10.00HKD |
originalAmountCent | Long | 0~100000000 | O | Original price (unit: cents) | 1000 = 10.00HKD |
currencyCode | String | 16 | O | Currency , HKD, CNY,USD,JPY, etc | HKD |
stock | Integer | 1~1000000 | O | Amount in Stock | 100000 |
orderPageLink | String | 512 | Product sales link. Configure the link to jump to product purchase page
| alipayhk://platformapi/startapp?appId=2160003634300010&page=pages%2Fvouchers%2Fdetail%2Fdetail%3Fsource%3Dcampaign%26couponId%3D184056 | |
detailLink | String | 512 | C | Product introduction page
| |
categories | LIst<String> | 32/64 | Labeling for industry classification | ["Medical","Food"] 2.2.4 for enumeration values | |
exposure | String | / | Exposure label. Allow template to be displayed in AlipayHK designated in-app areas. Enumerations: exposed - exposure hidden - hide from exposure | exposed | |
passExtInfo | JSON | / | C | Movie sorting info, to determine movie sequence on in-app designated page. | { "artificialSortNo": 1, "sessionTotal": 2000 } |
2.2.1 Button
Name | Type | Length | Required | Description | Sample |
btnType | String | 8 | Y | Button Type none - do not display usage - use immediately payment - redirect to wallet payment QR code page | usage |
urlType | String | 16 | Y | URL Type: CODE_PAY_BTN - Payment QR code page SCAN_PAY_BTN - Scan to pay page CUSTOM_BTN - Custom URL | SCAN_PAY_BTN |
btnUrl | String | 512 | O | Custom URL (When urlType=CUSTOM_BTN, this field is mandatory) | |
browserOpen | boolean | / | O | open from Browser ( Only for A+ Merchant ) Values: false - by default true | false |
2.2.2 LocaleInfo
Name | Type | Length(CN/EN) | Required | Description | Sample |
name | String | 100/150 | Y | Ticket/movie name | |
subName | String | 400/400 | C | Short descriptions of a Ticket/movie Will be posted on AlipayHK in-app public areas. | 香港迪士尼度假樂園特價票 |
description | String | 4000/3000 | Y | Usage discrptions | |
terms | String | 4000/3000 | O | Terms and conditions | |
shops | String | 1000/800 | O | Applicable stores | |
brandName | String | 32/64 | Y | Supplier name/cinema name/sponsor name | A+Rewards MCL China Airline |
location(address) | String | 200/200 | O | ||
customTabs | List<CustomTab> | / | O | custom tab list | |
localeExtInfo | JSON | / | O | multi-language extend info | { "level": "I", "movieCategory": "动作片、科幻片", "director": "麥克米曹", "actor": "積伯克 奥卡菲纳 奥维拉戴维斯 德斯汀荷夫曼 吴漢章 拜仁鈞士頓 伊安麥聖 關繼威" } |
2.2.3 CustomTab
Name | Type | Length | Required | Description | Sample |
label | String | 20/40 | Y | tab name | tab name 1 |
type | String | 16 | Y | Custom Tab Type url - when the tag is clicked, the screen will open the specified URL | url |
value | String | 256 | Y | url to be opened |
2.2.4 Categories
Chinese | English | code |
餐飲 | Food & Beverage | Food |
咖啡茶飲 | Coffee & Tea | CoffeeAndTea |
醫療保健 | Medical | Medical |
美容化妝 | Cosmetics | Cosmetics |
生活百貨 | Groceries | Groceries |
網購 | Ecommerce | Ecommerce |
電子產品 | Electronics | Electronics |
遊戲娛樂 | Electronic Games | Games |
服飾配件 | Clothing & Accessories | Clothing |
珠寶鐘錶 | Jewellery & Watches | Jewellery |
休閒娛樂 | Entertainment | Entertainment |
教育 | Education | Education |
交通出行 | Transportation | Transportation |
其它 | Others | Others |
展覽 | Exhibition | Exhibition |
電影 | Movie | Movie |
景點 | Attraction | Attraction |
3. Request Sample
3.1 Request
{
"merchantId": "2160120041113167",
"templateCode": "82022031100135000000000000626075"
}
3.2 Response
{
"button": {
"browserOpen": false,
"btnType": "payment",
"btnUrl": "https://Alipay.com",
"urlType": "CUSTOM_BTN"
},
"categories": [
"Groceries",
"Medical"
],
"codeStandard": "CODE128",
"codeType": "promocode",
"endDate": 1667120401000,
"imageUrl": "https://alipay.com/glory66"
],
"localeInfo": {
"en_US": {
"brandName": "AliCenter",
"customTabs": [
{
"label": "DIY tag 1",
"type": "url",
"value": "https://alipay.com/glory111"
},
{
"label": "DIY tag 2",
"type": "url",
"value": "https://alipay.com/glory222"
},
{
"label": "DIY tag 3",
"type": "url",
"value": "https://alipay.com/glory333"
},
{
"label": "DIY tag 4",
"type": "url",
"value": "https://alipay.com/glory444"
}
],
"description": "Make it",
"name": "【Hung Fook Tong】Popularity in Taiwan Sunnyhill",
"shops": "You can use any store you know"
},
"zh_HK": {
"brandName": "阿里中心",
"customTabs": [
{
"label": "自定义tag1",
"type": "url",
"value": "https://alipay.com/glory111"
},
{
"label": "自定义tag2",
"type": "url",
"value": "https://alipay.com/gloey2222"
},
{
"label": "自定义tag3",
"type": "url",
"value": "https://alipay.com/glory333"
},
{
"label": "自定义tag4",
"type": "url",
"value": "https://alipay.com/glory44444"
}
],
"description": "省着点",
"name": "【鴻福堂】台灣人氣微熱山丘鳳梨奶黃月餅(1盒...",
"shops": "你知道的店都能用"
}
},
"merchantLogo": "https://www.merchantLogo.com",
"orderPageLink": "alipayhk://platformapi/startapp?appId=2160003634300010",
"detailLink": "alipayhk://www.ll.com",
"passExtInfo": {
"country":"156",
"province":"810000",
"city":"810000",
"district":"810015",
"businessArea":"81001501",
"soldNum":"1000",
"userNum":"8931",
"rating":"4.3",
"rateNum":"7323",
"tags":["Father's day", "HK&Macau Selected"]
},
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
},
"startDate": 1664351748000,
"status": "valid",
"templateCode": "22022092700135606000000000154152"
}