Payment and FX
This is payment and FX page.
Institutional master account asset inquiry
REQUEST
GET /v1/banking/accounts
Request Headers:
name value required desc Content-Type application/json YES Authorization your access_token YES
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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description uid string Y user 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description account_id string Y account 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description currency string Y currency code, ISO 4217 standard. beneficiary_type string Y personal 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request body Schema: application/json
Request body parameters:
name type required description uid string Y user id currency string Y currency code, ISO 4217 standard. beneficiary_type string Y personal or business payment_type string Y eg: 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description beneficiary_id string Y beneficiary 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description uid string Y user id currency string N currency code, ISO 4217 standard. beneficiary_type string N payment_type string N page integer N page index, default: 1 page_size integer N page 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description beneficiary_id string Y beneficiary 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description beneficiary_id string Y beneficiary id Request body Schema: application/json
Request body parameters:
name type required description uid string Y user 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description uid string Y user id account_id string Y account id beneficiary_id string Y beneficiary id amount string Y payment money currency string Y currency 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request body Schema: application/json
Request body parameters:
name type required description uid string Y user id account_id string Y account id beneficiary_id string Y beneficiary id reference string Y client uuid (length <= 64) amount string Y payment money currency string Y currency code, ISO 4217 standard. note string N note reason string N reason expired_at long N audit expired time charge_type string N OUR 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description source_account_id string Y source account destination_account_id string Y destination account amount string Y transfer 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request body Schema: application/json
Request body parameters:
name type required description source_account_id string Y source account destination_account_id string Y destination account reference string Y client uuid (length <= 64) amount string Y payment money note string N note reason string N reason expired_at long N audit 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description sell_account string Y sell account buy_account string Y buy account amount string Y exchange amount currency string Y currency 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request body Schema: application/json
Request body parameters:
name type required description sell_account string Y sell account buy_account string Y buy account amount string Y exchange amount currency string Y currency code, ISO 4217 standard. reference string Y client uuid (length <= 64) note string N note reason string N reason expired_at long N expired time type string N MARKET 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description uid string Y transaction user id account_id string N transaction account id currency string Y currency code, ISO 4217 standard. created_at_from long N timestamp of query start time create_at_to string N timestamp of query end time amount_from string N query minimum amount amount_to string N query maximum amount order_type string N order type string page integer N page index, default: 1 page_size integer N page 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description order_id string Y order 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description order_id string Y order 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:
name value required desc Content-Type application/json YES Authorization your access_token YES Request url parameters:
name type required description order_id string Y order id Request body Schema: application/json
Request body parameters:
name type required description remark string Y remark
RESPONSE
Response body schema: application/json
Response body sample:
{ "code": 0, "msg": "Ok", }
Definitions
Response code
| code | message |
|---|---|
| 0 | Ok |
| 2001 | Internal Server Error |
| 2002 | Bad Request |
| 2003 | Already Existed |
| 2004 | Beneficiary Not Found |
| 2005 | Order Not Found |
| 2006 | Account Not Found |
| 2007 | Account Frozen |
| 2008 | Operation Failed |
| 2009 | Unsupported |
| 2010 | Balance Not Enough |
| 2011 | In Progress |
Order Type
| value | description |
|---|---|
| PAYMENT | Payment order |
| TRANSFER | Internal transfer order between accounts with the same currency |
| FX Foreign | exchange order |
| REFUND | Refund order |
Order Status
| value | description |
|---|---|
| ACCEPTED | System accepted |
| WAIT_FOR_AUDIT | Awaiting approval |
| SUBMITTING | Order processing |
| SUBMITTED | Order processing |
| COMPLETED | Completed |
| APPROVED | Order approved |
| APPROVING | Approval in process |
| REJECTED | Order rejected |
| REJECTING | Rejection in process |
| CANCELLED | Order cancelled |
| CANCELLING | Cancellation in process |
| FAILED | Failed |
| CLOSED | Closed |
Order Direct
| value | description |
|---|---|
| IN | Deposit |
| OUT | Withdrawal |
Payment Type
| value | description |
|---|---|
| inner | Internal transfer indicator |
| card | Card payment |
| bsb | Bank-State-Branch (BSB) code |
| payID | PayID payment identifier |
| union_pay | UnionPay payment |
| local | Local bank transfer |
| alipay | Alipay payment |
| swift | SWIFT transfer |
| bpay | BPAY bill payment |
| exchange | Foreign exchange (FX) |
Beneficiary Type
| value | description |
|---|---|
| personal | personal |
| business | company |
Charge Type
| value | description |
|---|---|
| OUR | Our |
| BEN | Beneficiary |
| SHA | Share |