--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/cmdDeclare/index.md description: >- POS Command Declare API is used to send functional commands to POS devices, supporting summary query, settlement execution, and printing the last transaction. Through this interface, merchants can remotely control POS devices to complete various daily operational functions. --- # POS Command Declare API ```apidef endpoint: POST /onsiteAcquirer/cmd/declare name: POS Command Declare API ``` POS Command Declare API is used to send functional commands to POS devices, supporting summary query, settlement execution, and printing the last transaction. Through this interface, merchants can remotely control POS devices to complete various daily operational functions. ## Request Parameters | Parameter | Type | Required | Description | |--------|------|------|------| | accId | string | M | Unique identifier for the store, which will appear in the response message after creation; inputting it means modifying the data | | clientId | string | M | PingPong Merchant ID | | signType | string | M | Supports MD5 , SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | M | Signature; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document. All parameters participate in the signature | | version | string | M | Version number, currently fixed at 1.0, may be adjusted with changes to the interface in the future | | bizContent | string | M | Collection of request parameters, with no limit on maximum length. Except for common request parameters, all other request parameters must be passed within this parameter, format: JSON string | | └─ requestId | string | M | Unique request ID, globally unique for merchant | | └─ requestTime | string | M | Merchant-side request time. Timestamp, in milliseconds | | └─ deviceSn | string | M | Device serial number, used to specify target POS machine | | └─ deviceModel | string | M | Device model, used to specify target POS machine | | └─ cmdType | string | M | Command type: Summary - Summary settlement; Settlement - Settlement; PrintLast - Print last transaction; | | └─ summary | object | O | Summary query parameters, required when cmdType=Summary | | └─ └─ skipSettleConfirm | string | C | Skip settlement confirmation; effectiveness depends on channel capability. Values: Y/N Default: Y If channel does not support password input, any value will be processed | | └─ └─ printTransaction | string | C | Y-Print; N-No print Values: Y/N Default: Y If channel does not support password input, any value will be processed | | └─ └─ needPassword | string | C | Need 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 | | └─ settlement | object | O | Settlement parameters, required when cmdType=Settlement | | └─ └─ skipSettleConfirm | string | C | Skip settlement confirmation; effectiveness depends on channel capability. Values: Y/N Default: Y If channel does not support password input, any value will be processed | | └─ └─ printTransaction | string | C | Y-Print; N-No print Values: Y/N Default: Y If channel does not support password input, any value will be processed | | └─ └─ needPassword | string | C | Need 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 | | └─ print | object | O | Print parameters, required when cmdType=PrintLast | | └─ └─ printCopyOption | string | C | Print copy option, default: DEFAULT | ### Request Example ```json { "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\"}}" } ``` ## Response Parameters | Parameter | Type | Description | |--------|------|------| | accId | string | Unique store identifier, which will appear in the response message after being added; inputting it means modifying the data | | clientId | string | PingPong merchant number | | signType | string | Supports MD5 , SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | Signature; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document. All parameters participate in the signature | | code | string | Result status code, see the appendix Status Code Table: /en/notes/appendix/successCodeList/ | | description | string | Result description | | bizContent | string | Business response parameters | | └─ requestId | string | Merchant request ID | | └─ cmdId | string | Command ID | | └─ cmdType | string | Command type: Summary - Summary settlement; Settlement - Settlement; PrintLast - Print last transaction; | | └─ status | string | Command processing status: PROCESSING - Processing; FAILED - Failed; SUCCESS - Successful; | ### Response Example ```json { "accId": "SP1234567890", "clientId": "P100001", "signType": "SHA256", "sign": "SIGNATURE_VALUE", "code": "001000", "description": "Successful request", "bizContent": "{\"requestId\":\"REQ20241101002\",\"cmdId\":\"CMD12346\",\"cmdType\":\"Settlement\",\"status\":\"PROCESSING\"}" } ```