# Sweeps

Automate payouts to your customers verified bank accounts by setting up sweeps.

A [sweep](/api/money-movement/sweeps) automatically initiates daily transfers to external bank accounts. Sweeps can be used to:

- Payout funds from a wallet
- Pull funds to cover fees or chargebacks
- Automatically collect fees or other payments your account has received

Sweeps help ensure funds move predictably and efficiently based on your configuration.

## [Configure sweeps](#configure-sweeps)

To set up a sweep, you must first add and verify a bank account. Bank account verification can take a few days during onboarding, depending on the verification method. For faster setup, we recommend [instant micro-deposit verification](/api/sources/bank-accounts/initiate-bank-account-verification/).

You can configure sweeps in one of two ways:

- From the [Dashboard](/guides/dashboard/wallet/)
- Use the create a sweep configuration [endpoint](/api/money-movement/sweeps/create-config/)

[cURL](#tab-753694812-1-0) [Go SDK](#tab-753694812-1-1)

```zsh
curl -X POST "https://api.moov.io/accounts/{accountID}/sweep-configs" \
  -H 'Authorization: Bearer {token}' \
  --data-raw '{
    "walletID": "string",
    "status": "enabled",
    "pushPaymentMethodID": "string",
    "pullPaymentMethodID":"string",
    "minimumBalance": "150.00"
  }'\
```

```go
mc, _ := moov.NewClient()

minBalance := "150.00"
mc.CreateSweepConfig(ctx, moov.CreateSweepConfig{
  AccountID:           "string",
  WalletID:            "string",
  Status:              moov.SweepConfigStatus_Enabled,
  PushPaymentMethodID: "string",
  PullPaymentMethodID: "string",
  MinimumBalance:      &minBalance,
})
```

To update an existing sweep configuration, use the `PATCH` [endpoint](/api/money-movement/sweeps/patch-config/).

Choose your preferred [payment methods](/guides/money-movement/accept-payments/ach/ach-processing-speeds/) for payouts via the `pushPaymentMethodID`. We currently support `ach-credit-same-day`, `ach-credit-standard`, `instant-bank-credit`, or `rtp-credit`. While `instant-bank-credit` and `rtp-credit` both provide instant payments on the RTP rail, Moov strongly suggests using `instant-bank-credit`, which supports the RTP and FedNow rails.

If you select same-day ACH or instant, Moov will attempt to send funds using the associated rail. If the transfer amount exceeds rail limits ($500,000 for same-day ACH or $1,000,000 for instant) the transfer will automatically fall back to standard ACH. Fees are applied according to the account’s fee plan.

To remediate negative balances, you must configure an `ach-debit-fund` for the `pullPaymentMethodID`. Bank accounts used for push (payouts) and pull (debits) sweeps can be different.

If a payment method becomes disabled due to a bank account issue, payouts are paused until a new bank account is verified and configured in the sweep.

### [Maintain a daily balance](#maintain-a-daily-balance)

Optionally, you can specify a minimum daily wallet balance to support ongoing operations or protect against refunds, disputes, and fees. If set, Moov ensures this balance is maintained when calculating sweep amounts. If not set, the default maintained balance is $0.

### [Default statement descriptor](#default-statement-descriptor)

By default, Moov uses the `companyName` from your account’s ACH settings for sweep transfers. You may customize the ACH statement descriptor in the sweep configuration. The default descriptor is a 10 character ID, that is also available on each sweep for reconciliation (`swp_xxxxxx`).

## [Payout timing](#payout-timing)

As you process payments, funds accrue into a sweep. A sweep’s accrual period closes daily at 4:00 PM ET. Once a sweep period is closed, a corresponding transfer is created and a new sweep is immediately created and begins accruing. Moov does support alternative close times, please [contact us](https://support.moov.io/) if you would like to adjust timing. Since sweeps are not processed on weekends or banking holidays, funds will be paid out the next business day.

Card payment funds are typically credited to the Moov wallet by 1:00 PM ET the next banking day following the card payment. You can refer to [card brand timetables](/guides/money-movement/accept-payments/card-acceptance/timing/#cutoff-times-by-card-brand) for details on specific brand cut-off times to know what is included in the next day funding. [ACH processing speeds](/guides/money-movement/accept-payments/ach/ach-processing-speeds/) can vary, but funds are generally available the morning of the second banking day after the transfer is created.

For daily payouts, you can expect the funds to be received based on the following schedule:

| Push payment method   | Receive funds by    |
|-----------------------|---------------------|
| `ach-credit-same-day` | 6 pm ET             |
| `ach-credit-standard` | 10 am ET (next day) |
| `instant-bank-credit` | Instant             |
| `rtp-credit`          | Instant             |

*Sweep transfers will assess a fee based on your pricing schedule.*

## [Reconciliation](#reconciliation)

The `accruedAmount` represents the amount typically expected to transfer for a sweep period. In certain cases, such as when a sweep is first enabled or when a minimum balance is newly applied, the transferred amount may differ. In those one-off cases, Moov calculates the amount to transfer accordingly:

`transferAmount` = `availableBalance` at sweep close - `minimumBalance`

The [get sweep](/api/money-movement/sweeps/get/) and [list sweeps](/api/money-movement/sweeps/list/) endpoints include subtotals grouped by `transactionType`. These breakdowns help you:

- Reconcile sweep activity
- Track payout sources
- Report totals such as sales, fees, and refunds to end users

A `sweepID` is assigned to all debit or credit sweep transactions in a Moov wallet and can be used to access all sweep activity. For detailed reporting and reconciliation of sweeps, we recommend supplying the `sweepID` as a query parameter with the list wallet transactions `GET` [endpoint](/api/sources/wallets/list-transactions/). Using the returned list, you can match the amount received in the bank account with the corresponding transactions.

```zsh
  "subtotals": [
    {
      "amount": {
        "currency": "USD",
        "valueDecimal": "50.00"
      },
      "count": 1,
      "type": "moov-fee"
    },
    {
      "amount": {
        "currency": "USD",
        "valueDecimal": "50.00"
      },
      "count": 1,
      "type": "account-funding"
    }
  ],
```

## [Negative sweeps](#negative-sweeps)

In some cases, you can accrue a negative balance. For example, if you receive $100, but also receive a refund request for a previous payment of $200, the wallet balance would be -$100. Moov allows for a one-day grace period to account for any incoming payments. If the balance remains negative, a debit is initiated the following day.

Negative sweeps are not initiated for amounts less than $1. There is a [two-day hold](/guides/money-movement/accept-payments/ach/ach-overview/#ach-processing-and-holds) on ACH debit transactions, so payouts will only resume once the debit transfer completes.

## [Failures](#failures)

When a payout can’t be completed, a `sweep.updated` [webhook event](/guides/webhooks/webhook-events/#sweepupdated) will be sent:

```json
{
  "eventID": "14980a04-2e32-4921-a771-4959a36534a6",
  "type": "sweep.updated", 
  "data": {
    "sweepID": "51015d0d-8dca-49a0-ba70-abfed073f785",
    "walletID": "50f31cfa-6e41-412b-9935-655e58127583", 
    "status": "failed",
    "transferID" : "0a958eb7-4384-41d6-8bd9-ba1cf9e2f5d2"
  },
  "createdOn": "2021-09-02T13:57:50Z"
}
```

The transfer's `failureReason` indicates the reason for the failure and may also disable the associated bank account. A bank account becoming disabled will trigger a `bankaccount.Updated` [webhook event](/guides/webhooks/webhook-events/#accounts).

Failed sweeps aren’t automatically retried and no payouts will be made until a new bank account is added and verified.

While awaiting a resolution, the sweep continues accruing with a status of `action-required`. Once a valid payment method is configured, payouts resume on the normal sweep schedule.
