--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/en/notes/api/services/InPersonPayments/unifiedPay/index.md description: >- The order creation and payment interface provides functions for creating orders and executing payments immediately. It is suitable for online business scenarios that require quick completion of the process from order placement to payment collection. It supports major global currencies and covers various payment methods including credit cards and local payment methods. Key parameters include merchant ID, order amount, product description, etc. Through this API, merchants can simplify the shopping process and enhance user experience. --- # Order Creation and Payment Interface ```apidef endpoint: POST /onsiteAcquirer/payment/unifiedPay name: Order Creation and Payment Interface ``` The order creation and payment interface provides functions for creating orders and executing payments immediately. It is suitable for online business scenarios that require quick completion of the process from order placement to payment collection. It supports major global currencies and covers various payment methods including credit cards and local payment methods. Key parameters include merchant ID, order amount, product description, etc. Through this API, merchants can simplify the shopping process and enhance user experience. ## Request Parameters | Parameter | Type | Required | Description | |--------|------|------|------| | accId | string | M | Unique identifier for the store, which will appear in the response message after creation; inputting it means modifying the data | | clientId | string | M | PingPong Merchant ID | | signType | string | M | Supports MD5 , SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | M | Signature; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document. All parameters participate in the signature | | version | string | M | Version number, currently fixed at 1.0, may be adjusted with changes to the interface in the future | | bizContent | string | M | Collection of request parameters, with no limit on maximum length. Except for common request parameters, all other request parameters must be passed within this parameter, format: JSON string | | └─ requestId | string | M | Unique request number, globally unique | | └─ requestTime | string | M | Merchant-side request time. Timestamp, in milliseconds | | └─ captureDelayHours | integer | C | 0 indicates immediate capture; -1 indicates manual capture, after successfully calling the order creation API, you also need to call the pre-authorization capture: /notes/zh/checkout/api/modifications/capture/, not supported for local payments; | | └─ deviceSn | string | M | Device serial number, used to specify the target POS machine for payment | | └─ deviceModel | string | M | Device model, used to specify the target POS machine for payment | | └─ merchantTransactionId | string | M | Order number on the merchant's website, a unique identifier for the order, can be used for subsequent order inquiries and reconciliation | | └─ amount | string | M | Transaction amount, the precision depends on the currency, please refer to the appendix Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ currency | string | M | Transaction currency, ISO 4217 three-letter code, specific supported currencies see appendix Transaction Currencies: /en/notes/appendix/transactionCurrency/ | | └─ cashierDeviceId | string | M | Unique ID of the cash register device | | └─ shopperIp | string | M | User IP address for placing an order, supports IPv4 format | | └─ paymentMethod | string | M | Specified payment method, optional values: Card Purchase - Card swipe payment; QR-POSScan - B scan C payment; QR Payment - C scan B payment; Octopus - Octopus card payment (Hong Kong); | | └─ timeExpire | string | M | Order expiration time. 1 minute to 3 days (if less than 1 minute, it defaults to 1 minute; if more than 3 days, it defaults to 3 days). If not provided, it defaults to 3 days. Timestamp format, unit: seconds, example value: 1683530496 | | └─ tradeCountry | string | M | Used to specify the transaction country ISO A2 code (ISO 3166-1 alpha-2 standard), defaults to countries supported by PingPong, two-letter codes see appendix Country Codes: /en/notes/appendix/countryCode/ | | └─ notificationUrl | string | O | Custom notification URL for this transaction result by the merchant | | └─ remark | string | O | Merchant extended fields, can be used to specify certain parameters, will be returned as is in the response body | | └─ customer | object | O | Customer information | | └─ └─ firstName | string | O | User first name | | └─ └─ lastName | string | O | User last name | | └─ └─ email | string | O | User email | | └─ └─ phone | string | O | User contact phone number | | └─ └─ birthDate | string | O | Date of birth, format YYYY-MM-DD | | └─ └─ identificationType | string | O | Type of user identification (required for specific countries, such as Mexico) | | └─ └─ identificationId | string | O | User identification number (required for specific countries, such as Mexico) | | └─ goods | array | O | Product information | | └─ └─ name | string | O | Product name | | └─ └─ description | string | O | Product description | | └─ └─ sku | string | O | Product code, product SKU | | └─ └─ unitPrice | string | O | Unit price of the product | | └─ └─ number | string | O | Quantity purchased | | └─ └─ imgUrl | string | O | Main image link of the product | | └─ └─ virtualProduct | string | O | Whether it is a virtual product, virtual goods (Y/N) | ### Request Example ```json { "accId": "2018092520455210043243", "bizContent": "{\"requestId\":\"REQ-15ZSIRMPKT1748591387687\",\"requestTime\":\"1748591387687\",\"timeExpire\":\"1748591687\",\"captureDelayHours\":\"0\",\"deviceSn\":\"NEC300067041\",\"deviceModel\":\"N950S\",\"amount\":\"121.23\",\"currency\":\"MYR\",\"paymentMethod\":\"QR Payment\",\"cashierDeviceId\":\"111\",\"shopperIp\":\"47.98.1.1\",\"merchantTransactionId\":\"PMT-15ZSIRMPKT1748591387687\",\"tradeCountry\":\"MY\",\"notificationUrl\":\"https://test-acquirerpay.pingpongx.com/qa/result.html\",\"remark\":\"payment test\"}", "clientId": "2018092520455210043", "sign": "C578137C7009700927502B1EAFB425893980832DDFC02434AD957FD364D9DE9D", "signType": "SHA256", "version": "1.0" } ``` ## Response Parameters | Parameter | Type | Description | |--------|------|------| | accId | string | Unique store identifier, which will appear in the response message after being added; inputting it means modifying the data | | clientId | string | PingPong merchant number | | signType | string | Supports MD5 , SHA256; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document | | sign | string | Signature; for details, see the Signature Specification: /en/notes/guide/sign/ section of this document. All parameters participate in the signature | | code | string | Result status code, see the appendix Status Code Table: /en/notes/appendix/successCodeList/ | | description | string | Result description | | bizContent | string | Business response parameters | | └─ transactionId | string | PingPong transaction number | | └─ merchantTransactionId | string | Merchant website transaction number | | └─ qrCode | string | QR code encoding. Used for QR code payment scenarios, this code can be converted into a QR code image for display | | └─ qrUrl | string | QR code address. Used for QR code payment scenarios, to display the QR code | | └─ qrCodeExpired | string | QR code expiration time, in timestamp format, unit: seconds | | └─ remark | string | Merchant extended field | ### Response Example ```json { "accId": "2018092520455210043243", "bizContent": "{\"qrCodeExpired\":\"1748591687\",\"qrCode\":\"00020201021226580014A000000615000101065016640226100101570045614O01BDLA00015204539953034585406121.235802MY5925PINGPONG PAYMENT MALAYSIA6002MY62630120OS2025053001100002010311O01BDLA00010620OS20250530011000020182648305FDCB588DA5B1EDC5588660398CF3D8D3036F54F99A8B1710D4B04DBE5B066304FB33\",\"merchantTransactionId\":\"PMT-15ZSIRMPKT1748591387687\",\"remark\":\"payment test\",\"transactionId\":\"OS202505300010000201\"}", "clientId": "2018092520455210043", "code": "002000", "description": "Transaction processing" } ```