logo

API Reference

Authentication

Get Token

➡️
The API is used to obtain token, which is set on the request header. The token is expired after one hour, you can get the new token before the token expires or get a new token for requests.
  • URI
    • POST /payout/oauth/token
  • Body Param
    • REQUEST BODY SCHEMA: application/json
      Body Json Demo
      Name
      Type
      Required
      Description
      appKey
      string
      Required
      appkey; From xCurrency Hubs
      secretKey
      string
      Required
      secretKey; From xCurrency Hubs
  • Response
    • Name
      Type
      Required
      Description
      data
      string
      Conditional Required
      if the status is 1,the token is responded
      status
      string
      Required
      1 : Success -1: Error
      message
      string
      Conditional Required
      if the status is -1,the err message is responded
      Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo

Check

➡️
The API is used to verify the sign data, will return true when the sign data is correct, will return 10001 when the sign method error.
  • URI
    • POST /payout/encrypt/check
  • Body Params
    • Encrypted object, not necessarily dictionary type
      Body Json Demo
  • Response
    • Name
      Type
      Required
      Description
      status
      string
      Required
      1 : Success 10001: Failed to verify the signature
      message
      string
      Conditional Required
      if the status is 10001,the err message is responded
      Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo

Transfer

Create Transfer

➡️
The API is used to create a payment on xCurrency hubs, then orderNo should be unique, the same order number can create a payment once. When the http status is 400 and the response data has not tradeId mean that the payment is created failure on xCurrency Hubs' side, please check the response message or contact with xCurrency Hubs' team.
  • URI
    • POST /payout/payment/business/transfer/create
  • Body Params
    • Body Json Demo
      Name
      Type
      Required
      Description
      orderNo
      string
      Required
      Merchant Order No
      targetAmount
      float
      Required
      Target Amount
      targetCurrency
      string
      Required
      Target Currency ;
      paymentType
      string
      Conditional Required
      Payment Type ; When the targetCurrency is CNY, the field is required. Enum - DepositPayment - FullPayment - FinalPayment - Other
      logisticsCompany
      string
      Conditional Required
      Logistics company ; When the targetCurrency is CNY and paymentType is fullPayment and FinalPayment, the field is required.
      logisticsNumber
      string
      Conditional Required
      Logistics Number ; When the targetCurrency is CNY and paymentType is fullPayment and FinalPayment, the field is required.
      payer
      object
      The Payer
      payer → fullName
      string
      Required
      Full Name, Must be a business
      payer → accountNumber
      string
      Required
      Bank Account Number, Must be a business account
      payer → swiftCode
      string
      Conditional Required
      Bank Swift Code; When the targetCurrenncy is not CNY, the field is required.
      payer → address
      object
      Address
      payer → address → country
      string
      Optional
      The country where the payer is located
      payer → address → state
      string
      Optional
      The state where the payer is located
      payer → address → postCode
      string
      Optional
      The postCode where the payer is located
      payer → address → address
      string
      Conditional Required
      The address where the payer is located; When the targetCurrenncy is not CNY, the field is required.
      beneficiary
      object
      beneficiary → fullName
      string
      Required
      Full Name, Must be a business
      beneficiary → accountName
      string
      Required
      Bank Account Number, It can be a business account or a personal account
      beneficiary → accountNumber
      string
      Required
      Bank Account Number
      beneficiary → bankName
      string
      Conditional Required
      Account bank, need to be specific to the branch; When the targetCurrency is CNY and accountName is a business account, the field is required.
      beneficiary → idNumber
      string
      Conditional Required
      Chinese mainland resident ID card; When the targetCurrency is CNY and accountName is a personal account, the field is required.
      beneficiary → address
      object
      beneficiary → address → country
      string
      Optional
      The country where the beneficiary is located
      beneficiary → address → state
      string
      Optional
      The state where the beneficiary is located
      beneficiary → address → postCode
      string
      Optional
      The postCode where the beneficiary is located
      beneficiary → address → address
      string
      Conditional Required
      When the targetCurrenncy is not CNY, the field is required.
  • Response
    • Name
      Type
      Required
      Description
      status
      string
      Required
      1 : Success Other status please reference appendix
      message
      string
      Conditional Required
      if the status is not 1,the err message is responded
      data
      object
      Conditional Required
      data - tradeId
      string
      Required
      Uniqued id in the XC system
      data - status
      string
      Required
      string
      Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo

Async confirm transfer

➡️
This API is used to send CNY to the beneficiary's bank account, support concurrency.
  • URI
    • POST /payout/payment/business/transfer/async
  • Body Params
    • Body Json Demo
      Name
      Type
      Required
      Description
      tradeId
      string
      Required
      Uniqued id in the XC system
  • Response
    • Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo

Docs Upload

Upload File

➡️
Upload supporting material for business order
  • URI
    • POST /payout/payment/business/transfer/upload
  • Body Params
    • Body Json Demo
      Name
      Type
      Required
      Description
      tradeId
      string
      Required
      Uniqued id in the XC system
      fileBase64
      string
      Required
      File base64 str
      fileName
      string
      Required
      File name
  • Response
    • Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo

Upload Completed

➡️
Completed to upload supporting material for business order
  • URI
    • POST /payout/payment/business/transfer/upload/completed
  • Body Params
    • Body Json Demo
      Name
      Type
      Required
      Description
      tradeId
      string
      Required
      Uniqued id in the XC system
  • Response
    • Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo

Query

Query a transfer status

➡️
This API is used to query the order status
  • URI
    • GET /payout/payment/business/transfer/status
  • Body Params
    • Body Json Demo
      Name
      Type
      Required
      Description
      tradeId
      string
      Required
      Uniqued id in the XC system
  • Response
    • Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo
      Name
      Type
      Required
      Description
      status
      string
      Required
      1 : Success -1: Error for System
      message
      string
      Conditional Required
      The tradeId is not existed
      data
      object
      data → message
      string
      Required
      if status is failed rejected overrule , the message is the reason for the transfer failure
      data → status
      string
      Required

Query a FX

➡️
This API is used to query the fx real time
  • URI
    • GET /payout/payment/business/transfer/status
  • Body Params
    • Body Json Demo
      Name
      Type
      Required
      Description
      sourceCurrency
      string
      Required
      Currency you are sending; ex: USD、HKD、SGD
      targetCurrency
      string
      Required
      Target currency; ex: CNY
  • Response
    • Response Status : 200, Body Json Demo
      Response Status : 400, Body Json Demo
      Name
      Type
      Required
      Description
      status
      string
      Required
      1 : Success -1: Error for System
      message
      string
      Conditional Required
      The tradeId is not existed
      data
      object
      data → queryNo
      string
      Required
      Uniqued query fx id in the XC system,expired for 15s
      date → rate
      float
      Required
      Real rate