Payment and FX

This is payment and FX page.

Institutional master account asset inquiry

REQUEST

  • GET /v1/banking/accounts

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": [{
    		"updated_at": 1680766830037, // update timestamp
    		"uid": "1640261905603092476",
    		"account_id": "1643881303550189569",
    		"currency": "AUD",
    		"balance": "800.00", // Available Balance
    		"frozen": "200.00" // frozen amount
    	}]
    }
    

User asset query

REQUEST

  • GET /v1/banking/users/{uid}

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    uidstringYuser id

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": [{
    		"updated_at": 1680766830037,
    		"uid": "1640261905603092476",
    		"account_id": "1643881303550189569",
    		"currency": "AUD",
    		"balance": "800.00",
    		"frozen": "200.00"
    	}]
    }
    

Account asset inquiry

REQUEST

  • GET /v1/banking/accounts/{account_id}

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    account_idstringYaccount id

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"updated_at": 1680766830037,
    		"uid": "1640261905603092476",
    		"account_id": "1643881303550189569",
    		"currency": "AUD",
    		"balance": "800.00",
    		"frozen": "200.00"
    	}
    }
    

Query the information needed to increase the payee

REQUEST

  • GET /v1/banking/beneficiaries/required-details

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    currencystringYcurrency code, ISO 4217 standard.
    beneficiary_typestringYpersonal or business

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": [{
    		"currency": "USD",
    		"fields": [{
    			"field": "account_name",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "first_name",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "last_name",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "mobile",
    			"required": true,
    			"regex": "",
    			"data_type": "phone"
    		}, {
    			"field": "region_country",
    			"required": true,
    			"regex": "",
    			"data_type": "country"
    		}, {
    			"field": "aba_routing_code",
    			"required": true,
    			"regex": "^[\\d ]{6,13}$",
    			"data_type": "number"
    		}, {
    			"field": "account_no",
    			"required": true,
    			"regex": "^[\\d ]+$",
    			"data_type": "number"
    		}, {
    			"field": "address_country",
    			"required": true,
    			"regex": "",
    			"data_type": "country"
    		}, {
    			"field": "address_state",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_suburb",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_address1",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_address2",
    			"required": false,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_postcode",
    			"required": false,
    			"regex": "^[\\d-A-Za-z]+$",
    			"data_type": "text"
    		}],
    		"beneficiary_type": "personal",
    		"payment_type": "local"
    	}, {
    		"currency": "USD",
    		"fields": [{
    			"field": "account_name",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "first_name",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "last_name",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "mobile",
    			"required": true,
    			"regex": "",
    			"data_type": "phone"
    		}, {
    			"field": "region_country",
    			"required": true,
    			"regex": "",
    			"data_type": "country"
    		}, {
    			"field": "swift_code",
    			"required": true,
    			"regex": "^[a-zA-Z0-9 ]{6,15}$",
    			"data_type": "text"
    		}, {
    			"field": "iban_no",
    			"required": true,
    			"regex": "^[a-zA-Z0-9 ]+$",
    			"data_type": "text"
    		}, {
    			"field": "address_country",
    			"required": true,
    			"regex": "",
    			"data_type": "country"
    		}, {
    			"field": "address_state",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_suburb",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_address1",
    			"required": true,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_address2",
    			"required": false,
    			"regex": "",
    			"data_type": "text"
    		}, {
    			"field": "address_postcode",
    			"required": false,
    			"regex": "^[\\d-A-Za-z]+$",
    			"data_type": "text"
    		}],
    		"beneficiary_type": "personal",
    		"payment_type": "swift"
    	}]
    }
    

Add payee

REQUEST

  • POST /v1/banking/beneficiaries

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request body Schema: application/json

  • Request body parameters:

    nametyperequireddescription
    uidstringYuser id
    currencystringYcurrency code, ISO 4217 standard.
    beneficiary_typestringYpersonal or business
    payment_typestringYeg: swift/bsb/local
    other required fields in '/banking/v1/beneficiaries/required-details' endpoint response.........

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"beneficiary_id": "1643890596203597824"
    	}
    }
    

Query payee by id

REQUEST

  • GET /v1/banking/beneficiaries/{beneficiary_id}

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    beneficiary_idstringYbeneficiary id

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"created_at": 1680769034801,
    		"id": "1643890596203597824",
    		"uid": "1643886388594307073",
    		"currency": "AUD",
    		"payment_type": "bsb",
    		"beneficiary_type": "personal",
    		"items": {
    			"bsb": "1500103756",
    			"last_name": "wang",
    			"account_no": "6222000200100101022",
    			"first_name": "zhiju",
    			"account_name": "zhiju wang"
    		}
    	}
    }
    

Query payee by condition

REQUEST

  • GET /v1/banking/beneficiaries

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    uidstringYuser id
    currencystringNcurrency code, ISO 4217 standard.
    beneficiary_typestringN
    payment_typestringN
    pageintegerNpage index, default: 1
    page_sizeintegerNpage size, default: 20

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"total": 1,
    		"page": 1,
    		"pages": 1,
    		"page_size": 10,
    		"records": [{
    			"created_at": 1680769034801,
    			"id": "1643890596203597824",
    			"uid": "1643886388594307073",
    			"currency": "AUD",
    			"payment_type": "bsb",
    			"beneficiary_type": "personal",
    			"items": {
    				"bsb": "1500103756",
    				"last_name": "wang",
    				"account_no": "6222000200100101022",
    				"first_name": "zhiju",
    				"account_name": "zhiju wang"
    			}
    		}]
    	}
    }
    

Delete payee

REQUEST

  • DELETE /v1/banking/beneficiaries/{beneficiary_id}

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    beneficiary_idstringYbeneficiary id

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok"
    }
    

Update payee

REQUEST

  • PUT /v1/banking/beneficiaries/{beneficiary_id}

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    beneficiary_idstringYbeneficiary id
  • Request body Schema: application/json

  • Request body parameters:

    nametyperequireddescription
    uidstringYuser id
    other required fields in '/banking/v1/beneficiaries/required-details' endpoint response.........

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok"
    }
    

Query payment fee

REQUEST

  • GET /v1/banking/transactions/payment/fee

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    uidstringYuser id
    account_idstringYaccount id
    beneficiary_idstringYbeneficiary id
    amountstringYpayment money
    currencystringYcurrency code, ISO 4217 standard.

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
        "uid": "1643886388594307073",	
    		"account_id": "1641274842719395842",
    		"beneficiary_id": "1641354937659166720",
    		"amount": "200.00",
    		"currency": "USD",
    		"fee": "2.00",
    		"fee_currency": "USD"
    	}
    }
    

Payment

REQUEST

  • POST /v1/banking/transactions/payment

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request body Schema: application/json

  • Request body parameters:

    nametyperequireddescription
    uidstringYuser id
    account_idstringYaccount id
    beneficiary_idstringYbeneficiary id
    referencestringYclient uuid (length <= 64)
    amountstringYpayment money
    currencystringYcurrency code, ISO 4217 standard.
    notestringNnote
    reasonstringNreason
    expired_atlongNaudit expired time
    charge_typestringNOUR or BEN or SHA (only SHA is available for now)

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"order_id": "1641379950806306816"
    	}
    }
    

Obtain the inter-account transfer fee of the same currency

REQUEST

  • GET /v1/banking/transactions/transfer/fee

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    source_account_idstringYsource account
    destination_account_idstringYdestination account
    amountstringYtransfer money

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"source_account_id": "1641274842719395842",
    		"destination_account_id": "1641274842719395844",
    		"amount": "200",
    		"fee": "0.00",
    		"fee_currency": "USD"
    	}
    }
    

Inter-account transfer of the same currency

REQUEST

  • POST /v1/banking/transactions/transfer

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request body Schema: application/json

  • Request body parameters:

    nametyperequireddescription
    source_account_idstringYsource account
    destination_account_idstringYdestination account
    referencestringYclient uuid (length <= 64)
    amountstringYpayment money
    notestringNnote
    reasonstringNreason
    expired_atlongNaudit expired time

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"order_id": "1641420203332079616"
    	}
    }
    

Obtain the exchange rate and handling fee

REQUEST

  • GET /v1/banking/transactions/fx/quote

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    sell_accountstringYsell account
    buy_accountstringYbuy account
    amountstringYexchange amount
    currencystringYcurrency code, ISO 4217 standard.

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"sell_account": "1641274842719395842",
    		"buy_account": "1641274842719395844",
    		"sell_amount": "200.00",
    		"buy_amount": "298.42",
    		"fee": "0.00",
    		"fee_currency": "USD",
    		"rate": "1.4921",
    		"sell_currency": "USD",
    		"buy_currency": "AUD"
    	}
    }
    

Submit currency exchange order

REQUEST

  • POST /v1/banking/transactions/fx

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request body Schema: application/json

  • Request body parameters:

    nametyperequireddescription
    sell_accountstringYsell account
    buy_accountstringYbuy account
    amountstringYexchange amount
    currencystringYcurrency code, ISO 4217 standard.
    referencestringYclient uuid (length <= 64)
    notestringNnote
    reasonstringNreason
    expired_atlongNexpired time
    typestringNMARKET or LIMIT (only MARKET is available for now)

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"order_id": "1641379950806306816"
    	}
    }
    

Order list query

REQUEST

  • GET /v1/banking/transactions

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    uidstringYtransaction user id
    account_idstringNtransaction account id
    currencystringYcurrency code, ISO 4217 standard.
    created_at_fromlongNtimestamp of query start time
    create_at_tostringNtimestamp of query end time
    amount_fromstringNquery minimum amount
    amount_tostringNquery maximum amount
    order_typestringNorder type string
    pageintegerNpage index, default: 1
    page_sizeintegerNpage size, default: 20

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"total": 2,
    		"page": 1,
    		"pages": 1,
    		"page_size": 20,
    		"records": [{
    			"created_at": 1680182324961,
    			"updated_at": 1680182325338,
    			"transaction_uid": "2",
    			"order_id": "1641429717678690304",
    			"client_order_id": "8d43184f46084850900d26a8f172829b",
    			"type": "FX",
    			"direct": "OUT",
    			"status": "ACCEPTED",
    			"payment_type": "exchange",
    			"sell_account": "1641274842719395842",
    			"sell_currency": "USD",
    			"sell_amount": "200.00",
    			"buy_account": "1641274842719395844",
    			"buy_currency": "AUD",
    			"buy_amount": "200.00",
    			"transaction_account": "1641274842719395842",
    			"transaction_currency": "USD",
    			"transaction_amount": "200.00",
    			"rate": "1.4921000000",
    			"fee_currency": "USD",
    			"fee": "0.00"
    		}, {
    			"created_at": 1680182504322,
    			"updated_at": 1680182504322,
    			"transaction_uid": "2",
    			"order_id": "1641430509059969024",
    			"client_order_id": "8d43184f46084850900d26a8f1728888",
    			"type": "FX",
    			"direct": "OUT",
    			"status": "ACCEPTED",
    			"payment_type": "exchange",
    			"sell_account": "1641274842719395842",
    			"sell_currency": "USD",
    			"sell_amount": "200.00",
    			"buy_account": "1641274842719395844",
    			"buy_currency": "AUD",
    			"buy_amount": "298.42",
    			"transaction_account": "1641274842719395842",
    			"transaction_currency": "USD",
    			"transaction_amount": "200.00",
    			"rate": "1.4921000000",
    			"fee_currency": "USD",
    			"fee": "0.00"
    		}]
    	}
    }
    

Query by order Id

REQUEST

  • GET /v1/banking/transactions/{order_id}

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    order_idstringYorder id

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    	"data": {
    		"created_at": 1680182324961,
    		"updated_at": 1680182325338,
    		"transaction_uid": "2",
    		"order_id": "1641429717678690304",
    		"client_order_id": "8d43184f46084850900d26a8f172829b",
    		"type": "FX",
    		"direct": "OUT",
    		"status": "ACCEPTED",
    		"payment_type": "exchange",
    		"sell_account": "1641274842719395842",
    		"sell_currency": "USD",
    		"sell_amount": "200.00",
    		"buy_account": "1641274842719395844",
    		"buy_currency": "AUD",
    		"buy_amount": "200.00",
    		"transaction_account": "1641274842719395842",
    		"transaction_currency": "USD",
    		"transaction_amount": "200.00",
    		"rate": "1.4921000000",
    		"fee_currency": "USD",
    		"fee": "0.00"
    	}
    }
    

Order review and approval

REQUEST

  • POST /v1/banking/transactions/{order_id}/approve

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    order_idstringYorder id

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    }
    

Order review and rejection

REQUEST

  • POST /v1/banking/transactions/{order_id}/reject

  • Request Headers:

    namevaluerequireddesc
    Content-Typeapplication/jsonYES
    Authorizationyour access_tokenYES
  • Request url parameters:

    nametyperequireddescription
    order_idstringYorder id
  • Request body Schema: application/json

  • Request body parameters:

    nametyperequireddescription
    remarkstringYremark

RESPONSE

  • Response body schema: application/json

  • Response body sample:

    {
    	"code": 0,
    	"msg": "Ok",
    }
    

Definitions

Response code

codemessage
0Ok
2001Internal Server Error
2002Bad Request
2003Already Existed
2004Beneficiary Not Found
2005Order Not Found
2006Account Not Found
2007Account Frozen
2008Operation Failed
2009Unsupported
2010Balance Not Enough
2011In Progress

Order Type

valuedescription
PAYMENTPayment order
TRANSFERInternal transfer order between accounts with the same currency
FX Foreignexchange order
REFUNDRefund order

Order Status

valuedescription
ACCEPTEDSystem accepted
WAIT_FOR_AUDITAwaiting approval
SUBMITTINGOrder processing
SUBMITTEDOrder processing
COMPLETEDCompleted
APPROVEDOrder approved
APPROVINGApproval in process
REJECTEDOrder rejected
REJECTINGRejection in process
CANCELLEDOrder cancelled
CANCELLINGCancellation in process
FAILEDFailed
CLOSEDClosed

Order Direct

valuedescription
INDeposit
OUTWithdrawal

Payment Type

valuedescription
innerInternal transfer indicator
cardCard payment
bsbBank-State-Branch (BSB) code
payIDPayID payment identifier
union_payUnionPay payment
localLocal bank transfer
alipayAlipay payment
swiftSWIFT transfer
bpayBPAY bill payment
exchangeForeign exchange (FX)

Beneficiary Type

valuedescription
personalpersonal
businesscompany

Charge Type

valuedescription
OUROur
BENBeneficiary
SHAShare