NAV Navbar
Text Java

Introduction

HaoJin is a mobile phone software that provides aggregate collection services for merchants. This document describes the interface calls that HaoJin is open to, and third-party applications can implements the collection function through these interfaces. HaoJin supports below third-party functions:


1. Collection, Refund, Query Multiple Transaction Records, Query Transaction Details.
2. View Transaction Summary, Query Transaction Channel Configuration.
3. Sale/Void/Query/Adjust Endpoints for card.

Introduction

How to use

Add Permissions

Add the following code to the AndroidManifest.xml file. Note: In order to ensure that you can get permission, please install the haojin application first.

Add Permissions

Add Jar Package Dependency

Integrated the qfpay_haojin_api_xxx.jar file in the third party application.

Add Jar Package Dependency

Config Target Application Id

Config Target Application Id

Add Proguard Rule

Add follow code to the proguard-rules.pro file.

Add Proguard Rule

Third-party Interface Invoke Sample

Collection

Calling a collection request:

Collection

Refund

Calling a refund request:

Refund

Parse the return value:

Refund

Query Multiple Transaction

Calling a query request:

Query Multiple Transaction

Notes
1. Check the supported channels.
2. Only support querying of two transaction types (payment, refund)
3. Querying by time period has higher priority than querying by month.
4. The time format is "yyyy-MM-dd HH:mm:ss"
5. The month format is "yyyyMM"
6. Split page number starts from one.

Parse the return value:

Query Multiple Transaction

Query Transaction Details

Calling a query request:

Query Transaction Details

Parse the return value:

Query Transaction Details

View Transaction Summary

Calling a view transaction summary request:

View Transaction Summary

Parse the return value:

View Transaction Summary

Query Transaction Channel Configuration(Deprecated)

This interface has been marked as deprecated and can be replaced with the GetUserConfig interface. See Query User Configuration Information for details.
Calling a Query transaction channel configuration request:

Query Transaction Channel Configuration(Deprecated)

Parse the return value:

Query Transaction Channel Configuration(Deprecated)

Query User Configuration Information

Call a query user configuration information request:

Query User Configuration Information

Parse the return value:

Query User Configuration Information

Pre-authorization Transaction Deduction

Call a pre-authorization transaction deduction request:

Pre-authorization Transaction Deduction

Parse the return value:

Pre-authorization Transaction Deduction

Pre-authorization Transaction Cancel

Call pre-authorization transaction cancel request:

Pre-authorization Transaction Cancel

Parse the return value:

Pre-authorization Transaction Cancel

Pre-authorization Transaction List

Call pre-authorization transaction list request:

Pre-authorization Transaction List

Parse the return value:

Pre-authorization Transaction List

Pre-authorization Transaction Detail

Call pre-authorization transaction detail request:

Pre-authorization Transaction Detail

Parse the return value:

Pre-authorization Transaction Detail

Card Refund

Calling a refund request:

Card Refund

Parse the return value:

Card Refund

Query Multiple Card Transactions

Calling a query request:

Query Multiple Card Transactions

Parse the return value:

Query Multiple Card Transactions

Query Card Transaction Details

Calling a query request:

Query Card Transaction Details

Parse the return value:

Query Card Transaction Details Query Card Transaction Details

Card Adjust

Calling an adjust request:

Card Adjust

Parse the return value:

Card Adjust

Card Settle

Calling a settle request:

Card Settle

Parse the return value:

Card Settle

Appendix

Transaction Information Field Description

Field Name Type M/O Description
id String M Transaction idendity number
amt Long M Transaction Amount
time String M Transaction time yyy-MM-dd HH:mm:ss
channel String M Transaction channel like weixin, alipay
status Integer M Transaction status
type String M Transaction type, payment or refund
originId String O Original transaction id, mandatory if the transaction is refund
mchntName String M Sore name
remarks String O Transaction remarks
confirmCode String O Transaction confirmation code
operatorAccount String M Operator name
appCode String O Application code (swipe card)
customerId String O Idendity of customer wallet (pre-authorization)
customerAccount String O Account of customer wallet (pre-authorization)
completeTransId String O Newly generated transaction id when the pre-authorization transaction is completed (pre-authorization)
completeTime String O Complete time when the pre-authorization transaction is completed yyyy-MM-dd HH:mm:ss (pre-authorization)

Channel Information Field Description

Field Name Type M/O Description
name String M Channel name
desc String M Channel description

Transaction Status Field Description

Transaction Status Description
0 Normal transaction
-1/-2 Waiting for payment
-3 Failed
1 Reversal
2 Void
3 Refund
4 Partial Refund
5 Pre-authorization Frozen
6 Pre-authorization Unfrozen
7 Pre-authorization Completed

Result Code Description

Result Code Description
-1 Unknown error
0 Success
100 Client error
101 Amount error
102 AppId is empty
103 Order id is empty
104 Other parameter is empty
105 User cancel
106 Network error
107 User not logged in
108 Application not installed
109 Launch App failed
110 Non-support API invoke
111 Time period error
112 Cross-month query not allowed
113 Failed to get config info
114 Card adjust failed
115 Device does not support card swiping
116 Password input error
200 Server error
201 Order id does not exist
202 Transaction Failed
203 Insufficient account balance
204 Transaction is confirming
205 Login status expired
206 Refund is confirming
207 Refund Failed