--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/gmc/query/index.md description: >- The GMC serial query interface is used to query the status and details of payment or refund transactions. Through serial port communication with POS devices, it supports querying transaction status, amount, time and other detailed information by merchant order number. It adopts SHA256 signature to ensure data security, suitable for scenarios such as reconciliation and status confirmation. --- # GMC Serial Query Interface ```apidef endpoint: POST /onsiteAcquirer/gmc/query name: GMC Serial Query Interface ``` The GMC serial query interface is used to query the status and details of payment or refund transactions. Through serial port communication with POS devices, it supports querying transaction status, amount, time and other detailed information by merchant order number. It adopts SHA256 signature to ensure data security, suitable for scenarios such as reconciliation and status confirmation. ## Request Parameters | Parameter | Type | Required | Description | |--------|------|------|------| | accId | string | M | Unique store identifier for the merchant in PingPong system | | clientId | string | M | PingPong merchant ID | | signType | string | M | Supports SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | M | Request signature, all parameters participate in signing, see Signature Specification: /en/notes/guide/sign/ | | version | string | M | Protocol version, currently 1.0 | | event | string | M | Event type, enum values: PAY - Payment; REFUND - Refund; PAY_QUERY - Transaction Query; REFUND_QUERY - Refund Query; CALCULATE - Settlement; REPRINT - Reprint; TRANSACTION_CANCEL - Transaction Cancel; HEARTBEAT - Heartbeat; | | requestTime | string | M | Request timestamp (milliseconds) | | bizContent | string | M | Business parameters JSON string, all request parameters except common request parameters must be passed within this parameter | | └─ merchantTransactionId | string | M | Merchant order number, can be payment order number or refund order number | | └─ transType | string | M | Transaction type, enum values: PAY - Payment; REFUND - Refund; | ### Request Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08", "version": "1.0", "event": "QUERY", "requestTime": "1683532500000", "bizContent": "{\"merchantTransactionId\":\"MCH_ORDER_20231212001\",\"transType\":\"PAY\"}" } ``` ## Response Parameters | Parameter | Type | Description | |--------|------|------| | accId | string | Unique store identifier for the merchant in PingPong system | | clientId | string | PingPong merchant ID | | signType | string | Supports SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | Response signature, all parameters participate in signing, see Signature Specification: /en/notes/guide/sign/ | | event | string | Event type, response enum values: PAY_ACCEPTANCE - Payment order acceptance; PAY_QUERY_RESULT - Payment query result; REFUND_ACCEPTANCE - Refund order acceptance; REFUND_QUERY_RESULT - Refund query result; | | requestTime | string | Merchant-side request time. Timestamp, to the millisecond | | code | string | Result status code, see the appendix Status Code Table: /en/notes/appendix/successCodeList/. The following are specific to POS serial port transactions: 0 - Acceptance success; -1 - Acceptance failure; 901001 - Transaction blocked, a transaction is already being processed; | | description | string | Result description | | bizContent | string | Business response parameters, JSON string | | └─ channelRequestId | string | PingPong transaction request ID | | └─ merchantTransactionId | string | Merchant order number | | └─ amount | string | Transaction amount | | └─ currency | string | Transaction currency | | └─ transactionTime | string | Transaction initiation timestamp | | └─ status | string | Transaction status: INIT - Initial state; PROCESSING - Processing; SUCCESS - Success; FAILED - Failed; AUTH_SUCCESS - Pre-authorization success; CANCEL - Pre-authorization cancelled; CLOSED - Order closed; | | └─ transactionEndingTime | string | Transaction final state timestamp | | └─ remark | string | Merchant extended fields returned as is | | └─ cardTransinfo | object | Card payment information, returned only for card payments | | └─ └─ acqBankName | string | Acquiring bank name | | └─ └─ acqTermnialId | string | Acquiring terminal ID | | └─ └─ acqMerchantId | string | Acquiring merchant ID | | └─ └─ acqRRN | string | Acquiring Retrieval Reference Number (RRN) | | └─ └─ acqStan | string | Acquiring System Trace Audit Number (STAN) | | └─ └─ acqRspCode | string | Acquiring transaction response code | | └─ └─ acqRspMessage | string | Acquiring transaction response message | | └─ └─ acqBatchNumber | string | Batch number | | └─ └─ acqInvoiceNumber | string | Invoice number | | └─ └─ desensitizedCardNo | string | Desensitized card number (first 6 last 4), e.g.: 123456******1234 | | └─ └─ issuerBankName | string | Issuing bank name | | └─ └─ cardHolderName | string | Cardholder name | ### Response Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08", "version": "1.0", "event": "QUERY_RESULT", "code": "000000", "description": "查询成功", "requestTime": "1683532501000", "bizContent": "{\"channelRequestId\":\"PPX_CHNL_202312120001\",\"merchantTransactionId\":\"MCH_ORDER_20231212001\",\"amount\":\"100.00\",\"currency\":\"USD\",\"transactionTime\":\"1683530496000\",\"status\":\"SUCCESS\",\"transactionEndingTime\":\"1683530496900\",\"remark\":\"测试订单\",\"cardTransinfo\":{\"acqBankName\":\"Bank of America\",\"acqTermnialId\":\"TERM001\",\"acqMerchantId\":\"MCHNT001\",\"acqRRN\":\"RRN001\",\"acqStan\":\"STAN001\",\"acqRspCode\":\"00\",\"acqRspMessage\":\"Approved\",\"acqBatchNumber\":\"BATCH001\",\"acqInvoiceNumber\":\"INV001\",\"desensitizedCardNo\":\"123456******1234\",\"issuerBankName\":\"Bank of America\",\"cardHolderName\":\"John Doe\"}}" } ```