Account Activation

This is the first section and covers how to activate a users wallet.

Before starting a user needs to accept the Terms of service ( /profile/tos )

Then the user's phone number and email will need to be provided. ( /activate/request )

A one-time password is sent to the user by SMS which they need to send back through the App. ( /activate/otp/verify )

When these steps are complete the user's wallet will be created.

Users can set a password during the activation process, although it is not mandatory. ( /profile/update )

Flow

/profile/tos

POST https://sandbox.walletengine.io/api/profile/tos

Terms of service retrieval and acceptance. To retrieve the terms of service for your app, you need to supply your AppID to the following URL.

Headers

Name
Type
Description

Content-Type

string

application/json

Request Body

Name
Type
Description

app_id

string

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

{
  "tos": {
    "last_updated": "2021-09-15",
    "meta_text": "html string",
    "link": [
      "https://www.walletengine.io/tos"
    ]
  }
}

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.

/api/activate/request

POST https://sandbox.walletengine.io/api/activate/request

You need to provide Wallet Engine with basic user information so that the users account can be created. The information below should be harvested from your customer and sent to Wallet Engine using the following API.

Path Parameters

Name
Type
Description

Content-Type

string

application/json

Request Body

Name
Type
Description

app_id

string

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

country_dial_code

number

The country code of the user's phone number.

phone_number

number

The phone number to send the verification code.

email_address

string

Email to send KYC link.

nickname

string

Name for in app display.

tos_accepted

string

Time and date stamp of when the user clicked accept of the TOS

{
  "valid": true,
  "request_id": "string"
}

Example Request

{
  "app_id": "5db2a50be7626",
  "country_dial_code": "65",
  "phone_number": "909099999",
  "email_address": "[email protected]",
  "nickname": "FooB",
  "tos_accepted": "2021-09-20 10:50:59"
}

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.

fatal_error

The server could not complete your operation(s) without encountering a catastrophic error.

invalid_country_code

Invalid country code. https://countrycode.org/

invalid_app_id

App ID does not exist, blocked, out of service…

age_verification_fail

The DOB supplied 18+. Users must be over 18 years old.

nat_country_not_allowed

Citizenship from this country is not allowed. (country_nat_code)

res_country_not_allowed

Residents of this country are not allowed. (country_res_code)

country_is_restricted

Clients from this country cannot create a wallet. Country code unknown. The country is not configured in WE.

phone_number_is_registered

The phone number already exists with this App ID.

phone_number_has_desisted

The phone number verification has to be reinitiated. It was not possible to send an OTP message to the phone number provided.

/api/activate/otp/verify

POST https://sandbox.walletengine.io/api/activate/otp/verify

Wallet Engine will send a One Time Passcode by SMS to the mobile number of the user. The user enters the passcode in the App to verify themselves. Once the passcode has been successfully verified then a wallet account is set up for the user and the details of the users new wallet account are returned.

Headers

Name
Type
Description

Content-Type

string

application/json

Request Body

Name
Type
Description

app_id

string

This is the unique App ID provided by Wallet Engine for your App.

request_id

string

The Request Id is generated by WE Gateway.

passcode

number

The passcode sent to the phone number in the previous step.

{
  "profile": {
    "kyc_level": 0,
    "kyc_status": "OK",
    "client_id": "931917458",
    // ...
  },
  "accounts": [
    {
      "account_id": "EWCV144",
      "account_state": "approved",
      "currency_code": "SGD",
      "available_balance": 0,
      // ...
    }
  ]
  "token": "string"
}

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_request_id

The Request Id is expired or invalid.

invalid_passcode

The passcode is expired or invalid.

phone_number_has_desisted

The phone number verification has to be reinitiated. It was not possible to send an OTP message to the phone number provided.

/api/profile/update

POST https://sandbox.walletengine.io/api/profile/update

Users can define a password for their account during the activation process. We recommend the Customer App hash the password before send to WE Gateway.

Headers

Name
Type
Description

Authorization

string

Bearer {{token}}

Content-Type

string

application/json

Request Body

Name
Type
Description

app_id

string

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

password

string

The user’s password. Password is not required for access via an App, but will be used in the future for portal access. We recommend the Customer App hash the password before send to WE Gateway. Ex: md5(password)

{
  "valid": true
}

Example Request

{
    "app_id": "5db2a50be7626",
    "password": "*** ***"
}

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_user_authorize

WE Gateway can not authorize the user. Invalid App User Token.

fatal_error

The server could not complete your operation(s) without encountering a catastrophic error.

Last updated

Was this helpful?