Account

Accounts represent a legal entity (either a business or an individual) in Moov. You can create an account for yourself or set up accounts for others. You can retrieve an account to get details on the business or individual account holder, such as an email address or employer identification number (EIN). You can also look at the account object to see what capabilities that account has.

Create account

You can create accounts for your users by passing the required information to Moov.

Parameters

Name Type
account Account
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
const moov = Moov(token);

const account = await moov.accounts.create({
  "accountType": "business",
  "profile": {
    "business": {
      "legalBusinessName": "Whole Body Fitness LLC",
      "businessType": "llc",
    }
  },
  "foreignId": "your-correlation-id",
  "capabilities": ["transfers"]
})

Get account

Retrieves details for the account with the specified ID.

Parameters

Name Type
accountID UUID string
1
moov.accounts.get({accountID});

Update account

If an account’s details have changed, you can update the information associated with a specific account ID.

Parameters

Name Type
accountID UUID string
account Account
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
const updatedAccount = {
  "accountType": "business",
  "profile": {
    "business": {
      "legalBusinessName": "ClassBooker",
      "businessType": "llc",
    }
  } 
};
moov.accounts.update(updatedAccount);

Platform agreement

Each account must agree to the Moov terms of service before you can create a transfer with that account. In your application, you must display a link to the Moov platform agreement, and have them accept those terms.

To accept the platform agreement terms of service via Moov.js, you can pass the account ID into the following method. This will generate a terms of service token and update the account in one step.

Name Type
accountID UUID string
1
 moov.accounts.acceptTermsOfService({ accountID: "..." } );

If you need to generate a terms of service token to pass to the Moov API, you can call the following method.

1
 moov.accounts.getTermsOfServiceToken();