GraphQL API Built for Developers

Users
Entities
Beneficiaries
Transfers

javascript

First create a user on Routefusion


// mutation createUser

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createUser ($email: Email!, $first_name: String, $last_name: String, $admin: Boolean, $send_invite_email: Boolean) {
    createUser (email: $email, first_name: $first_name, last_name: $last_name, admin: $admin, send_invite_email: $send_invite_email)
}`,
  variables: {"email":"jorge@posada.com","first_name":"Jorge","last_name":"Posada","admin":true,"send_invite_email":false}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer [your token]',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above command returns JSON structured like this:


{
    "data": {
        "createUser": "28291265-e6f7-488c-94c4-5905bbcf779a"
    }
}

javascript

Then create an entity (payor).


// mutation createBusinessEntity

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createBusinessEntity ($user_id: UUID!, $email: Email!, $phone: String, $contact_first_name: String!, $contact_last_name: String!, $business_name: String!, $business_address1: String!, $business_address2: String, $business_city: String, $business_state_province_region: String, $business_postal_code: PostalCode, $business_country: ISO3166_1!, $tax_number: TaxNumber, $officers: [OfficerInput], $accept_terms_and_conditions: Boolean!) {
    createBusinessEntity (user_id: $user_id, email: $email, phone: $phone, contact_first_name: $contact_first_name, contact_last_name: $contact_last_name, business_name: $business_name, business_address1: $business_address1, business_address2: $business_address2, business_city: $business_city, business_state_province_region: $business_state_province_region, business_postal_code: $business_postal_code, business_country: $business_country, tax_number: $tax_number, officers: $officers, accept_terms_and_conditions: $accept_terms_and_conditions)
}`,
  variables: {"user_id":"bec28c73-046b-4366-9e2c-cf043bc2e196","email":"ny@yankees.com","phone":"","contact_first_name":"Aaron","contact_last_name":"Boone","business_name":"New York Yankees","business_address1":"1 E 161 St.","business_address2":"","business_city":"Bronx","business_state_province_region":"NY","business_postal_code":"10451","business_country":"US","tax_number":"","officers":{"first_name":"Harold","last_name":"Steinbrenner","percent_ownership":100,"director":true,"occupation":"owner","birth_date":"1969-12-03T00:00:00Z"},"accept_terms_and_conditions":true}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer [your token]',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above returns JSON structured like this:


{
    "data": {
        "createBusinessEntity": "43033d1c-7bf0-4462-a6fe-a74aa1869725"
    }
}

javascript

Now create a beneficiary for whom to send money to.


// mutation createPersonalBeneficiary

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createPersonalBeneficiary ($user_id: UUID!, $entity_id: UUID!, $email: Email!, $phone: String, $first_name: String!, $last_name: String!, $address1: String, $address2: String, $city: String, $state_province_region: String, $postal_code: PostalCode, $country: ISO3166_1!, $tax_number: TaxNumber, $name_on_bank_account: String, $swift_bic: SwiftBic, $account_number: BankAccountNumber, $routing_code: BankRoutingCode, $currency: ISO4217!, $bank_name: String, $branch_name: String, $bank_address1: String, $bank_address2: String, $bank_city: String, $bank_state_province_region: String, $bank_postal_code: PostalCode, $bank_country: ISO3166_1!) {
    createPersonalBeneficiary (user_id: $user_id, entity_id: $entity_id, email: $email, phone: $phone, first_name: $first_name, last_name: $last_name, address1: $address1, address2: $address2, city: $city, state_province_region: $state_province_region, postal_code: $postal_code, country: $country, tax_number: $tax_number, name_on_bank_account: $name_on_bank_account, swift_bic: $swift_bic, account_number: $account_number, routing_code: $routing_code, currency: $currency, bank_name: $bank_name, branch_name: $branch_name, bank_address1: $bank_address1, bank_address2: $bank_address2, bank_city: $bank_city, bank_state_province_region: $bank_state_province_region, bank_postal_code: $bank_postal_code, bank_country: $bank_country)
}`,
  variables: {"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"43033d1c-7bf0-4462-a6fe-a74aa1869725","email":"dj@jeter.com","phone":"","first_name":"Derek","last_name":"Jeter","address1":"2 E 121 St.","address2":"","city":"Bronx","state_province_region":"NY","postal_code":"10451","country":"US","tax_number":"","name_on_bank_account":"Derek","swift_bic":"CITIUS12","account_number":"00000002","routing_code":"113596002","currency":"USD","bank_name":"Citibank","branch_name":"","bank_address1":"","bank_address2":"","bank_city":"Bronx","bank_state_province_region":"","bank_postal_code":"","bank_country":"US"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer [your token]',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above command returns JSON structured like this:


{
    "data": {
        "createPersonalBeneficiary": "2d730dca-8640-42f1-9573-5fe398bdcc92"
    }
}

javascript

Finally create your transfer! Its that easy 😀


// mutation createTransfer

var axios = require('axios');
var data = JSON.stringify({
  query: `mutation createTransfer ($user_id: UUID!, $entity_id: UUID!, $source_amount: String, $source_currency: ISO4217, $destination_amount: String, $account_id: UUID, $beneficiary_id: UUID!, $purpose_of_payment: String!, $reference: String) {
    createTransfer (user_id: $user_id, entity_id: $entity_id, source_amount: $source_amount, source_currency: $source_currency, destination_amount: $destination_amount, account_id: $account_id, beneficiary_id: $beneficiary_id, purpose_of_payment: $purpose_of_payment, reference: $reference)
}`,
  variables: {"user_id":"28291265-e6f7-488c-94c4-5905bbcf779a","entity_id":"a530debe-898f-447b-836c-1ba7d3001d91","source_amount":"100","source_currency":"GBP","beneficiary_id":"63b6747c-6706-4fe7-8112-10329fd07cf1","purpose_of_payment":"athletic services","reference":"hit 3000"}
});

var config = {
  method: 'post',
  url: 'https://sandbox.external.routefusion.com/graphql',
  headers: {
    'Authorization': 'Bearer [your token]',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above returns JSON structured like this:


{
    "data": {
        "createTransfer": "18ea46e5-2c36-4862-9eac-adc44364df7b"
    }
}

Why Routefusion

Routefusion gets you access to a network of over 7+ banking and FX partners.

Routefusion's easy onboarding allows you to immediately connect with multiple banking, FX, and local payout partners around the globe, ensuring that all of your requirements are met. No more sales processes, no more NDA's signed, and no more miserable developer docs to sort through! We are a one-stop-shop for all of your international payment needs.

We’ve got you covered

Developers

Routefusion was built by and for software engineers. We pride ourselves on having the best documentation.

Founders

You dont have time to spend 6+ months finding a banking or payouts partner that will not scale with you.

Product Owners

Dont worry about how you are going to build, just worry about what you are going to build. We will take care of the rest.

A powerful feature set

Global Mass Payouts

Whether you are a payroll company, marketplace, platform, or bank, you can use Routefusion to send your payouts and distributions from any country to any country all over the world.

Local Payment Rails

Use Routefusion for your ACH, SPEI, SEPA, or any other local payout method around the globe.

Accept Pay-ins

Accept pay-ins in 45+ countries around the globe.

SWIFT Wires

Do you need traceability, receipts, and accountability for your large customer or business payments? Use Routefusion for all of your international SWIFT payment needs.

Fanatical Customer Support

Customer support at Routefusion is like oxygen. We LOVE providing our customers with fanatical customer support. Whether its late night or early mornings or any time in between we are always one slack, email, or text message away.

Beneficiary Validation

Tired of hearing from customers that their beneficiary still hasn't received a payment. With Routefusion you get access to our beneficiary validator which will improve your delivery rates by 99.98%

Ready to get started?

Contact us or get started now.