Skip to main content

Cloud Mode Integration

Introduction

In the merchant store, if POS application is web-based it needs to interact with the cloud server in real time, so it is more convenient to choose the cloud API integration solution. The specific process is as follows:

Cross terminal application integration, Cloud mode integration detailed structure and flowchart
  1. POS application sends order info (include order id, total amount...) and terminal sn to POS server.
  2. POS server sends push-order request to PayCloud via OpenAPI.
  3. PayCloud received order info and precreate a transaction, then send a push-device-message request to WiseCloud.
  4. WiseCloud push message to Payment terminal via IoT communication protocol.
  5. Payment terminal received message and wake up WiseCashier application's checkout component to process transaction info. checkout packs bankcard info/mobile wallet user payment voucher into transaction data and send payment request to PayCloud.
  6. PayCloud processes the transaction packet and sends to payment gateway/acquire/processor/bank.
  7. Payment gateway/acquire/processor/bank response to PayCloud.
  8. PayCloud processes simultaneously:
    • Responses transaction result to WiseCashier application.
    • Sends an asynchronous transaction result request to POS server. (if failed, PayCloud will retry several times)
  9. POS server notifies transaction result to POS application and display payment result on the screen.

Sequence Diagram

1. Push Order To Terminal

Cross-terminal application integration,Cloud mode integration Sequence diagram 1: Push order to terminal
  1. The merchant POS application create an order and request payment from the POS server.
  2. POS server request Create Order API to push the order to the designated payment terminal.
  3. PayCloud create a pre-payment order with transaction status=9, and payment can be cancelled in this status. Please cancel through the Close Order API.
  4. PayCloud request WiseCloud to push the order to the specified payment terminal.
  5. WiseCloud accept order push request and return a successful response.
  6. PayCloud will respond to the POS server with transaction number, message id, and other information. POS server should store this information as a transaction voucher for future reconciliation or other operational needs.
  7. POS server start querying the transaction status of the order until it is successful or closed. Query Order API.
  8. POS server respond to POS application and redirect to the order waiting for payment result interface.

2. Terminal Payment

Cross-terminal application integration,Cloud mode integration Sequence diagram 2: Terminal payment
  1. WiseCloud is a cloud service that manages IOT devices for payment terminal. WiseCloud establishes a long connection communication with the terminal through MQTT. After WiseCloud receives the payment order from PayCloud, it sends the payment order message to the designated payment terminal and wakes up WiseCashier to start the payment processing process and interface.
  2. WiseCashier receives payment data from cardholders or mobile wallets and requests PayCloud to process payments.
  3. PayCloud receives a payment request and changes the order status to pending payment. At this time, the POS server can not call the order cancellation API to close the order.
  4. PayCloud request payment processing institutions such as payment gateway/acquire/processor/bank to process bank card payments or mobile wallet payments.
  5. Response to transaction results.
  6. Modify the transaction status of the local database to success or failure.
  7. Asynchronous notification of order payment results to the POS server. The POS server should receive the notification and verify the notification data, and modify the local order transaction status. For detailed processing procedures, please refer to the Transaction result notification.
  8. PayCloud returns the payment result to WiseCashier.
  9. WiseCashier displays payment results on the screen, prints receipts, sends bills, etc., and the transaction process ends.

Development Guidelines

Access Our APIs

Please refer to the Cloud APIs in the table below, which provide SDKs in multiple languages. For more information, please visit the SDK section .

Accessing these APIs requires obtaining some parameters in advance, and you also need to understand more rules for API access. Please refer to the Payment gateway integration guide.

Function List Type Description
Create orderAPISubmit payment orders through this api
Close orderAPIClose unpaid orders through this api
Query orderAPIQuery the transaction result (Purchase/Pre-authorization/Pre-auth Completion) of a positive transaction order through this api
Query refundAPIQuery the transaction results of negative transaction orders (Purchase cancellation/Pre-auth Cancellation/Refund/Pre-auth Completion Cancellation/Pre-auth Completion Refund) through this api
Transaction result notificationWebhookAfter the transaction, notify the merchant through this webhook to tell the merchant the result of the transaction

Application Install And Setting

Before this, please install the application "WiseCashier" on the Payment terminal, start the app, and click on "Settings ->General ->ECR Hub" in sequence. Set the connection mode to "Cloud", as shown in the following figure:

Application install and setting, set the connection mode to 'Cloud'

Returning to the main interface, the example images of successful and failed connections are as follows:

Application install and setting, set the connection mode to 'Cloud', graphic effect when successfully connected to the internet
Application install and setting, set the connection mode to 'Cloud', graphic effect when network failure occurs