Skip to content

Quick start

Here’s an overview of how you can start developing with Moov.

Getting ready to build

Create a dashboard account

If you are a current Moov customer and don’t have a dashboard account, create one here.

Get API keys

Once you have a dashboard account with Moov, you can create and configure your api keys in the dashboard. You will need to add any domains you use for testing and production to our allowed list to help secure your application. You can do so via the domains field on the API key.

After completing these steps, you’ll be ready to add accounts, add payment methods and initiate a transfer, which we’ll also cover in this guide.

Be sure to read up on Moov’s core concepts.

Verify your account

While you can start adding accounts, and payment methods you wont be able to facilitate any transfers until your account has been verified with Moov. You will need to add the required information to the business details page in the dashboard.

Start building

Now that you have your API keys, you can start the process of developing your application.

Install and auth

Within your server-side application, you’ll generate a single-use access token containing information needed to communicate with your Moov account securely. Once you’ve generated this token, you can use it to make calls from the server or send it back to your client to use with Moov.js.

Diagram showing token generation process

Add Moov.js

Moov.js is a browser client that collects PII data so you don’t have to be responsible for handling and storing sensitive customer information. Use Moov.js to expedite setting up your payments flow and streamline your interactions with the Moov API.

You can add Moov.js to your web application by including the script tag or using npm.

1
2
3
4
<script type="text/javascript" src="https://js.moov.io/v1"></script>
<script>
    const moov = Moov(token)
</script>
1
npm i @moovio/moov-js
1
2
3
4
import { loadMoov } from '@moovio/moov-js';

const moovToken = "{{ACCESS_TOKEN}}";
const moov = await loadMoov(moovToken);

Create an access token

For each action you take you will need a unique short lived access token. The example below generates a token that can create a new account using the /accounts.write scope.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
const fetch = require("node-fetch");
const keys = Buffer.from(`${public_key}:${private_key}`).toString("base64");
const response = await fetch("http://api.moov.io/oauth2/token?grant_type=client_credentials", {
    method: "POST",
    headers: {
        "Authorization": `Basic ${keys}`,
        "Content-Type": "application/x-www-form-urlencoded"
    },
    body: {
      scopes: "scopes=/accounts.write"
    }
});
const data = await response.json();
const token = data.access_token;
1
2
3
4
5
curl -X POST "https://api.moov.io/oauth2/token" \
  -u "client_id:client_secret" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "grant_type=client_credentials"
  --data-urlencode  "scopes=/accounts.write"

Scopes

A scope is a permission that determines the limits of what a specific account can do on another account. For example, you may want an account to request money from another account but not pull money from another account. In other instances, you may want to set the scope for an account only to receive money from other accounts.

Setting up accounts

After you have generated a token, you can take all further actions directly from your web application using our browser library Moov.js.

Create an account

To start paying others, you can set up others with Moov accounts. If you’d like to link a Moov account to an account in your system, you have the option to pass a foreign ID.

Required scope to create the access token

1
/accounts.write
1
2
3
4
5
6
7
8
9
moov.accounts.create({
  "accountType": "business",
  "profile": {
    "business": {
      "legalBusinessName": "Whole Body Fitness LLC",
      "businessType": "llc",
    }
  }
})
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
const fetch = require("node-fetch");
const response = await fetch(
  "http://api.moov.io/accounts", {
  method: "POST",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  },
  body: {
    "accountType": "business",
    "profile": {
      "business": {
        "legalBusinessName": "Whole Body Fitness LLC",
        "businessType": "llc",
      }
    }
  }
});
const data = await response.json();
const token = data.access_token;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
curl -X POST https://api.moov.io/accounts
  -H 'Authorization: Bearer {token}' \
  -H "Content-Type: application/json" \
  -data-raw '{
    "accountType": "business",
    "profile": {
      "business": {
        "legalBusinessName": "Whole Body Fitness LLC",
        "businessType": "llc",
      }
    }
  }'

Request capabilities

Required scope to create the access token. Replace {ACCOUNT_ID} with the id of the account you want to request the capability for. If you are unsure of what capability you need, you can read more in the capabilities guide

1
/accounts/{accountID}/capabilities.write
1
2
3
4
const accountID = accountID;
const capabilities = ["transfers", "send-funds", "collect-funds", "wallet", "receive-1099-nec", "receive-1099-k"];

moov.accounts.capabilities.request({accountID, capabilities});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
const fetch = require("node-fetch");
const response = await fetch(
  "https://api.moov.io/accounts/{accountID}/capabilities/{capabilityID}", {
  method: "POST",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  },
  body: {
    "capabilities": [
      "transfers", 
      "send-funds", 
      "collect-funds", 
      "wallet", 
      "receive-1099-nec", 
      "receive-1099-k"
    ]
  }
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
curl -X POST https://api.moov.io/accounts/{accountID}/capabilities/{capabilityID}
  -H 'Authorization: Bearer {token}' \
  -H "Content-Type: application/json" \
  -data-raw '{
    "capabilities": [
      "transfers", 
      "send-funds", 
      "collect-funds", 
      "wallet", 
      "receive-1099-nec", 
      "receive-1099-k"
    ]
  }'

Add payment methods

You don’t create a payment method directly. Payment methods are created for you when you add a bank account, link a card, or are approved for a Moov wallet.

To move funds, you’ll need to link a bank account. Once the linked bank account is verified, you are ready to move money.

Required scope to create the access token

1
/accounts/{accountID}/bank-accounts.write
1
/accounts/{accountID}/cards.write
1
A payment method for a wallet is added when the `wallet` capability for that account has been approved.

Add a bank account

1
2
3
4
5
6
7
8
9
const accountID = accountID;
const bankAccount = {
  "holderName": "Jules Jackson",
  "holderType": "individual",
  "accountNumber": "0004321567000",
  "bankAccountType": "checking",
  "routingNumber": "123456789"
};
moov.accounts.bankAccounts.link({accountID, bankAccount});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
const fetch = require("node-fetch");
const response = await fetch(
  "https://api.moov.io/accounts/{account_id}/bank-accounts ", {
  method: "POST",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  },
  body: {
    "holderName": "Jules Jackson",
    "holderType": "individual",
    "accountNumber": "0004321567000",
    "bankAccountType": "checking",
    "routingNumber": "123456789"
  }
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
curl -X POST https://api.moov.io/accounts/{account_id}/bank-accounts \
  -H 'Authorization: Bearer {token}' \
  -H "Content-Type: application/json" \
  --data-raw '{
    "account": {
      "holderName": "Jules Jackson",
      "holderType": "individual",
      "accountNumber": "0004321567000",
      "bankAccountType": "checking",
      "routingNumber": "123456789"
    }
  }'
Bank accounts added manually need to be verified via micro-deposits.

Initiate micro-deposits

1
2
3
const accountID = accountID;
const bankAccountID = bankAccountID;
moov.accounts.bankAccounts.startMicroDepositVerification({accountID, bankAccountID});
1
2
3
4
5
6
7
8
9
const fetch = require("node-fetch");
const response = await fetch(
  "https://api.moov.io/accounts/{accountID}/bank-accounts/{bankAccountID}/micro-deposits ", {
  method: "POST",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  }
});
1
2
3
curl -X POST https://api.moov.io/accounts/{accountID}/bank-accounts/{bankAccountID}/micro-deposits \
  -H 'Authorization: Bearer {token}' \
  }'

Confirm micro-deposits

1
2
3
4
const accountID = accountID;
const bankAccountID = bankAccountID;
const amounts = [12, 45];
moov.accounts.bankAccounts.completeMicroDepositVerification({accountID, bankAccountID, amounts});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const fetch = require("node-fetch");
const response = await fetch(
  "https://api.moov.io/accounts/{accountID}/bank-accounts/{bankAccountID}/micro-deposits", {
  method: "POST",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  },
  body: {
    "amounts": [
      18,
      21
    ]
  }
});
1
2
3
4
5
6
7
8
9
curl -X POST https://api.moov.io/accounts/{accountID}/bank-accounts/{bankAccountID}/micro-deposits \
  -H 'Authorization: Bearer {token}' \
  -H "Content-Type: application/json" \
  --data-raw '{
    "amounts": [
      18,
      21
    ]
  }'

Moving money

Get the payment method

A payment method specifies the way a Moov account will be moving money. There are several different methods for transferring money with Moov. For example, you can transfer money from the Moov wallet, or you might want to pull funds from another account through ACH debit. Before making a transfer, you will need to get a payment method.

Required scope to create the access token. Replace the accountID with the id for the account facilitating the transfer.

1
/accounts/{accountID}/transfers.read
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
const source = {
  accountID: "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
  // or
  paymentMethodID: "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
};
const destination = {
  accountID: "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
  // or
  paymentMethodID: "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
};
const amount = {
  currency: "USD",
  value: 1204
};
moov.transfers.getOptions({accountID, source, destination, amount});

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
const fetch = require("node-fetch");
const response = await fetch(
  "https://api.moov.io/accounts/{application_account_id}/transfers-options", {
  method: "GET",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  },
  body: {
     "source": {
      "accountId": "UID",
    },
    "destination": {
      "accountId": "UID",
    },
    "amount": {
      "value": 100,
      "currency": "usd"
    }
  }
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
curl -X GET https://api.moov.io/accounts/{application_account_id}/transfers-options \
  -H 'Authorization: Bearer {token}' \
  --data-raw '{
    "source": {
      "accountId": "UID",
    },
    "destination": {
      "accountId": "UID",
    },
    "amount": {
      "value": 100,
      "currency": "usd"
    }
  }'

Make the transfer

To initiate a transfer, provide the two payment method IDs and the amount you want to send.

Required scope to create the access token. Replace the accountID with the id for the account facilitating the transfer.

1
/accounts/{accountID}/transfers.write
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
const transfer = {
  source: {
    paymentMethodID: "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
  },
  destination: {
    paymentMethodID: "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
  },
  amount: {
    currency: "USD",
    value: 1204
  },
  description: "Pay Instructor for May 15 Class"
};
moov.transfers.create({transfer});


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
const fetch = require("node-fetch");
const response = await fetch(
  "https://api.moov.io/accounts/{application_account_id}/transfers", {
  method: "GET",
  headers: {
      "Authorization": `Bearer ${token}`,
      "Content-Type": "application/json"
  },
  body: {
    "source": {
      "paymentMethodID": "UID",
    },
    "destination": {
      "paymentMethodID": "UID",
    },
    "amount": {
      "value": 100,
      "currency": "usd"
    },
    "description": "Paying Jules for last 4 classes"
  }
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
curl -X GET https://api.moov.io/accounts/{application_account_id}/transfers \
  -H 'Authorization: Bearer {token}' \
  --data-raw '{
    "source": {
      "paymentMethodID": "UID",
    },
    "destination": {
      "paymentMethodID": "UID",
    },
    "amount": {
      "value": 100,
      "currency": "usd"
    },
    "description": "Paying Jules for last 4 classes"
  }'

What’s next

Once you’ve gotten set up, you can continue to make transfers or accept payments. You can also customize your account settings, add team members, and manage roles and permissions in the Moov dashboard. Feel free to explore our API reference to see example requests/responses or get more context on a particular endpoint.


Articles in this section