> ## Documentation Index
> Fetch the complete documentation index at: https://developers.dwolla.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Money

> Learn the key steps involved with sending funds to your end user's bank account.

## Overview

This guide is designed to get you up and running quickly with digital disbursements by creating a one-time transfer to an end user via the Dwolla API. In this guide we'll cover the basics of integrating the most lightweight payment flow, sending funds (also referred to as "payouts"), by outlining and walking through the necessary steps, to create a bank transfer. For simplicity, we'll represent a one-to-one transfer between two users, where the source user is identified as the Master Dwolla account and the destination user is an individual or business that has been on-boarded via the Dwolla API.

If your use case involves sending several digital disbursements in a single batch, it's recommended that you leverage our [Mass Payment API](https://developers.dwolla.com/api-reference/mass-payments), which allows you to send up to 5,000 payments with a single API request.

<img src="https://mintcdn.com/dwolla/C9LuhBlLWlq2MFvM/assets/images/content-images/funds-flow-send.gif?s=ef43ed698ef732a98c377e5391c88941" alt="Funds Flow Send Money" width="1750" height="900" data-path="assets/images/content-images/funds-flow-send.gif" />

### Key Concepts

In this quickstart guide, you'll learn the key concepts involved with sending money to a recipient's bank account via digital disbursements:

<Steps>
  <Step title="Choose and create the Customer type for your recipient">
    Select the appropriate Customer type (receive-only, verified, etc.) and create a new Customer record through the Dwolla API to represent your recipient.
  </Step>

  <Step title="Attach a funding source">
    Add a bank account as a funding source to your recipient's Customer record, which will serve as the destination for the funds transfer.
  </Step>

  <Step title="Retrieve available funding sources">
    Get a list of verified funding sources from both your Dwolla account and the recipient's account to use as source and destination for the transfer.
  </Step>

  <Step title="Send funds">
    Initiate a transfer from your verified funding source to the recipient's bank account using the Dwolla API.
  </Step>
</Steps>

## Before You Begin

We encourage you to create a sandbox account, if you haven't already. This will allow you to follow along with the steps outlined in this guide. Check out our [Sandbox guide](/docs/testing) to learn more.

After creating a sandbox account, you'll obtain your API Key and Secret, which are used to obtain an OAuth access token. An access token is required in order to authenticate against the Dwolla API. Learn more about how to [obtain an access token in our guide](/docs/auth).

Lastly, in this sandbox walkthrough, we recommend having an active webhook subscription. This will help notify your application of various events that occur within Dwolla. [Check out our guide to learn more](/docs/working-with-webhooks).

**Let's get started!**

## Step 1 - Create a recipient

Before your end user can receive funds to their connected bank account, they must be created as a Customer via the Dwolla API. The ability to send funds to end users is very flexible in that all Customer types can be used to leverage this funds flow. To learn more about the different types of Customers and the capabilities of each, check out our [developer resource article](/docs/customer-types).

### Create the Customer

While you can use any Customer type for this funds flow, we will be creating a `receive-only` user in this guide, as it offers a lightweight onboarding experience for users. Just as the name implies, receive-only users are only eligible to receive funds into their attached bank account.

<Note>
  Providing the IP address of the end user accessing your application as the
  <code>ipAddress</code> parameter. This enhances fraud detection and tracking.
</Note>

##### Request Parameters - Receive-only User

| Parameter    | Required? | Type   | Description                                                             |
| ------------ | --------- | ------ | ----------------------------------------------------------------------- |
| firstName    | yes       | string | Customer's first name                                                   |
| lastName     | yes       | string | Customer's last name                                                    |
| email        | yes       | string | Customer's email address                                                |
| type         | yes       | string | Value of `receive-only`                                                 |
| businessName | no        | string | Customer's registered business name (optional if not a business entity) |
| ipAddress    | no        | string | Customer's IP address                                                   |

<CodeGroup>
  ```bash create customer theme={"dark"}
  POST https://api-sandbox.dwolla.com/customers
  Content-Type: application/vnd.dwolla.v1.hal+json
  Accept: application/vnd.dwolla.v1.hal+json
  Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
  {
    "firstName": "Jane",
    "lastName": "Merchant",
    "email": "jmerchant@nomail.net",
    "type": "receive-only",
    "ipAddress": "99.99.99.99"
  }

  HTTP/1.1 201 Created
  Location: https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747
  ```

  ```ruby create_customer.rb theme={"dark"}
  request_body = {
    :firstName => 'Jane',
    :lastName => 'Merchant',
    :email => 'jmerchant@nomail.net',
    :type => 'receive-only',
    :ipAddress => '99.99.99.99'
  }

  # Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
  customer = app_token.post "customers", request_body
  customer.response_headers[:location] # => "https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747"
  ```

  ```javascript createCustomer.js theme={"dark"}
  var requestBody = {
    firstName: "Jane",
    lastName: "Merchant",
    email: "jmerchant@nomail.net",
    type: "receive-only",
    ipAddress: "99.99.99.99",
  };

  dwolla.post("customers", requestBody).then(function (res) {
    res.headers.get("location"); // => 'https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747'
  });
  ```

  ```python create_customer.py theme={"dark"}
  request_body = {
    'firstName': 'Jane',
    'lastName': 'Merchant',
    'email': 'jmerchant@nomail.net',
    'type': 'receive-only',
    'ipAddress': '99.99.99.99'
  }

  # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
  customer = app_token.post('customers', request_body)
  customer.headers['location'] # => 'https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747'
  ```

  ```php createCustomer.php theme={"dark"}
  <?php
  $customersApi = new DwollaSwagger\CustomersApi($apiClient);

  $customer = $customersApi->create([
    'firstName' => 'Jane',
    'lastName' => 'Merchant',
    'email' => 'jmerchant@nomail.net',
    'type' => 'receive-only'
    'ipAddress' => '99.99.99.99'
  ]);

  print($customer); # => "https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747"
  ?>
  ```
</CodeGroup>

When the Customer is successfully created on your application, you will receive a `201` HTTP response with an empty response body. You can reference the Location header to retrieve a link that represents the created Customer resource. We recommend storing the full URL for future use, as it will be needed for actions such as attaching a bank or correlating <Tooltip tip="Webhooks are automated notifications sent to your application when specific events occur in the Dwolla system">webhooks</Tooltip> that are triggered for the user in the Dwolla system.

### Handle Webhooks

If you have an active [webhook subscription](/docs/working-with-webhooks), you will receive the `customer_created` webhook immediately after the resource has been created.

## Step 2 - Adding a Funding Source

After creating our receive-only User, the next step is to attach a bank funding source. This will be the funding source where they will receive funds.

#### Bank Addition and Verification methods

Within Dwolla, the sending party must always verify their bank account in order to be eligible to create a transfer. Although it's recommended, the party that is receiving the funds does not need to undergo bank verification.

There are three ways of adding a bank to a Customer with the Dwolla API. A simplified table below outlines the similarities and differences of each method.

| Bank Addition Method                                                                                                  | Will the bank be `verified`?  | Required Information            |
| --------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ------------------------------- |
| API - Account & Routing Number                                                                                        | Optional - With Microdeposits | Bank Account and Routing Number |
| [Dwolla + Open Banking](/docs/open-banking)                                                                           | Yes                           | Online banking credentials      |
| [Drop-in components](/docs/drop-in-components)                                                                        | Optional - With Microdeposits | Bank Account and Routing Number |
| Third Party - Plaid ([Example](https://github.com/Dwolla/integration-examples/tree/main/dwolla-plaid-funding-source)) | Yes                           | Online Bank Credentials         |

<Note>
  For more information on securely submitting a user's bank details directly to
  Dwolla from the client-side of your application, reference our <a href="/docs/drop-in-components#create-a-funding-source">Drop-in Components
  </a>.
</Note>

### Adding a Bank to the Receive-only User

In this step, we will be adding a bank account to our receive-only user by collecting their bank details within a form on our application. After initial validation of the form fields, the user's bank details will be submitted to our back-end server where the API request is made to Dwolla to add a bank account.

##### Request Parameters - Create a Funding Source

| Parameter       | Required? | Type   | Description                                                              |
| --------------- | --------- | ------ | ------------------------------------------------------------------------ |
| routingNumber   | yes       | string | The bank routing number                                                  |
| accountNumber   | yes       | string | The bank account number                                                  |
| bankAccountType | yes       | string | Type of bank account: `checking` or `savings`                            |
| name            | yes       | string | Arbitrary nickname for the funding source. Must be 50 characters or less |

<CodeGroup>
  ```bash create customer funding source theme={"dark"}
  POST https://api.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747/funding-sources
  Content-Type: application/vnd.dwolla.v1.hal+json
  Accept: application/vnd.dwolla.v1.hal+json
  Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
  {
      "routingNumber": "222222226",
      "accountNumber": "123456789",
      "bankAccountType": "checking",
      "name": "Jane Merchant - Checking 6789"
  }

  HTTP/1.1 201 Created
  Location: https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31
  ```

  ```ruby create_funding_source.rb theme={"dark"}
  customer_url = 'https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747'
  request_body = {
    routingNumber: '222222226',
    accountNumber: '123456789',
    bankAccountType: 'checking',
    name: 'Jane Merchant - Checking 6789'
  }

  # Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
  funding_source = app_token.post "#{customer_url}/funding-sources", request_body
  funding_source.response_headers[:location] # => "https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31"
  ```

  ```javascript create_funding_source.js theme={"dark"}
  var customerUrl =
    "https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747";
  var requestBody = {
    routingNumber: "222222226",
    accountNumber: "123456789",
    bankAccountType: "checking",
    name: "Jane Merchant - Checking 6789",
  };

  dwolla.post(`${customerUrl}/funding-sources`, requestBody).then(function (res) {
    res.headers.get("location"); // => 'https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31'
  });
  ```

  ```python create_funding_source.py theme={"dark"}
  customer_url = 'https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747'
  request_body = {
    'routingNumber': '222222226',
    'accountNumber': '123456789',
    'bankAccountType': 'checking',
    'name': 'Jane Merchant - Checking 6789'
  }

  # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
  customer = app_token.post('%s/funding-sources' % customer_url, request_body)
  customer.headers['location'] # => 'https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31'
  ```

  ```php create_funding_source.php theme={"dark"}
  <?php
  $fundingApi = new DwollaSwagger\FundingsourcesApi($apiClient);

  $new_fs = $fundingApi->createCustomerFundingSource([
    "routingNumber" => "222222226",
    "accountNumber" => "123456789",
    "bankAccountType" => "checking",
    "name" => "Jane Merchant - Checking 6789"
    ], "https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747"
  );

  print($new_fs); # => https://api-sandbox.dwolla.com/funding-sources/375c6781-2a17-476c-84f7-db7d2f6ffb31
  ?>
  ```
</CodeGroup>

When the funding source is created, you will receive a `201` HTTP response with an empty response body. You can refer to the Location header to retrieve a link to the created funding source resource. We recommend storing the full URL for future use as it will be referenced when creating the transfer to this user's bank account.

### Handle Webhooks

If you have an active webhook subscription (required in production & optional in Sandbox), you will receive the `customer_funding_source_created` <Tooltip tip="Webhooks are automated notifications sent to your application when specific events occur in the Dwolla system">webhook</Tooltip> immediately after the resource has been created.

## Step 3 - Retrieve funding sources

Now that you've created a Customer and associated its funding source, you are close to being able to initiate your first transfer. The transfer requires the following information:

* The funding source to pull the funds from (a bank attached to your Dwolla Master Account)
* The funding source to push the funds to (a bank attached to your created Customer)

Dwolla uses URLs to represent relations between resources. Therefore, you'll need to provide the full URL of the funding source when creating the transfer.

### Retrieve your Dwolla Master Account's list of available Funding Sources

Use the [list an account's funding sources endpoint](/docs/api-reference/accounts/list-funding-sources-for-an-account) to fetch a list of your own funding sources. You'll need your account URL which can be retrieved by calling [the Root](/docs/api-reference/root) of the API.

##### Request and response

<CodeGroup>
  ```bash List Funding Sources [expandable] theme={"dark"}
  GET https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources?removed=false
  Accept: application/vnd.dwolla.v1.hal+json
  Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q

  {
    "_links": {
      "self": {
        "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources"
      }
    },
    "_embedded": {
      "funding-sources": [
      {
            "_links": {
                "transfer-from-balance": {
                    "href": "https://api-sandbox.dwolla.com/transfers",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "transfer"
                },
                "self": {
                    "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "funding-source"
                },
                "remove": {
                    "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "funding-source"
                },
                "transfer-send": {
                    "href": "https://api-sandbox.dwolla.com/transfers",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "transfer"
                },
                "transfer-receive": {
                    "href": "https://api-sandbox.dwolla.com/transfers",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "transfer"
                },
                "account": {
                    "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "account"
                }
            },
            "id": "b5e68264-7d4d-42a9-88d4-5616c77c6baa",
            "status": "verified",
            "type": "bank",
            "bankAccountType": "checking",
            "name": "ABC Bank Checking",
            "created": "2019-03-14T15:18:51.336Z",
            "removed": false,
            "channels": [
                "ach"
            ],
            "bankName": "SANDBOX TEST BANK"
        },
        {
            "_links": {
                "self": {
                    "href": "https://api-sandbox.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "funding-source"
                },
                "balance": {
                    "href": "https://api-sandbox.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7/balance",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "balance"
                },
                "transfer-send": {
                    "href": "https://api-sandbox.dwolla.com/transfers",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "transfer"
                },
                "with-available-balance": {
                    "href": "https://api-sandbox.dwolla.com/funding-sources/b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "funding-source"
                },
                "transfer-receive": {
                    "href": "https://api-sandbox.dwolla.com/transfers",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "transfer"
                },
                "account": {
                    "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
                    "type": "application/vnd.dwolla.v1.hal+json",
                    "resource-type": "account"
                }
            },
            "id": "b268f6b9-db3b-4ecc-83a2-8823a53ec8b7",
            "status": "verified",
            "type": "balance",
            "name": "Balance",
            "created": "2014-07-09T20:39:33.000Z",
            "removed": false,
            "channels": []
        }
      ]
    }
  }
  ```

  ```ruby get_funding_sources.rb theme={"dark"}
  account_url = 'https://api.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

  # Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
  funding_sources = app_token.get "#{account_url}/funding-sources?removed=false"
  funding_sources._embedded['funding-sources'][0].name # => "ABC Bank Checking"
  ```

  ```javascript get_funding_sources.js theme={"dark"}
  var accountUrl =
    "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254";

  dwolla.get(`${accountUrl}/funding-sources?removed=false`).then(function (res) {
    res.body._embedded["funding-sources"][0].name; // => 'ABC Bank Checking'
  });
  ```

  ```python get_funding_sources.py theme={"dark"}
  account_url = 'https://api.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

  # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
  funding_sources = app_token.get('%s/funding-sources?removed=false' % account_url)
  funding_sources.body['_embedded']['funding-sources'][0]['name'] # => 'ABC Bank Checking'
  ```

  ```php get_funding_sources.php theme={"dark"}
  <?php
  $accountUrl = 'https://api.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254';

  $fsApi = new DwollaSwagger\FundingsourcesApi($apiClient);

  $fundingSources = $fsApi->getAccountFundingSources($accountUrl, $removed = false);
  # Access desired information in response object fields
  print($fundingSources->_embedded) # => PHP associative array of _embedded contents in schema
  ?>
  ```
</CodeGroup>

When the funding sources list is successfully retrieved, you will receive a `200` HTTP response with the details of each funding source. After retrieving your list of funding sources, we recommend storing the full URL for future use as it will be referenced when creating the transfer to your user's bank account.

### Retrieve your Customer's list of available funding sources

Use the [list an Customer's funding sources](/docs/api-reference/funding-sources/list-customer-funding-sources) endpoint to fetch a list of your own funding sources. You'll need the Customer URL which can be [retrieved from the API.](/docs/api-reference/customers/list-and-search-customers)

##### Request and response

<CodeGroup>
  ```bash List Customer Funding Sources [expandable] theme={"dark"}
  GET https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources
  Accept: application/vnd.dwolla.v1.hal+json
  Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q

  {
    "_links": {
      "self": {
        "href": "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254/funding-sources"
      }
    },
    "_embedded": {
      "funding-sources": [
        {
          "_links": {
            "self": {
              "href": "https://api-sandbox.dwolla.com/funding-sources/0094b1b4-e171-4dc8-865b-cb121c2377bb"
            },
            "customer": {
              "href": "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254"
            },
            "with-available-balance": {
              "href": "https://api-sandbox.dwolla.com/funding-sources/0094b1b4-e171-4dc8-865b-cb121c2377bb"
            }
          },
          "id": "0094b1b4-e171-4dc8-865b-cb121c2377bb",
          "status": "verified",
          "type": "balance",
          "name": "Balance",
          "created": "2013-09-07T14:42:52.000Z"
        },
        {
          "_links": {
            "self": {
              "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa"
            },
            "customer": {
              "href": "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254"
            }
          },
          "id": "b5e68264-7d4d-42a9-88d4-5616c77c6baa",
          "status": "verified",
          "type": "bank",
          "name": "ABC Bank Checking",
          "created": "2014-09-04T23:19:19.543Z"
        }
      ]
    }
  }
  ```

  ```ruby list_customer_funding_sources.rb theme={"dark"}
  customer_url = 'https://api.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

  # Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
  funding_sources = app_token.get "#{customer_url}/funding-sources"
  funding_sources._embedded['funding-sources'][0].name # => "ABC Bank Checking"
  ```

  ```javascript list_customer_funding_sources.js theme={"dark"}
  var customerUrl =
    "https://api-sandbox.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254";

  dwolla.get(`${accountUrl}/funding-sources`).then(function (res) {
    res.body._embedded["funding-sources"][0].name; // => 'ABC Bank Checking'
  });
  ```

  ```python list_customer_funding_sources.py theme={"dark"}
  customers_url = 'https://api.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254'

  # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
  funding_sources = app_token.get('%s/funding-sources' % customer_url)
  funding_sources.body['_embedded']['funding-sources'][0]['name'] # => 'ABC Bank Checking'
  ```

  ```php list_customer_funding_sources.php theme={"dark"}
  <?php
  $customerUrl = 'https://api.dwolla.com/customers/ad5f2162-404a-4c4c-994e-6ab6c3a13254';

  $fsApi = new DwollaSwagger\FundingsourcesApi($apiClient);

  $fundingSources = $fsApi->getCustomerFundingSources($customerUrl);
  # Access desired information in response object fields
  print($fundingSources->_embedded) # => PHP associative array of _embedded contents in schema
  ?>
  ```
</CodeGroup>

When the list of funding sources is successfully retrieved, you will receive a `200` HTTP response with the details for the funding sources. After retrieving the funding sources, we recommend storing the full URL for future use as it will be referenced when creating the transfer to this user's bank account.

## Step 4 - Initiating a transfer

Now that our user is onboarded and their funding source has been created, we're ready to create a transfer to their bank account. In order to create the transfer, we'll need Funding Source links that represent both the source and destination bank accounts. Your customer's funding source URL should be stored from the previous step and retrieved on demand when creating the transfer.

#### Identify Source and Destination Parties

Since you are utilizing a `send` funds flow, you will need to ensure that you know exactly who will be receiving these funds.

* Source - Your Dwolla Master Account Bank Funding Source
* Destination - Your Customer's Bank Funding Source

### Initiate a Transfer

To initiate a transfer, we will need to specify the funding source URLs in the `_links` parameter.

| Parameter | Required? | Type   | Description                                                                        |
| --------- | --------- | ------ | ---------------------------------------------------------------------------------- |
| \_links   | yes       | object | A \_links JSON object describing the desired source and destination of a transfer. |
| amount    | yes       | object | An amount JSON object.                                                             |

##### Request and response

<CodeGroup>
  ```bash Create Transfer theme={"dark"}
  POST https://api-sandbox.dwolla.com/transfers
  Accept: application/vnd.dwolla.v1.hal+json
  Content-Type: application/vnd.dwolla.v1.hal+json
  Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q
  {
      "_links": {
          "source": {
              "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa"
          },
          "destination": {
              "href": "https://api-sandbox.dwolla.com/funding-sources/3152c22b-3d72-442d-a83b-e575df3a043e"
          }
      },
      "amount": {
          "currency": "USD",
          "value": "225.00"
      }
  }

  ...

  HTTP/1.1 201 Created
  Location: https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388
  ```

  ```ruby create_transfer.rb theme={"dark"}
  transfer_request = {
    :_links => {
      :source => {
        :href => "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa"
      },
      :destination => {
        :href => "https://api-sandbox.dwolla.com/funding-sources/3152c22b-3d72-442d-a83b-e575df3a043e"
      }
    },
    :amount => {
      :currency => "USD",
      :value => "225.00"
    }
  }

  # Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
  transfer = app_token.post "transfers", transfer_request
  transfer.response_headers[:location] # => "https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388"
  ```

  ```javascript create_transfer.js theme={"dark"}
  var transferRequest = {
    _links: {
      source: {
        href: "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa",
      },
      destination: {
        href: "https://api-sandbox.dwolla.com/funding-sources/3152c22b-3d72-442d-a83b-e575df3a043e",
      },
    },
    amount: {
      currency: "USD",
      value: "225.00",
    },
  };

  dwolla.post("transfers", transferRequest).then(function (res) {
    res.headers.get("location"); // => 'https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388'
  });
  ```

  ```python create_transfer.py theme={"dark"}
  transfer_request = {
    '_links': {
      'source': {
        'href': 'https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa'
      },
      'destination': {
        'href': 'https://api-sandbox.dwolla.com/funding-sources/3152c22b-3d72-442d-a83b-e575df3a043e'
      }
    },
    'amount': {
      'currency': 'USD',
      'value': '225.00'
    }
  }

  # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
  transfer = app_token.post('transfers', transfer_request)
  transfer.headers['location'] # => 'https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388'
  ```

  ```php create_transfer.php theme={"dark"}
  <?php
  $transfer_request = array (
    '_links' =>
    array (
      'source' =>
      array (
        'href' => 'https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa',
      ),
      'destination' =>
      array (
        'href' => 'https://api-sandbox.dwolla.com/funding-sources/3152c22b-3d72-442d-a83b-e575df3a043e',
      ),
    ),
    'amount' =>
    array (
      'currency' => 'USD',
      'value' => '225.00',
    )
  );

  $transferApi = new DwollaSwagger\TransfersApi($apiClient);
  $transfer = $transferApi->create($transfer_request);

  print($transfer); # => https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388
  ?>
  ```
</CodeGroup>

When the transfer is created, you will receive a `201` HTTP response with an empty response body. You can refer to the Location header to retrieve a link to the created Transfer resource. All transactions that are sourced from a bank or that are going to a bank will have an initial status of `pending`. We recommend storing the full Transfer URL for future use, as it will be needed for correlating transfer update <Tooltip tip="Webhooks are automated notifications sent to your application when specific events occur in the Dwolla system">webhooks</Tooltip> that are triggered for the user in the Dwolla system.

### Handle Webhooks

A single API call to create a payment transfer can trigger several transfer-related webhook events. The number of webhooks and type of webhook events can vary depending on the Customer type(s) involved in the transfer, as well as the source and destination for the funds transfer.
For more information on which webhooks will be fired, refer to our [API Reference Docs](/docs/api-reference/events).

### Simulate ACH Processing

To simulate ACH processing in the Dwolla <Tooltip tip="Sandbox is a testing environment provided by Dwolla for developers to test their applications without using real money">Sandbox</Tooltip> environment, navigate to the Sandbox Dashboard. From here, you will want to click the "Process Bank Transfers" button on the top of the screen. Your Sandbox transfer will be moved out of a `pending` status and moved to a `processed` status.

<img src="https://mintcdn.com/dwolla/C9LuhBlLWlq2MFvM/assets/images/content-images/process-bank-transfers.png?fit=max&auto=format&n=C9LuhBlLWlq2MFvM&q=85&s=426cbc7eb4ae78023b2aa82efffd4872" alt="process bank transfers" width="246" height="164" data-path="assets/images/content-images/process-bank-transfers.png" />

### Verify Status of Transfer

Since ACH transactions can take a few days to complete, webhooks are an efficient way to notify you of when a transfer is completed and `processed` to a destination funding source. However, if you want to verify the status of a transfer at any given point in time, you can make a call to the API to retrieve the transfer by its unique id.

<CodeGroup>
  ```bash Retrieve Transfer Status theme={"dark"}
  GET https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388
  Accept: application/vnd.dwolla.v1.hal+json
  Authorization: Bearer 0Sn0W6kzNicvoWhDbQcVSKLRUpGjIdlPSEYyrHqrDDoRnQwE7Q

  {
    "_links": {
      "cancel": {
        "href": "https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388",
        "type": "transfer"
      },
      "source": {
        "href": "https://api-sandbox.dwolla.com/accounts/ad5f2162-404a-4c4c-994e-6ab6c3a13254",
        "type": "account"
      },
      "funding-transfer": {
        "href": "https://api-sandbox.dwolla.com/transfers/e73f5b8e-e458-e611-80e5-0aa34a9b2388",
        "type": "transfer"
      },
      "self": {
        "href": "https://api-sandbox.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388",
        "type": "transfer"
      },
      "source-funding-source": {
        "href": "https://api-sandbox.dwolla.com/funding-sources/b5e68264-7d4d-42a9-88d4-5616c77c6baa",
        "type": "funding-source"
      },
      "destination": {
        "href": "https://api-sandbox.dwolla.com/customers/c7f300c0-f1ef-4151-9bbe-005005aa3747",
        "type": "customer"
      }
    },
    "id": "d76265cd-0951-e511-80da-0aa34a9b2388",
    "status": "processed",
    "amount": {
      "value": "42.00",
      "currency": "usd"
    },
    "created": "2015-09-01T19:08:55.500Z"
  }
  ```

  ```ruby get_transfer_status.rb theme={"dark"}
  transfer_url = 'https://api.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388'

  # Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
  transfer = app_token.get transfer_url
  transfer.status # => "processed"
  ```

  ```javascript get_transfer_status.js theme={"dark"}
  var transferUrl =
    "https://api.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388";

  dwolla.get(transferUrl).then(function (res) {
    res.body.status; // => 'processed'
  });
  ```

  ```python get_transfer_status.py theme={"dark"}
  transfer_url = 'https://api.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388'

  # Using dwollav2 - https://github.com/Dwolla/dwolla-v2-python (Recommended)
  fees = app_token.get(transfer_url)
  fees.body['status'] # => 'processed'
  ```

  ```php get_transfer_status.php theme={"dark"}
  <?php
  $transferUrl = 'https://api.dwolla.com/transfers/d76265cd-0951-e511-80da-0aa34a9b2388';

  $transfersApi = new DwollaSwagger\TransfersApi($apiClient);

  $transfer = $transfersApi->byId($transferUrl);
  print($transfer->status); # => "processed"
  ?>
  ```
</CodeGroup>

That's it! You've successfully transferred money to a recipient. Please continue to the [Webhooks guide](/docs/working-with-webhooks) for information on implementing notifications for your customers about the status of the transfer.
