Business Processes
To make sure your services or client application works properly with Upay Web API, the following types of business processes need to be implemented:
Terminal Activation
Each Upay terminal needs to be activated before any transaction takes place. The terminal will get terminal_sn
and terminal_key
in successful activation response. The terminal is also responsible for saving and managing the terminal_sn
and terminal_key
which will be used for signing every transaction request.
Every terminal only needs to be activated once and only once.
Terminal Check-in
terminal_sn
and terminal_key
are like username and password to your terminal. To keep your terminals and transactions safe, we recommend terminal_key
s be updated on daily basis. Developers may select any time during the day to perform the check-in. But keep in mind that after each check-in, only current and last terminal_key
s are valid.
Transactions
Upay Web API supports the following transactions:
Pay: When a cashier uses Upay terminal to scan a customer's payment barcode; Upay will automatically figure out the payment service provider from the barcode.
Refund: Issue an order refund based on order serial number; Upay supports multiple refunds of a single order.
Revoke: Orders can be revoked within the day it is created.This API is not suggested to adopt.
Query: Get the latest order status information by submitting either your or Upay's order serial number.
Pre-create: Terminal (such as Website, vending machine, etc.) pre-creates the order with Upay terminal and show customer the QR code; customer scans the QR code with payment app to finish the transaction. Note: Upay Web API only returns the QR code value and URL; your service or client app is responsible for generating the QR code picture from the value or displaying the image using the URL.
Transaction Sequence Diagrams
Pay