--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/gmc/payQuery/index.md description: >- The GMC serial pay query interface is used to query the status and details of payment transactions. It communicates with POS devices through serial ports and supports querying transaction status, amount, time and other details by merchant order number or PingPong transaction ID. It adopts SHA256 signature to ensure data security and is suitable for reconciliation, status confirmation and other scenarios. --- # GMC Serial Pay Query Interface ```apidef endpoint: POST /onsiteAcquirer/gmc/payQuery name: GMC Serial Pay Query Interface ``` The GMC serial pay query interface is used to query the status and details of payment transactions. It communicates with POS devices through serial ports and supports querying transaction status, amount, time and other details by merchant order number or PingPong transaction ID. It adopts SHA256 signature to ensure data security and is suitable for reconciliation, status confirmation and other scenarios. ## 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 | C | Merchant transaction ID, required if transactionId is not provided | | └─ transactionId | string | C | PingPong transaction ID, required if merchantTransactionId is not provided | ### Request Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08", "version": "1.0", "event": "PAY_QUERY", "requestTime": "1683532500000", "bizContent": "{\"merchantTransactionId\":\"MCH_ORDER_20231212001\"}" } ``` ## 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 | | └─ requestId | string | Unique request ID | | └─ merchantTransactionId | string | Merchant transaction ID | | └─ transactionId | string | PingPong transaction ID | | └─ amount | string | Transaction amount, precision depends on currency, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ currency | string | Transaction currency, ISO 4217 three-letter currency code, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ transactionTime | string | Transaction initiation time, timestamp (milliseconds) | | └─ status | string | Transaction status: PROCESSING - Processing; SUCCESS - Success; FAILED - Failed; | | └─ transactionEndingTime | string | Transaction final state time, timestamp (milliseconds) | | └─ remark | string | Merchant extended fields, can be used to specify certain parameters, will be returned as is in the response | | └─ cardTransinfo | object | Card payment information, returned only for card payments | | └─ └─ acqBankName | string | POS card transaction acquiring bank name | | └─ └─ acqTermnialId | string | POS card transaction acquiring terminal ID | | └─ └─ acqMerchantId | string | POS card transaction acquiring merchant ID | | └─ └─ acqRRN | string | POS card transaction acquiring RRN (Retrieval Reference Number) | | └─ └─ acqStan | string | POS card transaction acquiring terminal trace number | | └─ └─ acqRspCode | string | POS card transaction acquiring response code | | └─ └─ acqRspMessage | string | POS card transaction acquiring response message | | └─ └─ acqBatchNumber | string | POS card transaction acquiring batch number | | └─ └─ acqInvoiceNumber | string | POS card transaction acquiring invoice number | | └─ └─ desensitizedCardNo | string | POS card transaction desensitized card number (first 6 and last 4 digits) | | └─ └─ issuerBankName | string | POS card transaction issuing bank name | | └─ └─ cardHolderName | string | POS card transaction cardholder name | ### Response Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08", "version": "1.0", "event": "PAY_QUERY_RESULT", "code": "0", "description": "查询受理成功", "requestTime": "1683532501000", "bizContent": "{\"requestId\":\"REQ_202312120001\",\"merchantTransactionId\":\"MCH_ORDER_20231212001\",\"transactionId\":\"PPX_TXN_202312120001\",\"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\"}}" } ```