Skip to main content

Cloud communication

With cloud communication, your POS app and the CodePay terminal talk to each other over the internet:

  1. Your POS app sends an API request to the CodePay platform.
  2. The CodePay platform sends the request to the CodePay terminal to start the payment.
  3. The terminal sends the transaction back to CodePay for processing.
  4. You will receive the transaction result in:
  • Asynchronous: The POS app sends the request and closes the connection.
  • The result is received later through an event notification or a transaction status request.
note
Cross terminal application integration, Cloud mode integration detailed structure and flowchart

Development guidelines

Before using these APIs, you need to get some required parameters and understand the access rules. Please refer to the API secure .

Enable Terminal ECR mode for cloud communication

Before using the REST API in the CodePay terminal, you need to enable it:

  1. Log in to the CodePay Register app on the terminal.
  2. Click the side menu, go to Settings > General > ECR Hub.
  3. Enable the ECR Hub, and select Cloud.
  4. Return to standby page.

Check the Cloud communication APIs in the table below.

Function List Type Description
Create orderAPISubmit payment orders through this api.
Close orderAPIClose unpaid orders through this api.
Query orderAPIRetrieve a specific transaction, using the merchant_order_no of that payment.
Refund a paymentAPIReferenced refunds are connected to the original payment, using the merchant_order_no of that payment.
Void a paymentAPICancels the authorisation on a payment that has not yet been captured.
Tip AdjustmentAPIAdd or adjust a tip to an existing payment. For example, the merchant can enter a tip amount written on a receipt.
Batch CloseAPIManually closeout the current batch of transactions.