Transfer funds to yourself

When the same person or company is on both sides of a transfer, we call that a self-to-self transfer. Some examples of self-to-self transfers include:

  • A company transferring funds between accounts at two separate banks
  • A contractor moving money from their Moov wallet to their bank account
  • A platform adding funds from their bank account to their Moov wallet

In this guide, we’ll be covering the flow for creating a self-to-self transfer. We’ll use an example where you’re performing a transfer from your wallet to your bank account. For the purposes of this guide, we’ll assume that you’ve created a Moov account and gotten your API keys. For more detailed instructions, see our quick start guide.

1. Set up the account

Start by creating your Moov account. Request the send-funds capability for the account. You will need to submit specific data about the user to Moov for verification before the capability is enabled. See our capabilities guide for a list of required information.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
curl -X POST "https://api.moov.io/accounts" \
  -H "Authorization: Bearer {token}" \
  --data-raw '{
    "accountType": "individual",
    "profile": {
      "individual": {
        "email": "julesjacksonyoga@moov.io",
        "name": {
          "firstName": "Jules",
          "lastName": "Jackson",
        }
      },
      "capabilities": ["send-funds"],
      "foreignID": "your-correlation-id"
    }
  }'\
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
mc, _ := moov.NewClient()

mc.CreateAccount(ctx, moov.CreateAccount{
  Type: moov.AccountType_Business,
  Profile: moov.CreateProfile{
    Business: &moov.CreateBusinessProfile{
      Name: "Whole Body Fitness LLC",
      Type: moov.BusinessType_Llc,
    },
  },
  RequestedCapabilities: []moov.CapabilityName{
    moov.CapabilityName_SendFunds,
  },
  ForeignID: "your-correlation-id",
})
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
const moov = new Moov(credentialsOjbect);

const accountPayload = {
  accountType: "individual",
  profile: {
    individual: {
      email: "julesjacksonyoga@moov.io",
      name: {
        firstName: "Jules",
        lastName: "Jackson"
      }
    }
  },
  capabilities: ["send-funds"],
  foreignID: "your-correlation-id"
};

const account = await moov.accounts.create(accountPayload);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
const moov = Moov(token);

const accountPayload = {
  accountType: "individual",
  profile: {
    individual: {
      email: "julesjacksonyoga@moov.io",
      name: {
        firstName: "Jules",
        lastName: "Jackson"
      }
    }
  },
  capabilities: ["send-funds"],
  foreignID: "your-correlation-id"
};

const account = await moov.accounts.create({accountPayload});

2. Add bank account

Next, link your bank account account to your Moov account.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
curl -X POST "https://api.moov.io/accounts/{accountID}/bank-accounts" \
  -H "Authorization: Bearer {token}" \
  --data-raw '{
    "account": {
      "accountNumber": "0004321567000",
      "bankAccountType": "checking",
      "holderName": "Jules Jackson",
      "holderType": "individual",
      "routingNumber": "123456789"
    }
  }'\
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
const moov = new Moov(credentialsObject);

const accountID = "accountID";
const bankAccountPayload = {
  bankAccount: {
    accountNumber: "0004321567000",
    bankAccountType: "checking",
    holderName: "Jules Jackson",
    holderType: "individual",
    routingNumber: "123456789"
  }
}

const response = await moov.bankaccounts.link(accountID, bankAccountPayload);
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
const moov = Moov(token);

const accountID = "accountID";
const bankAccountPayload = {
  accountNumber: "0004321567000",
  bankAccountType: "checking",
  holderName: "Jules Jackson",
  holderType: "individual",
  routingNumber: "123456789"
};

moov.accounts.bankAccounts.link({accountID, bankAccountPayload});

4. Get payment methods

First, get a list of the available payment methods from the generate transfer options POST endpoint. Specify your account ID as both the source and the destination. You will get a list that includes all the payment methods you can use to make a self-to-self transfer. The payment method for the source of the transfer will be moov-wallet, while the payment method for the destination will be ach-credit-standard or ach-credit-same-day.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
curl -X POST "https://api.moov.io/transfer-options" \
  -H "Authorization: Bearer {token}" \
  --data-raw '{
    "amount": {
      "value": 100,
      "currency": "USD"
    }
    "destination": {
      "accountID": "UUID"
    },
    "source": {
      "accountID": "UUID"
    }
  }'\
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
const moov = new Moov(credentialsObject);

const transferOptions = {
  amount: {
    value: 100, 
    currency: "USD"
  },
  destination: {
    accountID: UUID
  },
  source: {
    accountID: UUID
  }
}

const options = await moov.transfers.getTransferOptions(transferOptions);

5. Initiate the transfer

Once you’ve selected your payment methods, you can initiate a transfer from your bank account to your wallet, using the payment method IDs you got earlier in the transfer options request.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
curl -X POST "https://api.moov.io/transfers" \
  -H "Authorization: Bearer {token}" \
  -H "X-Idempotency-Key: UUID" \
  -H "X-Wait-For: rail-response" \
  --data-raw '{
    "amount": {
      "value": 100,
      "currency": "USD"
    },
    "destination": {
      "paymentMethodID": "UUID"
    },
    "source": {
      "paymentMethodID": "UUID"
    },
    "description": "Optional transaction description."
  }'\
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
mc, _ := moov.NewClient()

mc.CreateTransfer(ctx, moov.CreateTransfer{
  Amount: moov.Amount{
    Currency: "usd",
    Value:    100, // $1.00
  },
  Destination: moov.CreateTransfer_Destination{
    PaymentMethodID: "UUID",
  },
  Source: moov.CreateTransfer_Source{
    PaymentMethodID: "UUID",
  },
  Description: "Optional transaction description.",
})
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
const moov = new Moov(credentialsObject);

const transfer = await moov.transfers.create({
  amount: {
    value: 100,
    currency: "USD"
  },
  destination: {
    paymentMethodID: "UUID"
  },
  source: {
    paymentMethodID: "UUID"
  },
  description: "Optional transaction description."
});

What’s next

Feel free to explore Moov.js, our in-browser JavaScript SDK. Or, if you’re interested in other use cases, you can dive into our guides:

Summary Beta