Create a sweep config

Create a sweep config for a wallet.
POST
/accounts/{accountID}/sweep-configs
cURL Go
1
2
3
4
5
6
7
8
9
curl -X POST "https://api.moov.io/accounts/{accountID}/sweep-configs" \
  -H 'Authorization: Bearer {token}' \
  --data-raw '{
    "walletID": "UUID",
    "status": "enabled",
    "pushPaymentMethodID": "UUID",
    "pullPaymentMethodID":"UUID",
    "minimumBalance": "150.00"
  }'\
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mc, _ := moov.NewClient()

minBalance := "150.00"
mc.CreateSweepConfig(ctx, moov.CreateSweepConfig{
  AccountID:           "UUID",
  WalletID:            "UUID",
  Status:              moov.SweepConfigStatus_Enabled,
  PushPaymentMethodID: "UUID",
  PullPaymentMethodID: "UUID",
  MinimumBalance:      &minBalance,
})
200 400 409 422 429
Successfully created a sweep config.
{
  "createdOn": "2019-08-24T14:15:22Z",
  "disabledOn": "2019-08-24T14:15:22Z",
  "lockedFields": [
    "status",
    "minimumBalance"
  ],
  "minimumBalance": "12.34",
  "pullPaymentMethod": {
    "disabledOn": "2019-08-24T14:15:22Z",
    "paymentMethodID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
  },
  "pushPaymentMethod": {
    "disabledOn": "2019-08-24T14:15:22Z",
    "paymentMethodID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
  },
  "statementDescriptor": "string",
  "status": "enabled",
  "sweepConfigID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
  "updatedOn": "2019-08-24T14:15:22Z",
  "walletID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
}
Invalid request, an error message will be available in the response body.
Response for http requests that failed
{
  "error": "example error message"
}
Attempted to create a duplicate sweep config for a wallet.
{
  "createdOn": "2019-08-24T14:15:22Z",
  "disabledOn": "2019-08-24T14:15:22Z",
  "lockedFields": [
    "status",
    "minimumBalance"
  ],
  "minimumBalance": "12.34",
  "pullPaymentMethod": {
    "disabledOn": "2019-08-24T14:15:22Z",
    "paymentMethodID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
  },
  "pushPaymentMethod": {
    "disabledOn": "2019-08-24T14:15:22Z",
    "paymentMethodID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
  },
  "statementDescriptor": "string",
  "status": "enabled",
  "sweepConfigID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
  "updatedOn": "2019-08-24T14:15:22Z",
  "walletID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43"
}
The request body could not be processed.
Request was refused due to rate limiting.

Retry-After

number

Path parameters

accountID

string <uuid> required
ID of the account.

Body

application/json

pullPaymentMethodID

string<uuid> <=36 characters required
UUID

pushPaymentMethodID

string<uuid> <=36 characters required
UUID

status

string<enum> required
Possible values: enabled, disabled

walletID

string<uuid> <=36 characters required
UUID

minimumBalance

string Pattern
An optional field to specify an amount to maintain in the wallet. This is a decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99. If not supplied, the default is 0.00.

statementDescriptor

string [4 to 10] characters

Response

application/json

createdOn

string<date-time> <=24 characters required

minimumBalance

string required Pattern
An optional field to specify an amount to maintain in the wallet. This is a decimal-formatted numerical string that represents up to 2 decimal place precision. In USD for example, 12.34 is $12.34 and 0.99 is $0.99. If not supplied, the default is 0.00.

pullPaymentMethod

object required
The payment method used to pull funds from a bank account. An ach-debit-fund payment method is required.
The payment method used to push or pull funds to a bank account. The push payment method can only be ach-credit-standard or ach-credit-same-day. The pull payment method can only be ach-debit-fund.
right_key Show child attributes

disabledOn

string<date-time> <=24 characters

paymentMethodID

string<uuid> <=36 characters required
UUID

pushPaymentMethod

object required
The payment method used to push funds to a bank account. ach-credit-standard or ach-credit-same-day is required.
The payment method used to push or pull funds to a bank account. The push payment method can only be ach-credit-standard or ach-credit-same-day. The pull payment method can only be ach-debit-fund.
right_key Show child attributes

disabledOn

string<date-time> <=24 characters

paymentMethodID

string<uuid> <=36 characters required
UUID

status

string<enum> required
Possible values: enabled, disabled

sweepConfigID

string<uuid> <=36 characters required
UUID

updatedOn

string<date-time> <=24 characters required

walletID

string<uuid> <=36 characters required
UUID

disabledOn

string<date-time> <=24 characters

lockedFields

array
An array of fields that are locked. To request updates, please contact Moov support.

statementDescriptor

string
An optional override of the default 10 character ID used as the statement descriptor for sweep transfers.