Skip to main content

App call App Android SDK

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.

  1. View Transaction Summary, Query Transaction Channel Configuration.

  1. 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
note

  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

Reference

Transaction Information Field Description

AttributeTypeMandatoryDescription
idStringYesTransaction idendity number
amtLongYesTransaction Amount
timeStringYesTransaction time yyy-MM-dd HH:mm:ss
channelStringYesTransaction channel like weixin, alipay
statusIntegerYesTransaction status
typeStringYesTransaction type, payment or refund
originIdStringNoOriginal transaction id, mandatory if the transaction is refund
mchntNameStringYesSore name
remarksStringNoTransaction remarks
confirmCodeStringNoTransaction confirmation code
operatorAccountStringYesOperator name
appCodeStringNoApplication code (swipe card)
customerIdStringNoIdendity of customer wallet (pre-authorization)
customerAccountStringNoAccount of customer wallet (pre-authorization)
completeTransIdStringNoNewly generated transaction id when the pre-authorization transaction is completed (pre-authorization)
completeTimeStringNoComplete time when the pre-authorization transaction is completed yyyy-MM-dd HH:mm:ss (pre-authorization)

Channel Information Field Description

AttributeTypeMandatoryDescription
nameStringYesChannel name
descStringYesChannel description

Transaction Status Field Description

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

Result Code Description

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