Skip to main content

ECR Connection

1. Activate the ECR terminal device

1.1 Open and log in to the Wonder App, and switch to the relevant business.

1.2 Start the ECR terminal device, a QR code associated with the business will be presented on the device's screen. binding business store

1.3 Bind the ECR terminal device with the business using the Wonder App's barcode scanner.

1.4 Once the binding is successful, the device application will automatically redirect you to the device pairing page. Terminal device pairing

2. ECR terminal device pairing

2.1 Via Cloud

  1. Obtain a six-digit terminal device pairing code.

  2. Enter the pairing code into the customer's pairing page, which is similar to the following flow:

  3. Generate an AES256 Key using the pairing code

  4. Use the ECR terminal Device synchronization interface to obtain the Device SN of the ECR terminal device

  5. After obtaining the Device SN, pair the device using the pairing and confirmation pairing interfaces

Terminal device pairing

2.2 Via RS232

  1. Obtain a six-digit terminal device pairing code

  2. Enter the Pairing Code into the Customer's Pairing Page, which is similar to the following flow:

  3. Generate an AES256 Key using the pairing code

  4. After obtaining the device SN, pair the device using the pairing and confirmation pairing interfaces.

Terminal device pairing

2.3 Via Local Area Network

  1. Obtain a six-digit terminal device pairing code

  2. Enter the pairing code into the customer's pairing page, which is similar to the following flow:

  3. Generate an AES256 Key using the pairing code

  4. Enter the IP address and port

  5. After obtaining the device SN, pair the device using the pairing and confirmation pairing interfaces.

Terminal device pairing

3. Interface Protocol

3.1 Obtain device pairing information

After you obtain the 6-bit random number generated by the ECR terminal device, you generate the AES Key1 key through a certain algorithm. Through this secret key, you can obtain the current configuration information of the ECR terminal Device, such as: Device SN, IP address, port.

URL: https://api.wonder.app/v2/ecr/pairing/info

This request has no body

Example:

/*
Encrypt the original data:
{
"header": {
"requestID": "2c7f32e1-b9e4-4b34-96cc-15c51289f69b",
"clientDeviceSN": "126498561093",
"timestamp": "2025-11-12T10:11:04+00:00"
}
}
*/

{
"version": "2.0",
"action": "DeviceInfo",
"data": "WJq3v/ZX/aMMR45WFqfs9EUXMXYXYYzSxo7SkNX80Y2hL4HhG471eXFw81ikn0cFWH05k1cMA4OcJtxDhh3OCKLA85WwmAHWp3uVBKq0nqTVS+xcPlDIQg8W8taTrfku6d8KWi4HinX80/Yksx5meN1klIjlStY4I8GBA/ElO3t/MprwU33jG68xDXixNalB"
}

Response "data.body" structure

VariableTypeRequiredDescription
deviceStatusStringYPayment device transaction status: Free / Busy
Free: The current device is idle and available for new transactions;
Busy: The current device is occupied with an ongoing transaction and is not available for other transactions at the moment.
networkStatusStringYThe current network connection status of the payment device: Connected / Disconnected
softwareVersionStringYThe software version of the payment device
businessIDStringYThe response ID in the response Header is derived from the request ID in the request header.
Example:

/*
Encrypt the original data:
{
"header": {
"responseID": "2c7f32e1-b9e4-4b34-96cc-15c51289f69b",
"serverDeviceSN": "NEXGO-N96-1170270945",
"timestamp": "2025-11-12T10:12:04+00:00"
},
"body": {
"deviceStatus": "Free",
"networkStatus": "Connected",
"softwareVersion": "1.0.0(188)",
"businessID": "ff467f02-5b69-45f3-81aa-bffcca55fe8f"
}
}
*/

{
"version": "2.0",
"action": "DeviceInfo",
"data": "G6RaFsGPTiVzAYsUTu/gY/wIUdGoYnFoWxIXOwjoBx5bJelgkrMqYDKxicyD0ApBnxqcvr8+kcqCyI2a5oeFm4duqrKwjQdFVW29ggdvuzyMUoqmxJyM3KAkyXTWV1dSbMrDJknalfufODYpuFgV0BfxBdPVvh2EfxlegKza9DtskKZOO/uSLh9GGoMGMHZIC4HBFv6iFSE0Rp4AmhZx012RmkDHfy7lvdvbMaXe690Lytal4srXom0MQ3tpAcJ7FieiFqlS79GopPlAX2o3ZlLKOBsZwhylMvE0SgPbzu5VZXklWqTVBYotFy+GAlzA2LC9Z6MT68hdHI4RkWtlO1HPEnPuUg/VHNxoI0l1y6PWEQaOEb+E+INJmnN/sa4g"
}