# Account methods: payout, sweep

URL: /code/sdk/account/verbs · Id: `page:code/sdk/account/verbs`

> The Account Verbs payout, sweep as typed SDK methods, with inputs, result, refusals and an example.

Reference for [Account](/business/nouns/account), one group of [Account methods](/code/sdk/account).

### Account.payout
Payout sends available cash from the payments balance to the owner’s bank and lists every Transaction the payout carries. [Verb page](/business/nouns/account/payout?interface=sdk).

```ts
interface AccountVerbs {
  payout(input: AccountPayoutInput, options?: SB.CallOptions): SB.Call<AccountPayoutOutput>
}
```

Emits [`Account.paidOut`](/business/events/Account.paidOut).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | [Account](/business/nouns/account) | Yes | The payments balance: the cash Account held at `payments`. |
| `amount` | `money` | No | How much to send. Defaults to everything available. |
| `instant` | `boolean` | No | True to send it within minutes to an eligible debit card or bank, for Stripe’s instant payout cost. |
| `schedule` | `string` | No | Sets the Account’s `payoutSchedule` from now on, in place of sending a payout now. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | [Account](/business/nouns/account) | Yes | The payments balance after the payout. |
| `transaction` | [Transaction](/business/nouns/transaction) | Yes | The payout, a Transaction of kind `payout`. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const { account, transaction } = await $.Account.payout({ account: 'acct_nV4f0K7dTw' })
```

### Account.sweep
Sweep moves cash between two cash Accounts of the same owner, once or on a standing rule, within the Treasurer’s Limit. [Verb page](/business/nouns/account/sweep?interface=sdk).

```ts
interface AccountVerbs {
  sweep(input: AccountSweepInput, options?: SB.CallOptions): SB.Call<AccountSweepOutput>
}
```

Emits [`Account.swept`](/business/events/Account.swept).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | [Account](/business/nouns/account) | Yes | The cash Account the money leaves. |
| `to` | [Account](/business/nouns/account) | Yes | The cash Account it lands in. |
| `amount` | `money` | No | How much to move. Leave it out and set `keep` to move everything above a floor. |
| `keep` | `money` | No | Leave this much in `from` and move the rest. |
| `repeat` | `string` | No | Turns the move into a standing rule that sweeps on this schedule. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `account` | [Account](/business/nouns/account) | Yes | The `to` Account, with the money landed. |
| `transaction` | [Transaction](/business/nouns/transaction) | Yes | The move, reconciled on both Accounts. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```ts
import { $ } from 'startup-builder'

const { account, transaction } = await $.Account.sweep({ from: 'acct_nV4f0K7dTw', to: 'acct_nV4f0K7dTw' })
```