NAV Navbar
javascript

Getting Started

Welcome to the Routefusion API docs.

The Routefusion API gives you access to send money from bank to bank in 130+ countries

Routefusion on github: https://github.com/Routefusion/routefusion-node

Routefusion has access to 130+ countries, if you need payouts to a country that is not listed please email engineering@routefusion.co and we can get you up and running asap.

Please not you can also hit our currency coverage endpoint to see our available currencies. currency coverage endpoint

For Test API access please use the below credentials. Note these are public credentials.

Test API KEYS

Client ID: 65B44076F114B95EC6B717720994E813E435B7048E44F1C52898ED852D0D2D07

Secret Key: 108F20D91DDA8446d674CF2E20d5B632FdaF0B605eEc4d2f67484b9E2ED89512

For private API access, register for an API key at routefusion.co/sign_up.

Aftern signup, login and go to 'developer' and create your client_id/secret pair.

API and SDK are compatible with async / await.

You can also use our Postman collection here https://documenter.getpostman.com/view/4019635/RVtxKsA1

Install

Using npm:

  $ npm install routefusion-sdk --save

You can install the routefusion SDK with npm. If you are using node, we recommend you use the SDK for your integration with routefusion.

We will be releasing SDKs in additional languages soon.

Authentication

const rf = require('routefusion-sdk').Instance({
  RF_CLIENT_ID: '65B44076F114B95EC6B717720994E813E435B7048E44F1C52898ED852D0D2D07',
  RF_SECRET: '108F20D91DDA8446d674CF2E20d5B632FdaF0B605eEc4d2f67484b9E2ED89512',
  RF_BASE_URL: "https://sandbox.api.routefusion.co" // will default to sandbox
});

or, set environment variables

export RF_CLIENT_ID=65B44076F114B95EC6B717720994E813E435B7048E44F1C52898ED852D0D2D07
export RF_SECRET_KEY=108F20D91DDA8446d674CF2E20d5B632FdaF0B605eEc4d2f67484b9E2ED89512
export RF_BASE_URL=https://sandbox.api.routefusion.co # not needed for sandbox

then, no need for dragging around that config object

const rf = require('routefusion-sdk').Instance();

or, create a credentials file (our favorite)

create a file at `~/.rf/credentials`

[default]
client_id=65B44076F114B95EC6B717720994E813E435B7048E44F1C52898ED852D0D2D07
secret=108F20D91DDA8446d674CF2E20d5B632FdaF0B605eEc4d2f67484b9E2ED89512

[Rich]
client_id=65B44076F114B95EC6B717720994E813E435B7048E44F1C52898ED852D0D2D07
secret=108F20D91DDA8446d674CF2E20d5B632FdaF0B605eEc4d2f67484b9E2ED89512

[Paul]
client_id=65B44076F114B95EC6B717720994E813E435B7048E44F1C52898ED852D0D2D07
secret=108F20D91DDA8446d674CF2E20d5B632FdaF0B605eEc4d2f67484b9E2ED89512

then export your prefered profile, if no profile is set the sdk will use [default]

export RF_PROFILE=Rich

then it's as easy as:

const rf = require('routefusion-sdk').Instance();

It is recommended that you use the SDK for authentication. If using the SDK you either need to set enviroment variables, pass in a config, or set a .rf_profile in your home directory.

Routefusion uses hmac to authenticate API requests.

You must send your client-id in the headers along with a base64 signature. Create your request signature by signing the request body for POST requests, or signing the path for GET requests with your secret key.

If you plan to use the SDK set your API key / secret pair as environment variables, or create a credentials file where you can manage all of your keys in one place. The location of your credentials file should be ~/.rf/credentials for unix systems and C:\%USERPROFILE%\.rf\credentials for windows systems.

The credentials priority is:

  1. local instance configuration
  2. environment variables
  3. credentials file

Note: You should NEVER send your secret key in an API request.

Users

Description

There are two types of users. A master user and a normal user.

A master user can create other users, and manage those users.

A normal user only has access to their own attributes.

By default every new user that is signed up is a normal user. If you would like master user capabilities please email us at engineering@routefusion.co.

User Account Creation

This is the flow when a user is created on our system. This will occur for a normal user and a master user. Inadvertantly every user a master creates will go through this same process.

User account create

User KYC API

The KYC document upload API will be released on 01/10/19. If you would like early access to it, please send an email to engineering@routefusion.co with your request.

Get user

const rf = require('routefusion-sdk').Instance();

rf.getUser()
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
    "id": 2,
    "uuid": "c8d73658-9acc-4687-a4a4-cc6d195aae34",
    "first_name": "mike",
    "last_name": "jones",
    "email": "mike@jones.com",
    "phone_number": null,
    "country": null,
    "verified": true,
    "type": null,
    "verification_submitted": false,
    "company_name": null,
    "created_at": "2018-12-13T12:51:51.107Z",
    "updated_at": "2019-05-08T04:40:04.006Z",
    "master_user": true,
    "master_user_uuid": null
}

This endpoint retrieves information about your user profile.

HTTP Request

GET https://api.routefusion.co/v1/users/me

URL Parameters

None

Update user

const rf = require('routefusion-sdk').Instance();

let body = {
  "first_name": "sammy slick toe smith"
}

rf.updateUser(body)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
    "id": 2,
    "uuid": "c8d73658-9acc-4687-a4a4-cc6d195aae34",
    "first_name": "sammy slick toe smith",
    "last_name": "jones",
    "email": "mike@jones.com",
    "phone_number": null,
    "country": null,
    "verified": true,
    "type": "business",
    "verification_submitted": false,
    "company_name": null,
    "created_at": "2018-12-13T12:51:51.107Z",
    "updated_at": "2019-05-08T04:40:04.006Z",
    "master_user": true,
    "master_user_uuid": null
}

This endpoint updates information about your user profile.

HTTP Request

PUT https://api.routefusion.co/v1/users/me

Body

Column Type
username STRING
password STRING
first_name STRING
last_name STRING
email STRING
phone_number STRING
country STRING
company_name STRING

URL Parameters

None

MASTER Get user

const rf = require('routefusion-sdk').Instance();

rf.getUserByUUid(UUID)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "username": "whoismikejones",
  "first_name": "Mike",
  "last_name": "Jones",
  "occupation": "Who?",
  "date_of_birth": "2006-02-02",
  "email": "mikejones@who.com",
  "phone_number": "2813308004",
  "country": null,
  "city": "Austin",
  "street": "600 Congress Av",
  "state": "Texas",
  "zipcode": "78745",
  "verified": true,
  "admin": false,
  "type": "personal",
  "verification_submitted": true,
  "company_name": null,
  "created_at": "2018-04-04T16:42:23.191Z",
  "updated_at": "2018-04-10T17:32:50.216Z"
}

This endpoint retrieves information about your users user profile.

HTTP Request

GET https://api.routefusion.co/v1/users/me/user

MASTER Index users

const rf = require('routefusion-sdk').Instance();

rf.getUsers()
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
    "username": "whoismikejones",
    "first_name": "Mike",
    "last_name": "Jones",
    "occupation": "Who?",
    "date_of_birth": "2006-02-02",
    "email": "mikejones@who.com",
    "phone_number": "2813308004",
    "country": null,
    "city": "Austin",
    "street": "600 Congress Av",
    "state": "Texas",
    "zipcode": "78745",
    "verified": true,
    "admin": false,
    "type": "personal",
    "verification_submitted": true,
    "company_name": null,
    "created_at": "2018-04-04T16:42:23.191Z",
    "updated_at": "2018-04-10T17:32:50.216Z"
  },
  {
    "id": 1,
    "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
    "username": "whoismikejones2",
    "first_name": "Mike2",
    "last_name": "Jones2",
    "occupation": "Who?2",
    "date_of_birth": "2006-02-02",
    "email": "mikejones2@who.com",
    "phone_number": "2813308004",
    "country": null,
    "city": "Austin",
    "street": "600 Congress Av",
    "state": "Texas",
    "zipcode": "78745",
    "verified": true,
    "admin": false,
    "type": "personal",
    "verification_submitted": true,
    "company_name": null,
    "created_at": "2018-04-04T16:42:23.191Z",
    "updated_at": "2018-04-10T17:32:50.216Z"
  }
]

This endpoint retreives all the info on your users.

HTTP Request

GET https://api.routefusion.co/v1/users/me/users

MASTER Update user

const rf = require('routefusion-sdk').Instance();

let body = {
  "first_name": "sammy slick toe smith"
}

rf.updateUserByUUid(YOUR_USERS_ROUTEFUSION_UUID, body)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "username": "whoismikejones",
  "first_name": "sammy slick toe smith",
  "last_name": "Jones",
  "occupation": "Who?",
  "date_of_birth": "2006-02-02",
  "email": "mikejones@who.com",
  "phone_number": "2813308004",
  "country": null,
  "city": "Austin",
  "street": "600 Congress Av",
  "state": "Texas",
  "zipcode": "78745",
  "verified": true,
  "admin": false,
  "type": "personal",
  "verification_submitted": true,
  "company_name": null,
  "created_at": "2018-04-04T16:42:23.191Z",
  "updated_at": "2018-04-10T17:32:50.216Z"
}

This endpoint updates information about your user profile.

HTTP Request

PUT https://api.routefusion.co/v1/users/me/user

Body

Column Type
username STRING
password STRING
first_name STRING
last_name STRING
occupation STRING
date_of_birth STRING
email STRING
phone_number STRING
country STRING
city STRING
street STRING
state STRING
zipcode STRING
company_name STRING

URL Parameters

None

MASTER Create user

const rf = require('routefusion-sdk').Instance();

let body = {
  "first_name": "sammy slick toe smith",
  "last_name": "meow",
  "email": 'mynameismikejones@ciao.com'
}

rf.createUserByUUid(body)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "username": "whoismikejones",
  "first_name": "sammy slick toe smith",
  "last_name": "Jones",
  "occupation": "Who?",
  "date_of_birth": "2006-02-02",
  "email": "mikejones@who.com",
  "phone_number": "2813308004",
  "country": null,
  "city": "Austin",
  "street": "600 Congress Av",
  "state": "Texas",
  "zipcode": "78745",
  "verified": true,
  "admin": false,
  "type": "personal",
  "verification_submitted": true,
  "company_name": null,
  "created_at": "2018-04-04T16:42:23.191Z",
  "updated_at": "2018-04-10T17:32:50.216Z"
}

This endpoint updates information about your user profile.

HTTP Request

POST https://api.routefusion.co/v1/users/me/user

Body

Column Type
username STRING
password STRING
first_name STRING
last_name STRING
occupation STRING
date_of_birth STRING
email STRING
phone_number STRING
country STRING
city STRING
street STRING
state STRING
zipcode STRING
company_name STRING

URL Parameters

None

Beneficiaries

Description

Users can have many beneficiaries.

Beneficiaries are who you plan on sending money to. They could be a supplier, an employee, a contractor, a marketplace seller, etc. Each beneficiary has core fields that are required, but will have addiotnal seperate fields required depending on what country the beneficiary is in.

This is the typical flow of of a beneficiary creation

Beneficiary creation

Get all Beneficiaries

const rf = require('routefusion-sdk').Instance();

rf.getBenefiaries()
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

[
  {
    "id": 414,
    "uuid": "b384af3b-3e61-476a-aee6-1c44cb42a605",
    "user_id": 2,
    "company_name": "beneficiaryCompany",
    "first_name_on_account": "companyOwnerFirstName",
    "last_name_on_account": "companyOwnerLastName",
    "type": "business",
    "bank_name": "Citibank",
    "branch_name": null,
    "bank_city": "New York City",
    "bank_code": null,
    "branch_code": null,
    "account_type": "business",
    "account_number": "2315345432",
    "routing_number": "113193532",
    "clabe": null,
    "tax_number": null,
    "email": "company@email.com",
    "phone_number": null,
    "country": "US",
    "city": "beneficiaryCity",
    "bank_state_province": "New York",
    "verified": false,
    "created_at": "2019-05-08T18:16:30.614Z",
    "updated_at": null,
    "currency": "USD",
    "cpfcnpj": null,
    "swift_bic": "CITINY732",
    "bank_address1": "5252 Madison Ave.",
    "bank_address2": null,
    "bank_country": "US",
    "bank_postal_code": "00000",
    "address1": "beneficiaryAddress",
    "address2": null,
    "state_province": "beneficiaryStateOrProvince",
    "postal_code": "00000",
    "bsb_number": null
  },
  {
    ...
]

This endpoint retrieves all of your users beneficiaries.

HTTP Request

GET https://api.routefusion.co/v1/beneficiaries

URL Parameters

None

Get beneficiary

const rf = require('routefusion-sdk').Instance();

rf.getBeneficiary(<BENEFICIARY_ID>)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 414,
  "uuid": "b384af3b-3e61-476a-aee6-1c44cb42a605",
  "user_id": 2,
  "company_name": "beneficiaryCompany",
  "first_name_on_account": "companyOwnerFirstName",
  "last_name_on_account": "companyOwnerLastName",
  "type": "business",
  "bank_name": "Citibank",
  "branch_name": null,
  "bank_city": "New York City",
  "bank_code": null,
  "branch_code": null,
  "account_type": "business",
  "account_number": "2315345432",
  "routing_number": "113193532",
  "clabe": null,
  "tax_number": null,
  "email": "company@email.com",
  "phone_number": null,
  "country": "US",
  "city": "beneficiaryCity",
  "bank_state_province": "New York",
  "verified": false,
  "created_at": "2019-05-08T18:16:30.614Z",
  "updated_at": null,
  "currency": "USD",
  "cpfcnpj": null,
  "swift_bic": "CITINY732",
  "bank_address1": "5252 Madison Ave.",
  "bank_address2": null,
  "bank_country": "US",
  "bank_postal_code": "00000",
  "address1": "beneficiaryAddress",
  "address2": null,
  "state_province": "beneficiaryStateOrProvince",
  "postal_code": "00000",
  "bsb_number": null
}

This endpoint retrieves information about your user profile.

HTTP Request

GET https://api.routefusion.co/v1/beneficiaries/<BENEFICIARY_ID>

URL Parameters

Parameter Description
BENEFICIARY_ID your beneficiary_id

Create beneficiary

const rf = require('routefusion-sdk').Instance();

let beneficiaryData = {
  company_name: "beneficiaryCompanyName",
  first_name_on_account: "companyOwnerFirstName",
  last_name_on_account: "companyOwnerLastName",
  type: "business",
  currency: "USD",
  bank_name: "Citibank",
  branch_name: "",
  bank_address1: "5252 Madison Ave."
  bank_city: "New York City",
  bank_state_province: "New York",
  bank_postal_code: "00000",
  bank_country: "US", // 2 letter code
  swift_bic: "CITINY732", // 8 or 11 character code
  account_type: "business",
  account_number: "2315345432",
  routing_number: "113193532",
  email: "company@email.com",
  phone_number: "",
  address1: "beneficiaryAddress",
  city: "beneficiaryCity",
  state_province: "beneficiaryStateOrProvince",
  postal_code: "00000",
  country: "US" // 2 letter code
};

rf.createBenefiary(beneficiaryData)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON sturctured like this:

{
  "id": 414,
  "uuid": "b384af3b-3e61-476a-aee6-1c44cb42a605",
  "user_id": 2,
  "company_name": "beneficiaryCompany",
  "first_name_on_account": "companyOwnerFirstName",
  "last_name_on_account": "companyOwnerLastName",
  "type": "business",
  "bank_name": "Citibank",
  "branch_name": null,
  "bank_city": "New York City",
  "bank_code": null,
  "branch_code": null,
  "account_type": "business",
  "account_number": "2315345432",
  "routing_number": "113193532",
  "clabe": null,
  "tax_number": null,
  "email": "company@email.com",
  "phone_number": null,
  "country": "US",
  "city": "beneficiaryCity",
  "bank_state_province": "New York",
  "verified": false,
  "created_at": "2019-05-08T18:16:30.614Z",
  "updated_at": null,
  "currency": "USD",
  "cpfcnpj": null,
  "swift_bic": "CITINY732",
  "bank_address1": "5252 Madison Ave.",
  "bank_address2": null,
  "bank_country": "US",
  "bank_postal_code": "00000",
  "address1": "beneficiaryAddress",
  "address2": null,
  "state_province": "beneficiaryStateOrProvince",
  "postal_code": "00000",
  "bsb_number": null
}

This endpoint creates a beneficiary.

HTTP Request

POST https://api.routefusion.co/v1/beneficiaries

URL Parameters

None

Body

this is the base that is required for creating a beneficiary. Additional fields for countries will be listed below.

Column Type Required Notes
bank_country STRING required
bank_name STRING required
currency STRING required
address1 STRING required
country STRING required
city STRING required
postal_code STRING required
type STRING required PERSONAL or BUSINESS
first_name_on_account STRING depends required if the type is PERSONAL
last_name_on_account STRING depends required if the type is PERSONAL
company_name STRING depends required if the type is BUSINESS

USA (USD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required use IBAN number as account_number if available
routing_number STRING required bank routing number
company_name STRING depends required for payments to corporates/businesses

Delivery Times Bank cut-off time is 12PM PST If we receive the payment instruction on the day before 12PM, the payment will be credited to beneficiary the next business day.-If we receive the payment instruction after 12PM, it will be credited to beneficiary next business day +1.

Europe (EUR) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required use IBAN number as account_number if available
swift_bic STRING required Destination swift/bic bank number

United Kingdom (GBP) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required use IBAN number as account_number if available
swift_bic STRING required Destination swift/bic bank number

Australia (AUD) beneficiary:

all of the base fields plus+

Column Type Required Notes
bsb_number STRING required A BSB (Bank-State-Branch) is a six-digit number that identifies banks and branches across Australia.

Bahrain (BHD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Brazil (BRL) beneficiary:

all of the base fields plus+

Column Type Required Notes
cpfcnpj STRING required Brazilian tax number in "25343734391" format cpf is for individuals, cnpj is for businesses

Delivery Times

Caixa Economica Federal, Bradesco, & Banco do Brasil:

1 business day to affiliate the account 30 minutes to 24 hours to complete the transactions

All other banks:

1 business day to affiliate the account 30 minutes to 24 hours to complete the transaction if sent before 3pm and above R$ 250, (otherwise next day)

Bulgaria (BGN) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Canada (CAD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
state_province STRING required Beneficiary region

Central African Republic (XAF) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number
phone_number STRING required Beneficiary's phone number

China (CNY) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Bank account number
branch_name STRING required Beneficiary branch name in Chinese characters
bank_city STRING required Beneficiary bank city in Chinese characters
bank_state_province STRING required Beneficiary bank province in Chinese characters

PERSONAL

Payments to individuals take a maximum of 6 hours, 24/7. Payments over CNY 50,000 will be split into smaller payments to ensure no clearing delays.

BUSINESS

Payments to businesses take a maximum of 6 hours, during normal business banking hours (9:00 - 17:00, Monday - Friday).

Croatia (HRK) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Czech Republic (CZK) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Denmark (DKK) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

French Pacific multiple countries beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Hong Kong (HKD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Hungary (HUF) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

India (INR) beneficiary:

all of the base fields plus+

Column Type Required Notes
routing_number STRING required Bank routing number
swift_bic STRING required Destination swift/bic bank number

Indonesia (IDR) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Israel (ILS) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Japan (JPY) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Kenya (KES) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Kuwait (KWD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Malaysia (MYR) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Mexico (MXN) beneficiary:

all of the base fields plus+

Column Type Required Notes
clabe STRING required a clabe is a 16 digit unique identifier for Mexico bank accounts
swift_bic STRING required

Delivery Times

Triggers a SPEI + DEBIT CARD withdrawal from your account. These withdrawals are immediate during banking hours for some banks (M-F 9:00AM - 5:00PM Mexico City Time), 24 hours for others.

New Zealand (NZD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Norway (NOK) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Oman (OM) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's account number
swift_bic STRING required Destination swift/bic bank number

Philippines (PHP) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Bank account number
routing_number STRING required Bank routing number
swift_bic STRING required Destination swift/bic bank number
state_province STRING required Region / Province of Philippines beneficiary resides in

Poland (PLN) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Qatar (QAR) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Romania (RON) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Russia (RUB) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number
bank_code STRING required BIK - 9 digits, or KORR - 20 digits
tax_number STRING required INN (tax code) - 12 digits, or KNF - 7 digits

Samoa (WST) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Saudi Arabia (SAR) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number
phone_number STRING required Beneficiary's telephone number

Singapore (SGD) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number
bank_code STRING required Bank code (e.g. DBS bank code: 7171)

South Africa (ZAR) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number
branch_code STRING required Branch code (e.g. African Bank branch code: 430000)

Sweden (SEK) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Switzerland (CHF) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Thailand (THB) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Tunisia (TND) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Turkey (TRY) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Uganda (UGX) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Ukraine (UAH) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

United Arab Emirates (AED) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's IBAN
swift_bic STRING required Destination swift/bic bank number

Vietnam (VND) beneficiary:

all of the base fields plus+

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

West Africa multiple countries beneficiaries:

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Zambia multiple countries beneficiaries:

Column Type Required Notes
account_number STRING required Beneficiary's bank account number
swift_bic STRING required Destination swift/bic bank number

Update beneficiary

const rf = require('routefusion-sdk').Instance();

let beneficiaryId = 1;

let body = {
  "first_name": "Johnny Two Step"
};

rf.updateBeneficiary(beneficiaryId, body)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 414,
  "uuid": "b384af3b-3e61-476a-aee6-1c44cb42a605",
  "user_id": 2,
  "company_name": "test beneficiary company",
  "first_name_on_account": "Johnny Two Step",
  "last_name_on_account": "that",
  "type": "business",
  "bank_name": "Citibank",
  "branch_name": null,
  "bank_city": "New York City",
  "bank_code": null,
  "branch_code": null,
  "account_type": "business",
  "account_number": "2315345432",
  "routing_number": "113193532",
  "clabe": null,
  "tax_number": null,
  "email": "company@email.com",
  "phone_number": null,
  "country": "US",
  "city": "New York City",
  "bank_state_province": "New York",
  "verified": false,
  "created_at": "2019-05-08T18:16:30.614Z",
  "updated_at": null,
  "currency": "USD",
  "cpfcnpj": null,
  "swift_bic": "CITINY73",
  "bank_address1": null,
  "bank_address2": null,
  "bank_country": "US",
  "bank_postal_code": "00000",
  "address1": "5252 Madison Ave",
  "address2": null,
  "state_province": "NY",
  "postal_code": "00000",
  "bsb_number": null
}

This endpoint updates information about one of your beneficiaries.

HTTP Request

PUT https://api.routefusion.co/v1/beneficiaries/<BENEFICIARY_ID>

URL Parameters

Parameter Description
BENEFICIARY_ID your beneficiary_id

Body

Column Type
company_name STRING
first_name_on_account STRING
last_name_on_account STRING
email STRING
phone_number STRING
address1 STRING
address2 STRING
city STRING
state_province STRING
country STRING
type STRING
account_type STRING
account_number STRING
routing_number STRING
clabe STRING
tax_number STRING
currency STRING
cpfcnpj STRING
swift_bic STRING
bank_name STRING
branch_name STRING
bank_city STRING
bank_code STRING
branch_code STRING
bank_address1 STRING
bank_address2 STRING
bank_state_province STRING
bank_country STRING
bank_postal_code STRING
bsb_number STRING

Quotes

Create a quote

const rf = require('routefusion-sdk').Instance();

let quotePayloadWithoutValueDate = {
  source_amount: 100,
  destination_currency: 'MXN',
  source_currency: 'USD'
};


let quotePayloadWithValueDate = {
  source_amount: 100,
  destination_currency: 'MXN',
  source_currency: 'USD',
  value_date: '2019/05/16' // YYYY/MM/DD or MM/DD/YYYY
};

rf.createQuote(quotePayload)
  .then(resp => resp)
  .catch(err => err)

The above returns JSON structured like this:

{
  "uuid": "QUca9e8220-eccb-4957-8fd0-ab6623f83ff5",
  "partner_quote_id": 91741849,
  "partner": "afex",
  "beneficiary_id": null,
  "source_currency": "USD",
  "destination_currency": "MXN",
  "rate": "19.219",
  "inverted_rate": "0.052",
  "date_of_payment": "2019-04-02T05:00:00.000Z",
  "expires_at": "2019-03-29T04:19:19.012Z",
  "created_at": "2019-03-29T04:18:54.042Z"
}

This endpoint creates a quote. You may set the date of the quote for scheduled payments using value_date. Otherwise the system will find a quote for the earliest possible payment date.

HTTP Request

POST https://api.routefusion.co/v1/quotes

Body

Column Description Required
source_amount source currency amount yes
source_currency currency to be sold yes
destination_currency currency to be bought yes
value_date date to make payment. YYYY/MM/DD or MM/DD/YYYY no

Transfers

Transfer Diagram

This is the typical flow of funds for a transfer or payment.

Flow of funds

Create A Transfer

const rf = require('routefusion-sdk').Instance();

let payloadWithQuote = {
  beneficiary_id: 1,
  source_amount: 1000,
  quote_uuid: "QUca9e8220-eccb-4957-8fd0-ab6623f83ff5"
};

let sourceAmountPayloadWithoutQuote = {
  beneficiary_id: 1,
  source_amount: 1000,
  auto_complete: true
}

// if destination_amount is set, source_amount will be automatically calculated
let destinationAmountPayloadWithoutQuote = {
  beneficiary_id: 1,
  destination_amount: 25000,
  auto_complete: true
}

rf.createTransfer(payloadWithQuote)
  .then(resp => resp)
  .catch(err => err)

The above returns JSON structured like this:

{
  "id": 107,
  "user_id": 1,
  "account_id": null,
  "beneficiary_id": 5,
  "source_amount": "500",
  "exchange_rate": "20.2086715",
  "fee": "7.500",
  "currency_pairs": "USDMXN",
  "created_at": "2018-12-11T18:27:02.038Z",
  "updated_at": null,
  "uuid": "37cba64b-1a22-4732-be22-04826da09405",
  "state": "created",
  "payout_partner_uuid": null,
  "authorizing_ip": "63.65.120.22",
  "transfer_states": [
    {
      "state": "created",
      "created_at": "2018-12-11T18:27:01.876Z"
    }
  ],
  "source_currency": "USD",
  "destination_amount": "9952.77",
  "destination_currency": "MXN",
  "payout_partner_fee": null,
  "payout_partner": null,
  "payout_partner_status": null,
  "deposit": false
}

This endpoint creates a payment. There are two ways to create a payment. You may opt to provide a quote or auto complete the payment.

HTTP Request

POST https://api.routefusion.co/v1/transfers

Body

Param Type Description Required
beneficiary_id INT this is the id of the beneficiary you are sending money to yes
source_amount NUMBER this is the amount you would like to send in USD. Required if destination_amount is not present optional
destination_amount NUMBER this is the amount of the beneficiary currency to purchase. Required if source_amount is not present optional
quote_uuid STRING quote uuid, required if auto_complete is not present optional
auto_complete BOOLEAN allows for creating a payment without a quote optional

Get A Transfer

const rf = require('routefusion-sdk').Instance();

let transferUUID = <TRANSFER_UUID>

rf.getTransfer(transferUUID)
  .then(resp => resp)
  .catch(err => err)

The above returns JSON structured like this:

{
  "id": 107,
  "user_id": 1,
  "account_id": null,
  "beneficiary_id": 5,
  "source_amount": "500",
  "exchange_rate": "20.2086715",
  "fee": "7.500",
  "currency_pairs": "USDMXN",
  "created_at": "2018-12-11T18:27:02.038Z",
  "updated_at": null,
  "uuid": "37cba64b-1a22-4732-be22-04826da09405",
  "state": "created",
  "payout_partner_uuid": null,
  "authorizing_ip": "63.65.120.22",
  "transfer_states": [
    {
      "state": "created",
      "created_at": "2018-12-11T18:27:01.876Z"
    }
  ],
  "source_currency": "USD",
  "destination_amount": "9952.77",
  "destination_currency": "MXN",
  "payout_partner_fee": null,
  "payout_partner": null,
  "payout_partner_status": null,
  "deposit": false
}

HTTP Request

GET https://api.routefusion.co/v1/transfers/<transfer_uuid>

Parameters

Param Type Description Required
transfer_uuid UUID this is the uuid of the transfer yes

Get Transfer Status

const rf = require('routefusion-sdk').Instance();

let transferUUID = <TRANSFER_UUID>

rf.getTransferStatus(transferUUID)
.then(resp => resp)
.catch(err => err)

The above returns JSON structured like this:

{
  "state": "processing",
  "created_at": "2018-12-03T20:35:31.017Z"
}

HTTP Request

GET https://api.routefusion.co/v1/transfers/<transfer_uuid>/status

Parameters

Param Type Description Required
transfer_uuid UUID this is the uuid of the transfer yes

Masspay

const rf = require('routefusion-sdk').Instance();

let massPayPromises = []

let massPayPayload = [
  { beneficiary_id: 1, source_amount: 1000},
  { beneficiary_id: 2, source_amount: 1000},
  { beneficiary_id: 3, source_amount: 1000},
  { beneficiary_id: 4, source_amount: 1000},
  { beneficiary_id: 5, source_amount: 1000},
  { beneficiary_id: 6, source_amount: 1000},
  { beneficiary_id: 7, source_amount: 1000},
  { beneficiary_id: 8, source_amount: 1000},
  { beneficiary_id: 9, source_amount: 1000},
  { beneficiary_id: 10, source_amount: 1000},
  { beneficiary_id: 11, source_amount: 1000},
]

for (let payload of massPayPayload) {
  massPayPromises.push(routefusion.createTransfer(payload))
}

Promise.all(massPayPromises)
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.log(error)
  });

If you would like to upload a flatfile or csv please email engineering@routefusion.co.

Transactions

List all of your users Transactions

const rf = require('routefusion-sdk').Instance();

rf.getAllTransfers()
  .then(resp => resp)
  .catch(err => err)

The above returns JSON structured like this:

[
  {
        "uuid": "5d745492-0780-4132-93d6-543e5fa9bb64",
        "user_id": 2,
        "account_id": null,
        "beneficiary_id": 427,
        "currency_pairs": "MXNUSD",
        "source_currency": "USD",
        "source_amount": "1000.00",
        "destination_amount": "19103.30",
        "destination_currency": "MXN",
        "exchange_rate": "19.103304",
        "authorizing_ip": "157.131.245.19",
        "state": "completed",
        "transfer_states": [
            {
                "state": "created",
                "created_at": "2019-05-11T01:19:03.938Z"
            },
            {
                "state": "processing",
                "created_at": "2019-05-11T01:19:04.760Z"
            },
            {
                "state": "completed",
                "created_at": "2019-05-11T01:19:04.760Z"
            }
        ],
        "created_at": "2019-05-11T01:19:03.976Z"
    },
  {
    ...
  }
]

This endpoint lists out all of your transactions.

HTTP Request

GET https://api.routefusion.co/v1/transfers

URL Parameters

None

Webhooks

Description

Webhooks will allow you to recieve "real time" notifications about your Routefusion objects you would like to monitor.

We currently support webhooks for Transfer notifications. USERS and BENEFICIARIES are coming soon

Webhooks will not notify you in Sandbox mode, only production

Get webhook

const rf = require('routefusion-sdk').Instance();

rf.getWebhook(WEBHOOK_UUID)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "url": "https://www.newco.com/your_custom_url",
  "type": "TRANSFER"
  "rfuuid": "1fd45635-njda-4f5b-805c-04961jk38r9",
  "failed_count": 0,
  "retry_count": 0
}

This endpoint retrieves information about a webhook.

HTTP Request

GET https://api.routefusion.co/v1/webhooks/<webhook_uuid>

URL Parameters

Parameter Description
webhook_uuid your webhook uuid

Update webhook

const rf = require('routefusion-sdk').Instance();

let webhook_uuid = "07d15675-bc7a-4f5b-805c-04961af401f2"
let body = {
  "url": "https://www.newco.com/your_new_custom_url",
}

rf.updateWebhook(webhook_uuid, body)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "url": "https://www.newco.com/your_new_custom_url",
  "type": "TRANSFER"
  "rfuuid": "1fd45635-njda-4f5b-805c-04961jk38r9",
  "failed_count": 0,
  "retry_count": 0
}

This endpoint updates information about a webhook.

HTTP Request

PUT https://api.routefusion.co/v1/webhooks/<webhook_uuid>

Body

Column Type Description
url STRING Your unique URL that you will recieve updates to
type STRING The type of object (TRANSFER, USER, BENEFICIARY)
rfuuid UUID The UUID of Routefusion object you would like to monitor

URL Parameters

Parameter Description
webhook_uuid your webhook uuid

Index webhooks

const rf = require('routefusion-sdk').Instance();

rf.getWebhooks()
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

[
  {
    webhook1
  },
  {
    webhook2
  }
]

This endpoint retreives all the info on your users.

HTTP Request

GET https://api.routefusion.co/v1/webhooks/

Create webhook

const rf = require('routefusion-sdk').Instance();

let body = {
  type: TRANSFER,
  url: 127.0.0.1/transfers,
  rfuuid: "37cba64b-1a22-4732-be22-04826da09405"
}

rf.createWebhook(body)
  .then(resp => resp)
  .catch(err => err)

The above command returns JSON structured like this:

{
  "id": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "url": "https://www.newco.com/your_new_custom_url",
  "type": "TRANSFER"
  "rfuuid": "1fd45635-njda-4f5b-805c-04961jk38r9",
  "failed_count": 0,
  "retry_count": 0
}

This endpoint updates information about your user profile.

HTTP Request

POST https://api.routefusion.co/v1/webhooks

Body

Column Type Description Required
url STRING Your unique URL that you will recieve updates to yes
type STRING The type of object (TRANSFER, USER, BENEFICIARY) yes
rfuuid UUID The UUID of Routefusion object you would like to monitor yes

URL Parameters

None

Delete webhook

const rf = require('routefusion-sdk').Instance();

rf.deleteWebhook(WEBHOOK_UUID)
  .then(resp => resp)
  .catch(err => err)

The above command returns:


200 ok

This endpoint retrieves information about a webhook.

HTTP Request

DELETE https://api.routefusion.co/v1/webhooks/<webhook_uuid>

URL Parameters

Parameter Description
webhook_uuid your webhook uuid

KYC Verification

Send KYC information

const rf = require('routefusion-sdk').Instance();

let payload = {
  agreedToTerms: true,
  allowAccountManagement: true,
  address: "600 Congress Ave.",
  city: "Austin",
  companyName: "Routefusion",
  country: "US",
  dateOfIncorporation: "2009-04-07",
  dba: true,
  dbaName: "Some Cool Name",
  incorporationNumber: "29-1234567",
  officers: [
    {
      address: "777 Lucky St.",
      citizenship: "US",
      city: "Palmer",
      dob: "1978-06-22",
      firstName: "John",
      idNumber: "123456789",
      idType: "ssn",
      jobTitle: "Director of Sales",
      lastName: "Doe",
      owner: true,
      ownership: "50",
      postalCode: "78949",
      state: "TX",
      title: "Mr."
    },
    {
      // more officers
    }
  ],
  owners: [
    {
      {
      address: "900 Test Dr.",
      citizenship: "US",
      city: "Goergetown",
      dob: "1981-03-23",
      firstName: "Jason",
      idNumber: "987654321",
      idType: "ssn",
      jobTitle: "Technical Director",
      lastName: "Stathom",
      owner: true,
      ownership: "50",
      postalCode: "75765",
      state: "TX",
      title: "Mr."
    },
    {
      // more owners
    }
  ],
  payments: {
    countries: [
      "IT",
      "MX",
      "AU"
    ],
    frequency: "monthly",
    purpose: "Contract Labor",
    volume: "100000"
  },
  phone: "88881355888",
  postalCode: "75745",
  state: "TX",
  structure: "llc",
  website: "www.testCompany.com"
};

rf.sendVerificationData(payload)
  .then(resp => resp)
  .catch(err => err)

The above returns a success message

"Success"

This endpoint takes in user KYC information and begins to validate/on-board them. To recieve updates on the approval process please create a webhook request for your USER, or monitor the status of the USER.

HTTP Request

POST https://api.routefusion.co/v1/users/<USER ID>/verify

URL Parameters

Parameter Description Required
USER ID id of user to send verification data on behalf of yes

Body

Column Type Required
agreedToTerms STRING yes
allowAccountManagement STRING yes
address STRING yes
city STRING yes
companyName STRING yes
country STRING yes
dateOfIncorporation STRING yes
dba STRING yes
dbaName STRING yes
incorporationNumber STRING yes
phone STRING yes
postalCode STRING yes
state STRING yes
structure STRING yes
website STRING yes
officers STRING yes
owners STRING yes
payments STRING yes
countries STRING yes
frequency STRING yes
volume STRING yes

Currency Coverage

Get Currencies

curl https://api.routefusion.co/currencies

The above returns an array of objects containing our currency coverage

[
  {currencyCode: "QQQ", currency: "Qurrency", country: "Qurrent"},
  {currencyCode: "QQQ", currency: "Qurrency", country: "Qurrent"},
  ...
]

This endpoint lists out all of our available currencies.

HTTP Request

GET https://api.routefusion.co/currencies

Wire Instructions

Get Wire Instructions

The above returns an array of objects containing our currency coverage

[
    {
        "Currency": "USD",
        "PaymentInstructions": "Bank Wire Instructions..."
    }
]

Use this endpoint to get the wire instructions to fund a payment. If you are in the US we recommend you setup with ACH pull as this creates a more seamless process for you.

HTTP Request

GET https://api.routefusion.co/v1/instructions?currency_code=<CURRENCY_CODE>

Query Parameters

Parameter Description
CURRENCY_CODE 3 character iso currency code

Errors

The RouteFusion International Payments API uses the following error codes:

Error Code Meaning
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
410 Gone
418 I'm a teapot.
429 Too Many Requests
500 Internal Server Error
503 Service Unavailable