POS Command Declare API
POST
Request Body Parameters
application/jsonCommon Request Parameters
bizContent
summaryObjectOptionalSummary query parameters, required when cmdType=SummaryskipSettleConfirmString(3)ConditionalSkip settlement confirmation; effectiveness depends on channel capability.
Values: Y/N
Default: Y
If channel does not support password input, any value will be processedprintTransactionString(3)ConditionalY-Print; N-No print
Values: Y/N
Default: Y
If channel does not support password input, any value will be processedneedPasswordString(3)ConditionalNeed password for settlement confirmation on POS; Y-Yes; N-No
Values: Y/N
Default: N
If channel does not support password input, any value will be processed
settlementObjectOptionalSettlement parameters, required when cmdType=SettlementskipSettleConfirmString(3)ConditionalSkip settlement confirmation; effectiveness depends on channel capability.
Values: Y/N
Default: Y
If channel does not support password input, any value will be processedprintTransactionString(3)ConditionalY-Print; N-No print
Values: Y/N
Default: Y
If channel does not support password input, any value will be processedneedPasswordString(3)ConditionalNeed password for settlement confirmation on POS; Y-Yes; N-No
Values: Y/N
Default: N
If channel does not support password input, any value will be processed
printObjectOptionalPrint parameters, required when cmdType=PrintLastprintCopyOptionString(32)ConditionalPrint copy option, default: DEFAULT
requestIdString(64)RequiredUnique request ID, globally unique for merchantrequestTimeString(13)RequiredMerchant-side request time. Timestamp, in millisecondsdeviceSnString(64)RequiredDevice serial number, used to specify target POS machinedeviceModelString(64)RequiredDevice model, used to specify target POS machinecmdTypeString(32)RequiredCommand type:- Summary - Summary settlement
- Settlement - Settlement
- PrintLast - Print last transaction
请求报文示例
{
"accId": "SP1234567890",
"clientId": "P100001",
"signType": "SHA256",
"sign": "SIGNATURE_VALUE",
"version": "1.0",
"bizContent": {
"requestId": "REQ20241101002",
"requestTime": "1698912345678",
"deviceSn": "POS001",
"deviceModel": "M30",
"cmdType": "Settlement",
"settlement": {
"skipSettleConfirm": "N",
"printTransaction": "Y",
"needPassword": "Y"
}
}
}Responses Body Parameters
application/jsonCommon Response Parameters
bizContent
requestIdString(64)RequiredMerchant request IDcmdIdString(64)RequiredCommand IDcmdTypeString(32)RequiredCommand type:- Summary - Summary settlement
- Settlement - Settlement
- PrintLast - Print last transaction
statusString(64)RequiredCommand processing status:- PROCESSING - Processing
- FAILED - Failed
- SUCCESS - Successful
响应报文示例
{
"accId": "SP1234567890",
"clientId": "P100001",
"signType": "SHA256",
"sign": "SIGNATURE_VALUE",
"code": "001000",
"description": "Successful request",
"bizContent": {
"requestId": "REQ20241101002",
"cmdId": "CMD12346",
"cmdType": "Settlement",
"status": "PROCESSING"
}
}