3. Query User Transaction Record
API Path
/api/open/alipayhk/businessdistrict/bill/query
Sample: https://open.alipay.hk/api/open/alipayhk/businessdistrict/bill/query
API Request
Request
Header
Name | Description | Type | Length | Required | Remarks | Sample |
client-id | Client ID | String | M |
| 211020000000000000044 | |
signature | Message signature information | String | M |
| algorithm=sha256withrsa,keyVersion=2,signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz== | |
encrypt | Message encryption information | String | O | algorithm=rsa, keyVersion=2 | ||
Content-type | HTTP content type | String | M | application/json; charset=UTF-8 |
Body
Field | Type | Length | Required | Remarks | Sample |
businessDistrictSubject | BusinessDistrictSubjectVO | M | Mall Information The IDs assigned by AlipayHK to distingu | "businessDistrictSubject": { "mallGroupLabel": "20230316", "mallLabel": "" }, | |
batchNo | String | M | Batch number of transaction record query | "batchNo":"2023032800090060001000000012544", | |
accessToken | String | M | Access token | "accessToken":"28202403000081821679899276000ZEtubjJxOp171000279", | |
appId | String | M | Mall's Mini-App appID | "appId":"2102020132609344" |
BusinessDistrictSubjectVO
Field | Type | Length | Required | Remarks | Sample |
mallGroupLabel | java.lang.String | M | The IDs assigned by AlipayHK to each group | 20230316 | |
mallLabel | java.lang.String | M | The IDs assigned by AlipayHK to each mall | 20230316 |
Response
Header
Name | Description | Type | Length | Required | Remarks | Sample |
client-id | Client ID | String | M |
| 211020000000000000044 | |
signature | Message signature information | String | M |
| algorithm=sha256withrsa,keyVersion=2,signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz== | |
encrypt | Message encryption information | String | O | algorithm=rsa, keyVersion=2 | ||
Content-type | HTTP content type | String | M | application/json; charset=UTF-8 |
Body
Field | Type | Length | Required | Remarks | Sample |
businessDistrictBills | List<BusinessDistrictBillVO> | M | Transaction records that uploaded by users | { "billNo": "20230320194010800100160270205544808", "mallGroupLabel": "20230316", "merchantName": "Apple Store", "orderAmount": { "currency": "HKD", "value": 1200 }, "payTime": "2023-04-08 17:45:56", "pmsLabel":"202303201916140700000660007912" }, | |
result | Result|2.0 | M | Response result | "result": { "resultCode": "SUCCESS", "resultMessage": "success.", "resultStatus": "S" } |
BusinessDistrictBillVO
Field | Type | Length | Required | Remarks | Sample |
billNo | java.lang.String | M | Transaction number | "billNo": "20230320194010800100160270205544808", | |
mallGroupLabel | java.lang.String | M | Mall group label | "mallGroupLabel": "20230316", | |
merchantName | java.lang.String | M | Merchant Name | "merchantName": "Apple Store", | |
orderAmount | OrderAmount|1.0 | M | Order Amount | "orderAmount": { "currency": "HKD", "value": 1200 }, | |
payTime | java.lang.String | M | Order payment time | "payTime": "2023-04-08 17:45:56", | |
pmsLable | java.lang.String | M | The unique IDs assigned by AlipayHK to identify each PMS combination | "pmsLabel":"202303201916140700000660007912" |
OrderAmount
Field | Type | Length | Required | Remarks | Sample |
currency | java.lang.String | M | Currency, refers to alpha-3 code in ISO 4217, such as JPY, EUR. USD | "currency": "HKD", | |
value | java.lang.Integer | M | Amount, the unit is the smallest amount unit in the specified currency, for example: when the currency is USD, the unit of value is cents; when the currency is Japanese yen, the unit of value is Japanese yen. | "value": 1200 |
Result
Field | Type | Length | Required | Description | Sample |
resultCode | java.lang.String | M | Result code | SUCCESS | |
resultStatus | java.lang.String | M | Result status | F - failed S- success | |
resultMessage | java.lang.String | M | Result message | success |
Result Code
Result Code | Result Message | Result Status | Description |
SUCCESS | success. | S | |
PARAM_ILLEGAL | illegal parameter:batchNo size must be between 0 and 64 | F | |
UNKNOWN_EXCEPTION | Unknown exception | U | |
ACCESSTOKEN_VALIDATE_FAILED | AccessToken validate failed | F |
3. Request Example
Request
{
"businessDistrictSubject": {
"mallGroupLabel": "20230316",
"mallLabel": ""
},
"batchNo":"2023032800090060001000000012544",
"accessToken":"28202403000081821679899276000ZEtubjJxOp171000279",
"appId":"2102020132609344"
}
Response
{
"businessDistrictBills": [
{
"billNo": "20230320194010800100160270205544801",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1211
},
"payTime": "2023-04-01 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544802",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1201
},
"payTime": "2023-04-02 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544803",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1210
},
"payTime": "2023-04-03 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544804",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-04 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544805",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-05 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544806",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-06 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544807",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-07 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544808",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-08 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544809",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-09 17:45:56",
"pmsLabel":"202303201916140700000660007912"
},
{
"billNo": "20230320194010800100160270205544810",
"mallGroupLabel": "20230316",
"merchantName": "Apple Store",
"orderAmount": {
"currency": "HKD",
"value": 1200
},
"payTime": "2023-04-10 17:45:56",
"pmsLabel":"202303201916140700000660007912"
}
],
"result": {
"resultCode": "SUCCESS",
"resultMessage": "success.",
"resultStatus": "S"
}
}