--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/gmc/refundQuery/index.md description: >- The GMC serial refund query interface is used to query the status and details of refund transactions. It communicates with POS devices through serial ports and supports querying refund status, amount, time and other details by merchant refund ID or PingPong refund ID. It adopts SHA256 signature to ensure data security and is suitable for refund reconciliation, status confirmation and other scenarios. --- # GMC Serial Refund Query Interface ```apidef endpoint: POST /onsiteAcquirer/gmc/refundQuery name: GMC Serial Refund Query Interface ``` The GMC serial refund query interface is used to query the status and details of refund transactions. It communicates with POS devices through serial ports and supports querying refund status, amount, time and other details by merchant refund ID or PingPong refund ID. It adopts SHA256 signature to ensure data security and is suitable for refund 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 | | └─ merchantRefundId | string | C | Merchant refund ID, required if transactionRefundId is not provided | | └─ transactionRefundId | string | C | PingPong refund ID, required if merchantRefundId is not provided | ### Request Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08", "version": "1.0", "event": "REFUND_QUERY", "requestTime": "1683532500000", "bizContent": "{\"merchantRefundId\":\"MCH_REFUND_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 | | └─ merchantRefundId | string | Merchant refund ID | | └─ transactionRefundId | string | PingPong refund ID | | └─ amount | string | Refund amount, precision depends on currency, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ currency | string | Refund currency, ISO 4217 three-letter currency code, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ transactionTime | string | Transaction initiation time, timestamp (milliseconds) | | └─ status | string | Refund status: PROCESSING - Processing; SUCCESS - Success; FAILED - Failed; | | └─ 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": "REFUND_QUERY_RESULT", "code": "0", "description": "查询受理成功", "requestTime": "1683532501000", "bizContent": "{\"requestId\":\"REQ_202312120001\",\"merchantTransactionId\":\"MCH_ORDER_20231212001\",\"merchantRefundId\":\"MCH_REFUND_20231212001\",\"transactionRefundId\":\"PPX_REFUND_202312120001\",\"amount\":\"50.00\",\"currency\":\"USD\",\"transactionTime\":\"1683531500000\",\"status\":\"SUCCESS\",\"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\"}}" } ```