--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/gmc/pay/index.md description: >- The GMC serial payment interface is used to complete payment transactions by communicating with POS devices through serial ports. It supports creating orders and executing payments immediately, suitable for offline payment scenarios where SAAS cash register systems integrate with POS devices. It adopts serial communication protocols and SHA256 signatures to ensure data security, and supports passing customer information and product information. --- # GMC Serial Payment Interface ```apidef endpoint: POST /onsiteAcquirer/gmc/pay name: GMC Serial Payment Interface ``` The GMC serial payment interface is used to complete payment transactions by communicating with POS devices through serial ports. It supports creating orders and executing payments immediately, suitable for offline payment scenarios where SAAS cash register systems integrate with POS devices. It adopts serial communication protocols and SHA256 signatures to ensure data security, and supports passing customer information and product information. ## 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 | | └─ requestId | string | M | Unique request number, globally unique | | └─ captureDelayHours | integer | M | 0=immediate capture, -1=manual capture, local payments do not support manual capture | | └─ merchantTransactionId | string | M | Merchant order number, unique identifier for the order, can be used for subsequent order queries and reconciliation | | └─ amount | string | M | Transaction amount, precision depends on currency, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ currency | string | M | Transaction currency, ISO 4217 three-letter currency code, see Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ tipsAmount | string | O | Tips amount, already included in amount, recorded separately here for information | | └─ shopperIp | string | M | User IP address for order placement, supports IPv4 format | | └─ paymentMethod | string | M | Specified payment method, provided by PingPong | | └─ timeExpire | string | O | Order expiration time. 1 minute to 3 days (less than 1 minute defaults to 1 minute, more than 3 days defaults to 3 days), defaults to 3 days if not provided. Timestamp format, unit: seconds | | └─ tradeCountry | string | O | Transaction country two-letter code, defaults to countries supported by PingPong, see Country Codes: /en/notes/appendix/countryCode/ | | └─ notificationUrl | string | O | Custom notification URL for this transaction result by the merchant. URL recommendation: use a complete URL with a publicly reachable domain name. Standard web ports are recommended (HTTPS defaults to 443 and HTTP defaults to 80). Ensure the URL can reliably receive PingPongCheckout asynchronous notifications. | | └─ remark | string | O | Merchant extended fields, can be used to specify certain parameters, will be returned as is in the response | | └─ customer | object | O | Customer information | | └─ └─ firstName | string | O | First name | | └─ └─ lastName | string | O | Last name | | └─ └─ email | string | O | Email | | └─ └─ phone | string | O | Contact phone number | | └─ └─ birthDate | string | O | Date of birth, format: YYYY-MM-DD | | └─ └─ identificationType | string | O | Identification type (required for specific countries, such as Mexico) | | └─ └─ identificationId | string | O | Identification number (required for specific countries, such as Mexico) | | └─ goods | array | O | Product information list | | └─ └─ name | string | O | Product name | | └─ └─ description | string | O | Product description | | └─ └─ sku | string | O | Product SKU, product code | | └─ └─ unitPrice | string | O | Unit price of the product | | └─ └─ number | string | O | Quantity purchased | | └─ └─ imgUrl | string | O | Product image link | | └─ └─ virtualProduct | string | O | Whether it is a virtual product, enum: Y/N | ### Request Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08", "version": "1.0", "event": "PAY", "requestTime": "1683530496000", "bizContent": "{\"requestId\":\"SAAS_REQ_20231212001\",\"captureDelayHours\":0,\"merchantTransactionId\":\"MCH_ORDER_20231212001\",\"amount\":\"100.00\",\"currency\":\"USD\",\"tipsAmount\":\"5.00\",\"shopperIp\":\"192.168.1.100\",\"paymentMethod\":\"ShowCode\",\"timeExpire\":\"1683616896\",\"tradeCountry\":\"US\",\"notificationUrl\":\"https://merchant.com/notify\",\"remark\":\"测试订单\",\"customer\":{\"firstName\":\"John\",\"lastName\":\"Doe\",\"email\":\"john.doe@example.com\",\"phone\":\"+8613800138000\",\"birthDate\":\"1990-01-01\"},\"goods\":[{\"name\":\"iPhone 15\",\"description\":\"智能手机\",\"sku\":\"IPHONE15-128G\",\"unitPrice\":\"100.00\",\"number\":\"1\",\"imgUrl\":\"https://example.com/iphone15.jpg\",\"virtualProduct\":\"N\"}]}" } ``` ## 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 | | └─ transactionId | string | PingPong transaction ID | ### Response Example ```json { "accId": "PPX_ACC_202312001", "clientId": "PPX_MCH_20230001", "signType": "SHA256", "sign": "BAEA4D56D885D6BD449BFFA2D9F117ECEDA662C85197A19050CA0C18CC64B871", "event": "PAY_ACCEPTANCE", "code": "0", "description": "受理成功", "requestTime": "1683530497000", "bizContent": "{\"requestId\":\"SAAS_REQ_20231212001\",\"transactionId\":\"PPX_TXN_202312120001\"}" } ```