Get Started

Connect API

πŸ“—

Learn how to use the Connect API to create accounts for your users.

Overview

The Connect API allows you to create accounts for your users. These accounts are used as identifiers for accepting payments and sending payouts to these users. Both the Payment API and Payout API require the user account token that is generated with the Connect API.

For users who already have an account with StraitsX, the Connect API seamlessly connects to their account using their phone number as an authentication method. You will immediately be able to accept payments and send payouts to their Personal Account once they've been connected.

Step 1 β€” Get your API keys

  • Complete the verification process on the StraitsX Business Dashboard by submitting the relevant documents.
  • Once your business account has been approved, we will generate the API keys for you under the Developer Tools tab.
  • This API key will be used as an identifier and allow you to easily connect accounts to your platform.
  • You will need both your X-XFERS-APP-API-KEY and X-XFERS-APP-SECRET-KEY to create or connect to an account.

❔

Still awaiting verification? Contact our Support team to generate a sandbox API key to start testing.

curl --location --request POST 'https://sandbox.xfers.io/api/v3/authorize/signup_login' \
--header 'X-XFERS-APP-API-KEY: t4wsjxpwtk6o9tz20j4baj4ifwibin100py1vrvfsqh' \
--form 'phone_no="+65987654321"' \
--form 'signature="1292a784c0ebd0e1927e0028a975981a793fdd1c"'
curl --location --request POST 'https://www.xfers.io/api/v3/authorize/signup_login' \
--header 'X-XFERS-APP-API-KEY: {{APP_API_KEY}}' \
--form 'phone_no="{{USER_HP_NO}}"' \
--form 'signature="{{SIGNATURE}}"'
  • Collect your user's phone number and use it to authenticate their account via the Connect API.
  • We will send a One-Time Password (OTP) via SMS to the provided phone number.
  • You will need to use the OTP to get the user account token.

πŸ“˜

In the sandbox environment, a mock OTP is generated instead.
The 6 digit OTP will be valid for 10 minutes and can be triggered again after 1 minute.

Step 3 β€” Generate a mock OTP

curl --location --request GET 'https://sandbox.xfers.io/api/v3/authorize/get_mock_otp' \
--header 'X-XFERS-APP-API-KEY: t4wsjxpwtk6o9tz20j4baj4ifwibin100py1vrvfsqh' \
--form 'phone_no="+65987654321"'
  • In the sandbox environment, initiate a request to create a mock OTP. This OTP is required to create a signature and retrieve your user account token.

🚧

In the production environment, this step can be skipped.

curl --location --request GET 'https://sandbox.xfers.io/api/v3/authorize/get_token' \
--header 'X-XFERS-APP-API-KEY: t4wsjxpwtk6o9tz20j4baj4ifwibin100py1vrvfsqh' \
--form 'otp="747156"' \
--form 'phone_no="+6590123456"' \
--form 'signature="8ec34111f61f75c671a844e57c468b21d3b8de84"'
curl --location --request GET 'https://www.xfers.io/api/v3/authorize/get_token' \
--header 'X-XFERS-APP-API-KEY: {{APP_API_KEY}}' \
--form 'otp="{USER_OTP}"' \
--form 'phone_no="{{USER_HP_NO}}"' \
--form 'signature="{{SIGNATURE]}"'
API Response
{
  "msg": "success",
  "id": "user_6vl9ojc94km9",
  "user_api_token": "BCX1qX2b73zRSVvdRHJkcYsqty9QJVqcf3DxtNJ2q5s",
  "currency": "sgd",
  "wallet_name": "Digital Goods"
}

Next step β€” Add a bank account

Learn more about how to add and verify your user's bank accounts to facilitate payments and payouts.


Try it out!

Getting started with StraitsX APIs is easy. Our business development and integration teams will be with you every step of the way. If you have any questions or would like to connect with our team, please do so via Support!


What’s Next