Bank Account Migration Guide
Customer Profile API
Learn how to migrate your existing user's bank accounts from Connect Flow after Customer Profile migration.
Overview
The steps for migrating a Connect user bank account involves calling Create a virtual bank account API correctly.
- Call Get bank transfer instructions with your existing user's
merchant_ref
X-XFERS-USER-API-KEY
oruserApiToken
Request
curl --request GET \
--url https://sandbox.xfers.io/api/v3/user/transfer_info \
--header 'X-XFERS-USER-API-KEY: 71b72cb775fa0e52d815279c74964f5be18a88b8' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"merchant_ref": "UserID000123"
}
'
API Response
{
"unique_id": "98888888", -- handphone number
"merchant_ref": "UserID000123" -- a unique ID for you to identify this VA
"wallet_name": "Digital Goods",
"bank_name_full": "CIMB Bank Berhad",
"bank_abbrev": "CIMB",
"bank_name_abbreviation": "CIMB",
"bank_account_no": "2000492623", -- virtual account number
"bank_payee_name": "Xfers Pte Ltd",
"bank_code": "7986",
"branch_code": "",
"branch_area": "",
"img_src": null,
}
Step 2 — Migrate user's bank accounts

Payment Type | From | To |
---|---|---|
Bank Transfer Payment | User's bank account | Business Account |
curl --request POST \
--url https://sandbox.xfers.io/api/v3/payment_methods/virtual_bank_accounts \
--header 'Content-Type: application/json' \
--header 'X-XFERS-APP-API-KEY: {YOUR_API_KEY}' \
--header 'accept: application/json' \
--data '
{
"data": {
"attributes": {
"referenceId": "UserID000123", -- use existing merchant_ref
"bankShortCode": "FAZZ"
},
"relationships": {
"userApiToken": "71b72cb775fa0e52d815279c74964f5be18a88b8", -- use existing token
"customerProfile": {
"data": {
"id": "customer_profile_08d5ffe5-8a02-4dc2-aabb-9057b8ab3c65"
}
}
}
}
}
'
API Response
{
"data": {
"id": "payment_method_ece62c2c-0961-43e7-43d0-0986a1a18b4a",
"type": "virtual_bank_account",
"attributes": {
"referenceId": "ref_dykgxzs2uy",
"instructions": {
"bankShortCode": "FAZZ",
"accountNo": "3225775413709",
"bank_payee_name": "Xfers Pte Ltd"
}
}
}
}
- To migrate your user's bank accounts and provide payee details for your existing user, initiate a request to create a virtual bank account
- Include existing
merchant_ref
anduserApiToken
in the body parameters
Failure to include the existing
merchant_ref
anduser_api_token
will result in the bank accounts not being migrated.
- After successfully retrieving the virtual account, bank accounts will be migrated and associated to your user's customer profile.
- Retrieve the your user bank accounts to verify if they have been migrated.
curl --request GET \
--url https://sandbox.xfers.io/api/v3/customer_profile/customer_profile_08d5ffe5-8a02-4dc2-aabb-9057b8ab3c65/bank_accounts \
--header 'accept: application/json'
Step 4 — Add callback URL
On a successful completion of a deposit transaction, StraitsX will send a callback notification to you via a callback URL indicated on the StraitsX Business Dashboard.

Adding a callback URL in sandbox mode
Add the callback URL on the dashboard to receive a callback when the transaction has been completed.
Step 5a — Make a mock bank transfer (Sandbox)
curl --location --request PUT 'https://sandbox.xfers.io/api/v3/sandbox/customer_profile/customer_profile_08d5ffe5-8a02-4dc2-aabb-9057b8ab3c65/bank_accounts/?verification_status=verified' \
--header 'X-XFERS-APP-API-KEY: t4wsjxpwtk6o9tz20j4baj4ifwibin100py1vrvfsqh'
- In the sandbox environment, you can make a mock bank transfer by initiating a mock bank transfer payment.
- Input a name under
source_bank_account_holder_name
to test if the sender name is matched correctly to your user's name.
Step 5b — Make a bank transfer (Production)
Bank Account Verification
Bank accounts will be verified and added to a customer profile on the first deposit when the bank name matches with the customer profile name.
To make a bank transfer payment, your users can deposit funds via their personal bank.
Add payee details example

Adding a payee to make a fund transfer (Last Updated: 12 Dec 2022)
For a full list of banks supported by StraitsX, click here.
Step 6 — Confirm deposit has been received
Securing your callback
When the payment is received, we will send a callback to the URL indicated on the StraitsX Business Dashboard. The callback can be verified using the HMAC-SHA256
algorithm.
Learn more about how to secure your callback →
Callback Response
amount=89.35&bank_account_no=0393123432&created_at=2022-03-09T11%3A56%3A17%2B08%3A00&end_to_end_ref=test+comment&fees=0.49&id=contract_7mowjipsez3ryhs9auko03eajihpbeop&idempotency_id=ETA2022030911561153700&merchant_ref=ref_0d1w4m0xepp40&status=completed&type=Direct+bank+transfer
Parameter Name | Description | Example Value |
---|---|---|
amount | Amount transferred | 89.35 |
bank_account_no | FAST bank account number | 0393123432 |
created_at | Time of creation | 2022-03-09T11%3A56%3A17%2B08%3A00 |
end_to_end_ref | User's Transaction Notes / Comments | test+comment |
fees | Fees incurred | 0.49 |
id | Contract ID | contract_7mowjipsez3ryhs9auko03eajihpbeop |
idempotency_id | Unique ref no to prevent double transaction | ETA2022030911561153700 |
merchant_ref | Unique ID indicated in Create a virtual bank account API | ref_0d1w4m0xepp40 |
status | Transaction Status: completed/pending/cancelled | completed |
type | Type of transaction | Direct+bank+transfer |
You may use the
merchant_ref
parameter to match the incoming bank transfers to verify if you have received the correct amount.
Summary

Click to enlarge
Next step — Sending a payout
Learn more about how to send a payout to your user's bank account.
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!
Updated 7 months ago