Create payment order

Create a deposit order

POST https://<API ENDPOINT>/payment/deposit

To create an order for deposit

Headers

Name
Value

Content-Type

application/json

x-appid

<App ID>

x-signature

<Signature> (see quick start)

Body

Name
Type
Description

refId*

string

The unique id generate by agent

userId*

string

The userId use for indentify agent's user when receive a callback

amount*

Integer

the amount to deposit

accountName*

string

the account name

accountNo*

string

the account number

bankCode*

string

the bank code (see bank code table*)

timestamp*

ISO timestamp

ISO timestamp

extraParams

Object

Extra parameters will be pass when receive a callback

Response

Field Name
Type
Description

txn_id

string

Transaction ID (Use this transaction to reconsile with HuskyPay

ref_id

string

Agent unique Reference ID

amount

number (integer)

Desire amount to deposit

fee

number (decimal)

Fee of this transaction

method

string (enum)

"link+qrcode" or "link+transfer" or "link+qrcode+transfer" or "link"

link

string

link can be open as a popup, iframe

qrcode

object

{ qrcode_text: raw qrcode content link: link can be open as a popup, iframe qrcode_date_url: base64 image of qrcode }

transfer

object

{ bank_code: account_number: account_name:

amount: }

expires_in

number

number of seconds that this order will be invalid (default 900 seconds)

created_at

datetime

datetime format YYYY-MM-DD HH:mm:ss ex: 2024-05-20 22:10:00

Create a withdraw order

POST https://<API ENDPOINT>/payment/withdraw

Request Body

Name
Type
Description

refId*

string

The unique id generate by agent

userId*

string

The userId use for indentify agent's user when receive a callback

amount*

Integer

the amount to deposit

accountName*

string

the account name

accountNo*

string

the account number

bankCode*

string

the bank code (see bank code table*)

timestamp*

ISO timestamp

ISO timestamp

extraParams

Object

Extra parameters will be pass when receive a callback

{

  code: 0,
  data: {
     txnId: 'POXXXXXXXXXXXXX',
     refId: 'XXXXX-XXXXX',
     amount: 100,
     fee: 0,
     wallet: {
      balance: 100,
     },
   }
}

Last updated