Withdraw Funds

Withdrawal is the process of removing funds from a wallet.

KYC Level 0 users are not allowed to Withdraw. Different Withdrawal channels are available in different countries. Users can only withdraw an amount less than or equal to their balance, which would also not cause them to exceed their cumulative withdrawal limit.

/withdraw/query

  • Your app calls /withdraw/query for a particular user and the Wallet Engine returns a list of the withdrawal channels available for the country the user lives in. It also returns the costs and timelines involved in those withdrawal channels, and the maximum amount which that user can Withdraw according to their limits.

/withdraw/channels

  • Lists the Withdrawal channels available in any specified country.

The user selects which Withdrawal channel they want to use, how much they want to withdraw, and follow the appropriate steps according to what kind of transaction is involved.

/withdraw/bank

  • Withdraw via traditional bank transfer.

/withdraw/query

POST https://sandbox.walletengine.io/api/withdraw/query

Call this API to find out how much the user is allowed to withdraw, which Withdrawal channels are available to the user (depending on their country of residence), as well as the charges and the expected timescale for those Withdrawal channels.

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id

string

This is the unique App ID assigned to you by Wallet Engine.

{
  "kyc": {
    "kyc_level": 1,
    "kyc_status": "OK",
    "balance": 10,
    "debit_cumulative": 4995,
    "debit_remainder_allowance": 5,
    "balance_remainder_allowance": 990
  },
  "channels_available": [
    // refer to: withdraw/channels
  ],
  "debit_allowed": 5,
}

Example Request

{
  "app_id": "86509b0699ae"
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

kyc_level_unqualified

The current KYC Level is L0, and the user can not withdraw.

debit_remainder_empty

The withdrawal remainder allowance is empty.

/withdraw/channels

POST https://sandbox.walletengine.io/api/withdraw/channels

Call /withdraw/channels to get a list of the available Withdrawal channels in any particular country. As an app developer you could offer the user a choice of which country details to display, or perhaps begin with their country of residence, or even use geolocation to understand which country they are currently in and submit that country code. The channels available in the users country of residence were returned by /withdraw/query, but /withdraw/channels is useful particularly if the user is travelling abroad. The fees involved and the delivery times of each Withdrawal channel are listed in the responses.

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id

string

This is the unique App ID assigned to you by Wallet Engine.

country_loc_code

string

The country for which the Withdrawal channels are requested. It should be provided as a two characters ISO code. If a country_loc_code is not provided then the results for the country of residence (country_res_code) are returned. https://countrycode.org/

{
  "channels": [
    {
      "title": "Bank",
      "logo_url": "Logo-Bank.png",
      "fee": 0.01,
      "channel": "debit_bank",
      "delivery_time": "1 day",
      "method": "withdraw/bank",
      "status": "active",
      "variables": [
        "bank_name",
        "bank_code",
        "bank_branch_code",
        "account_name",
        "account_number",
        "iban_code",
        "swift_code"
      ]
    },
    {
      "title": "HSBC",
      "logo_url": "Logo-HSBC.png",
      "fee": 0.05,
      "channel": "debit_bank_hsbc",
      "delivery_time": "1 day",
      "method": "withdraw/bank",
      "status": "inactive",
      "variables": [
        "bank_branch_code",
        "account_name",
        "account_number",
        "iban_code",
        "swift_code"
      ]
    }
  ]
}

Example Request

{
  "app_id": "86509b0699ae"
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

/withdraw/bank

POST https://sandbox.walletengine.io/api/withdraw/bank

Use this API to withdraw from a wallet with a bank transfer. The user will be asked how much they want to withdraw and the charges involved. They will be asked to provide the details of their bank account so that Wallet Engine can effect a bank transfer to the account of their choice. Funds will be removed from the users wallet immediately, anf the bank transfer will be processed that night.

Headers

Name
Type
Description

Content-Type

string

application/json

Authorization

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id

string

This is the unique App ID assigned to you by Wallet Engine.

amount

number

Withdraw amount.

channel_id

string

Channel Id.

variables

object

User bank account information.

{
  "transaction_id": "5dee1542283a5",
  "amount": 10,
  "fee": 0.1
}

Example Request

{
  "app_id": "86509b0699ae",
  "amount": 10,
  "channel_id": "debit_bank",
  "variables": {
    "bank_name": "HSBC",
    "bank_code": "7171",
    "bank_branch_code": "001",
    "account_name": "Name on Account",
    "account_number": "0052312891",
    "iban_code": "DE89 3704 0044 0532 0130 00",
    "swift_code": "DBSSSGSGXXX"
  }
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

invalid_channel_id

Channel not available.

invalid_withdrawal_amount

The withdrawal amount exceeds the allowed values.

Last updated

Was this helpful?