Skip to main content

Latest Version

version 2.3.4.jar The SDK supports configurable scan modes:
  • CollectionReq.SCAN_TYPE_SCAN — Scan customer QR code
  • CollectionReq.SCAN_TYPE_QRCODE — Display QR code for customer to scan

Example

To force QR code display mode (e.g. static QR for customer scanning), use SCAN_TYPE_QRCODE.The default camera used is the rear camera.

Introduction

HaoJin is a mobile application that provides integrated payment collection for merchants. This SDK enables third-party apps to invoke HaoJin for payment operations. Supported capabilities:
  1. Payment, refund, transaction query, and transaction details
  2. Transaction summary and channel configuration retrieval
  3. Card transaction query, cancellation, and adjustment
Architecture Diagram

Installation & Setup

Required Permission

Add to AndroidManifest.xml:
HaoJin App must be installed on the device.

Integrate JAR

Download and place the SDK in /libs, then import in build.gradle. Download Latest SDK

Set Target App ID


Proguard Rules

Add to proguard-rules.pro:

API Usage

Create Trade API Instance


Collection (Payment)

Parse Result

The returned response may be null. Always perform a null check.

Refund

Parse


Query Transactions

Multiple Transactions

• Supported types: payment, refund
• Time format: yyyy-MM-dd HH:mm:ss
• Month format: yyyyMM
• Page index starts from 1
• Time range overrides monthly query

Transaction Detail


Transaction Summary


User Configuration

If user configuration cannot be retrieved, it may indicate an authorisation issue. Contact technical support.

Pre-authorisation

Suitable for scenarios such as hotel check-ins or equipment rental where funds are reserved and later captured or cancelled.

Deduct

Cancel

List

Detail


Card Operations

Card Refund

Card Settlement


Version History

v2.3.4

  • Added scan type configuration

v2.3.3

  • Added getOut_trade_no and getCardscheme methods

v2.3.2

  • External order number support
  • Configurable card swipe timeout

v2.3.1

  • Payment method selection support
  • Camera selection support