Structure

Model

UsbDeviceKey

Parameter name

Type

Required

Description

context

Context

Yes

Indicates the application-level context.

usbDevice

UsbDevice

Yes

Indicates the device connected to the Android system via USB.

Amount

Parameter name

Type

Required

Description

value

Integer

Yes

The amount value in the currency's smallest unit. For example, 10000 means 100.00 in SGD.

Value range: 0-2147483647

currency

String

Yes

The 3-character currency code that follows ISO-4217. For example, USD.

Maximum length: 3 characters

DiagnosisRequest

Parameter name

Type

Required

Description

N/AN/AN/AN/A

GlobalConfig

Parameter name

Type

Required

Description

timeout

Long

No

Indicates the global API call timeout duration, in milliseconds, defaults to 15000 milliseconds (15 seconds).

debug

Boolean

No

Indicates whether to print debug logs. Valid values are:

  • true: Print debug logs.
  • false: Default value. Do not print debug logs.

PayRequest

Parameter name

Type

Required

Description

paymentRequestId

String

Yes

The unique ID that is defined by a POS provider to identify a payment request.

  • Maximum length: 64 characters.
  • Only letters (a-z, A-Z), numbers (0-9), and underscores (_) are allowed.

Note: This parameter is unique for each store. This parameter is an idempotency key field. For payments that are initiated with the paymentRequestId, the same result is to be returned.

paymentMethod

String

YesThe payment method that is used to collect the payment by the merchant or acquirer. For the supported payment methods, see Supported payment methods.

paymentAmount

Amount

Yes

The payment amount that the merchant requests to receive in the order currency.

originalMerchantOrderId

String

No

The original and unique ID on the merchant end to identify an order.

Maximum length: 255 characters

originalMerchantStoreId

String

No

The original and unique ID on the merchant end to identify a store.

Maximum length: 255 characters

QueryPaymentRequest

Parameter name

Type

Required

Description

paymentRequestId

String

Yes

The unique ID that is defined by the POS provider to identify a payment request.

  • Maximum length: 64 characters.
  • Only letters (a-z, A-Z), numbers (0-9), and underscores (_) are allowed.

Note: This parameter is unique for each store. Call the inquiryPayment API with the paymentRequestId to query the payment status. Each call returns the latest payment result.

Receipt

Parameter name

Type

Required

Description

cashierReceipt

String

NoThe receipt provided for merchants displays the transaction information.

customerReceipt

String

No

The receipt provided for buyers displays the transaction information.

RequestOptions

Parameter name

Type

Required

Description

commandExecuteTimeout

Long

No

Indicates the API call timeout duration, in milliseconds. You can set a custom timeout for the API request. If not set, the default timeout is used. The default timeout of the diagnosis and inquiryPayment APIs is 15 seconds, and the pay API is 120 seconds.

Result

Parameter name

Type

Required

Description

resultStatus

String

Yes

The result status. Valid values are:

  • S: Successful
  • F: Failed
  • U: Unknown

resultCode

String

No

The result code.

Maximum length: 64 characters

resultMessage

String

No

The result message that describes the result code in detail.

Maximum length: 256 characters

Enum

ConnectListener

KeyDescription

onConnectSuccess

Indicates the successful connection between the POS and payment terminal.

onConnectFailure

Indicates the unsuccessful connection between the POS and payment terminal.