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 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": 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 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": 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

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 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": 6,
    "uuid": "b45b64de-c620-4f18-bfad-5bdefcb522c1",
    "user_id": 1,
    "company_name": "",
    "first_name_on_account": "China",
    "last_name_on_accout": "China",
    "type": "personal",
    "bank_name": "中国建设银行",
    "branch_name": "中国建设银行",
    "bank_city": "中国建设银行",
    "account_type": "personal",
    "account_number": "12345678910",
    "beneficiary_email": "china.china@china.com",
    "beneficiary_phone_number": "1231231234",
    "country": "CN",
    "city": null,
    "bank_province": "中国建设银行",
    "currency": "CNY",
    "cpfcnpj": ""
  },
  {
    ...
]

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": 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 user profile.

HTTP Request

GET https://api.routefusion.co/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:

{
  "company_name": "beneficiaryCompany",
  "first_name_on_account": "companyOwnerFirstName",
  "last_name_on_account": "companyOwnerLastName",
  "type": "business",
  "currency": "USD",
  "bank_name": "Citibank",
  "bank_address1": "5252 Madison Ave.",
  "bank_city": "New York City",
  "bank_state_province": "New York",
  "bank_postal_code": "00000",
  "bank_country": "US",
  "swift_bic": "CITINY732",
  "account_type": "business",
  "account_number": "2315345432",
  "routing_number": "113193532",
  "email": "company@email.com",
  "address1": "beneficiaryAddress",
  "city": "beneficiaryCity",
  "state_province": "beneficiaryStateOrProvince",
  "postal_code": "00000",
  "country": "US"
}

This endpoint creates a beneficiaries.

HTTP Request

POST https://api.routefusion.co/users/<YOUR USER ID>/beneficiaries/<ID>

URL Parameters

Parameter Description Required
ID Your user_id required
BENEFICIARY_ID your beneficiary_id required

Body

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

Column Type Required Notes
first_name_on_account STRING required
last_name_on_account STRING required
account_number STRING required use IBAN number as account_number if available
bank_country STRING required
bank_name STRING required
currency STRING required
address1 STRING required
country STRING required
city STRING required
street STRING required
state STRING optional
postal_code STRING required
company_name STRING depends required if the type is BUSINESS
type STRING required PERSONAL or CORPORATE

USA (USD) beneficiary:

all of the base fields plus+

Column Type Required Notes
routing_number STRING required bank routing number
tax_number STRING depends this is the EIN/TIN number required for payments to corporates/businesses
email_address STRING depends required for payments to corporates/businesses
company_name STRING depends required for payments to corporates/businesses
phone_number STRING required required for both personal and corporates

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.

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.

Europe (EUR) beneficiary:

all of the base fields plus+

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

United Kingdom (GBP) beneficiary:

all of the base fields plus+

Column Type Required Notes
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.

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

Philippines (PHP) 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
state_province STRING required Region / Province of Philippines beneficiary resides in

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)

China (CNY) beneficiary:

all of the base fields plus+

Column Type Required Notes
bank_name STRING required Beneficiary bank name in Chinese characters
branch_name STRING required Beneficiary branch name in Chinese characters
bank_city STRING required Beneficiary bank city in Chinese characters
bank_province STRING required Beneficiary bank province in Chinese characters

INDIVIDUALS

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.

CORPORATES

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

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": 1,
  "uuid": "07d15675-bc7a-4f5b-805c-04961af401f2",
  "username": "whoismikejones",
  "first_name": "Johnny Two Step",
  "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 one of your beneficiaries.

HTTP Request

PUT https://api.routefusion.co/users/<YOUR USER ID>/beneficiaries/<ID>

URL Parameters

Parameter Description
ID Your user_id
BENEFICIARY_ID your beneficiary_id

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

Quotes

Create a quote

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

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

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

HTTP Request

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

URL Parameters

Parameter Description Required
source_amount source currency amount yes
source_currency currency to be sold yes
destination_currency currency to be bought yes

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 transferPayloadWithQuote = {
  beneficiary_id: 1,
  source_amount: 1000,
  quote_uuid: "QUca9e8220-eccb-4957-8fd0-ab6623f83ff5"
};

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

rf.createTransfer(transferPayloadWithQuote)
  .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/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 yes
quite_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
}

This endpoint get the status of an existing transfer.

HTTP Request

GET https://api.routefusion.co/transfers/:uuid/status

Body

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:

[
  {
    transaction1
  },
  {
    transaction2
  }
]

This endpoint lists out all of your transactions.

HTTP Request

POST https://api.routefusion.co/users/<USER_ID>/transactions

URL Parameters

Parameter Description
user_id user_id

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

None

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

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
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

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

None

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
agreedToTerms yes
allowAccountManagement yes
address yes
city yes
companyName yes
country yes
dateOfIncorporation yes
dba yes
dbaName yes
incorporationNumber yes
phone yes
postalCode yes
state yes
structure yes
website yes
officers yes
owners yes
payments yes
countries yes
frequency yes
volume 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

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