--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/gmc/refund/index.md description: >- The GMC serial port refund interface is used to initiate refund requests for completed payment transactions. Communicates with POS devices via serial port, supporting both full and partial refunds. Employs SHA256 signature to ensure data security, with refund processing time varying by payment method, typically 3-7 business days. --- # GMC Serial Port Refund Interface ```apidef endpoint: POST /onsiteAcquirer/gmc/refund name: GMC Serial Port Refund Interface ``` The GMC serial port refund interface is used to initiate refund requests for completed payment transactions. Communicates with POS devices via serial port, supporting both full and partial refunds. Employs SHA256 signature to ensure data security, with refund processing time varying by payment method, typically 3-7 business days. ## 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 | M | Merchant refund order number, unique identifier, used to prevent duplicate refunds | | └─ merchantTransactionId | string | M | Original payment order number, must be a successfully paid order | | └─ amount | string | M | Refund amount, precision depends on currency, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ currency | string | M | Refund currency, must match original payment order currency, ISO 4217 three-letter currency code | | └─ remark | string | O | Refund remark, will be returned as is in the response | | └─ cashierDeviceId | string | M | Unique ID of the cash register device | ### Request Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "BAEA4D56D885D6BD449BFFA2D9F117ECEDA662C85197A19050CA0C18CC64B871", "version": "1.0", "event": "REFUND", "requestTime": "1683531500000", "bizContent": "{\"merchantRefundId\":\"MCH_REFUND_20231212001\",\"merchantTransactionId\":\"MCH_ORDER_20231212001\",\"amount\":\"100.00\",\"currency\":\"USD\",\"remark\":\"客户退货\",\"cashierDeviceId\":\"CASHIER_001\"}" } ``` ## 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 number | | └─ transactionRefundId | string | PingPong refund ID | ### Response Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "BAEA4D56D885D6BD449BFFA2D9F117ECEDA662C85197A19050CA0C18CC64B871", "event": "REFUND_ACCEPTANCE", "code": "0", "description": "退款受理成功", "requestTime": "1683531501000", "bizContent": "{\"requestId\":\"SAAS_REQ_20231212001\",\"transactionRefundId\":\"PPX_REFUND_202312120001\"}" } ```