Skip to main content

Same-terminal application integration

1. Introduction

The merchant's POS application runs at the same POS terminal. It can pull up checkout component to complete payment through the payment integration APIs of CodePay Register.

Overall structure of Same terminal application integration

1.1 Typical process workflow

Same terminal application integration workflow
  1. POS application send order info (include order number, amount) to CodePay Register app to pull payment checkout component.
  2. The checkout component of CodePay Register collects the bank card information/mobile wallet user payment voucher and processes it securely, then merges it and order information in the transaction data, and sends the payment request to CodePay Gateway .
  3. CodePay Gateway processes the transaction packet and sends to payment gateway or acquire system.
  4. Payment gateway or acquire system responses result to CodePay Gateway .
  5. CodePay Gateway responses transaction result to CodePay Register application.
  6. CodePay Register application returns transaction result to POS application.

1.2 Integration method

POS application uses Android Intent to interact with CodePay Register application. The following diagram shows the interactions between this 2 applications.

Same terminal application integration workflow integration method,POS application uses Android Intent to interact with CodePay Register application
  1. POS application call "startActivityForResult" function to invoke the CodePay Register application .
  2. CodePay Register application parse the bundle data from POS application and then process transaction.
  3. Then CodePay Register application call "setResult" function after the transaction and "finish" own Activity.
  4. POS application received the transaction result by "onActivityResult" event.

2. Transaction APIs

For detailed transaction APIs, please refer to V1 and V2.