# Fund your FBO account and send standalone payouts

import { Tabs, TabItem } from '@astrojs/starlight/components';

This guide shows you how to keep your pre-funded FBO account topped up and pay recipients from it. You add the bank
account the money comes from, request an FBO funding to move money into the FBO account, follow the funding until it
settles, and then send a [standalone payout](/docs/technical/payouts/manage-payouts#standalone-payouts) against the
available balance.

A *for-the-benefit-of (FBO) account* is the account GrailPay holds on your behalf. A standalone payout is paid from that
account instead of from a payer's debit, so it can only go out once the FBO account holds enough funds. Use this flow
for disbursements that have no payer at the time of payment, such as rebates, incentive payments, or scheduled
disbursements.

## Prerequisites

Before you start, you need:

- **A pre-funded FBO account and standalone payouts enabled on your account.** Neither is on by default. Contact your
  GrailPay integration support contact to have them enabled.
- **A vendor API key.** The FBO endpoints accept only a key that belongs to the vendor whose FBO account it is. A
  processor key cannot call them. See [Authentication](/docs/technical/authentication).
- **A business bank account you can debit**, such as your operating account. You need its account number, routing
  number, account type, and the name on the account.
- **An onboarded recipient** with a default bank account. See [Onboard a Person](/docs/technical/users/onboard-a-person),
  [Onboard a Business](/docs/technical/users/onboard-a-business), or
  [Onboard a Merchant](/docs/technical/users/onboard-a-merchant).
- **A webhook endpoint** that verifies and routes GrailPay events. See
  [Receive and verify webhook events](/docs/technical/webhooks/receive-webhooks).

The examples use the sandbox base URL `https://api-sandbox.grailpay.com/api/v3`. In production, use
`https://api.grailpay.com/api/v3` and your production API key. See [Environments](/docs/technical/environments). All
amounts are integer cents: `500000` is $5,000.00.

## How funding works

| Step | What happens | How you know |
| --- | --- | --- |
| You request an FBO funding | GrailPay creates the funding with status `QUEUED` and returns its `uuid`. No money has moved yet. | `201` response and the `fbo.funding_created` event |
| GrailPay submits the ACH debit | GrailPay sends a same-day ACH debit (SEC code CCD, the entry type for business accounts) against your funding bank account. | `fbo.funding_processing` |
| The debit settles | The funds reach the FBO account and count toward your `current_balance`. | `fbo.funding_completed` |
| The debit fails | The funds do not arrive. The event carries the `ach_return_code`. | `fbo.funding_failed` |
| You cancel before the ACH is in progress | The funding stops and no debit is sent. | `200` response and `fbo.funding_canceled` |

Until a funding settles, its amount appears only in `pending_funding`. It is not part of any balance, so you cannot pay
it out yet. For submission cutoffs and when status updates arrive, see
[ACH Processing Windows & Settlement Timing](/docs/resources/ach-processing-windows).

## Step 1: Get your vendor UUID and confirm the FBO account

Every FBO endpoint takes your vendor UUID in its path. Fetch it with `GET /api/v3/me`:

```bash title="cURL"
curl --location 'https://api-sandbox.grailpay.com/api/v3/me' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}'
```

`data.entity.type` must be `vendor`. Save `data.entity.uuid`; the rest of this guide calls it `{VENDOR_UUID}`.

Then confirm that GrailPay has enabled your FBO account with `GET /api/v3/vendors/{VENDOR_UUID}`:

```bash title="cURL"
curl --location 'https://api-sandbox.grailpay.com/api/v3/vendors/{VENDOR_UUID}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}'
```

```json title="Response (partial)"
{
    "status": true,
    "message": "",
    "data": {
        "uuid": "7c41f6a2-a4b9-4df8-9225-2c1b7312042e",
        "name": "Acme Payments",
        "bank_accounts": [],
        "fbo_account": {
            "enabled": true
        },
        "created_at": "2026-09-23 14:31:05"
    }
}
```

**Verify:** `data.fbo_account.enabled` is `true`. If it is `false`, GrailPay has not configured a pre-funded FBO account
for you yet, and the funding and balance calls in this guide fail with `422`. `bank_accounts` lists the funding bank
accounts you already have. It is empty until you add one in the next step.

## Step 2: Add a funding bank account

A *funding bank account* is an account GrailPay debits to move money into your FBO account. Add one with
`POST /api/v3/vendors/{VENDOR_UUID}/bank-accounts`. `purposes.funding.enabled` must be `true`:

```bash title="cURL"
curl --location 'https://api-sandbox.grailpay.com/api/v3/vendors/{VENDOR_UUID}/bank-accounts' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 6f1d3c2a-9b4e-4f7a-8c5d-2e1b0a9f8c7d' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
    "account_number": "123456789",
    "routing_number": "021000021",
    "account_type": "checking",
    "account_name": "Acme Supplies LLC",
    "purposes": {
        "funding": {
            "enabled": true,
            "default": true
        }
    },
    "client_reference_id": "acct-ref-1001"
}'
```

GrailPay verifies the routing number and registers the account with the bank before it saves it. The response returns
the account with its number masked:

```json title="Response (partial)"
{
    "status": true,
    "message": "Bank account added successfully.",
    "data": {
        "uuid": "0199c3e4-5a7b-7d21-8f3e-2b6c9d1a4e87",
        "account_number": "*****6789",
        "routing_number": "021000021",
        "account_name": "Acme Supplies LLC",
        "account_type": "checking",
        "institution_name": "JPMORGAN CHASE BANK, NA",
        "client_reference_id": "acct-ref-1001",
        "purposes": {
            "funding": { "enabled": true, "default": true },
            "payout": { "enabled": false, "default": false }
        }
    }
}
```

**Verify:** A `201` response returns the account's `uuid`, and `purposes.funding.default` is `true`. Your first funding
bank account becomes the default automatically. A later one becomes the default only when you send
`"default": true`, or when you call `PUT /api/v3/vendors/{VENDOR_UUID}/bank-accounts/{bank_account_uuid}/default`.

If you add an account you already have (same account number, routing number, and account type), you get `200` with the
existing account. The rest of the request, including `default`, is not applied.

:::tip
You can skip this step and send the account details with your first funding request instead. GrailPay saves those
details as a funding bank account. Adding the account first lets you catch a rejected account number before you depend
on it for funding.
:::

## Step 3: Request an FBO funding

Request the transfer with `POST /api/v3/vendors/{VENDOR_UUID}/fbo/funding`. Send an `Idempotency-Key` so a retried
request cannot debit you twice:

```bash title="cURL"
curl --location 'https://api-sandbox.grailpay.com/api/v3/vendors/{VENDOR_UUID}/fbo/funding' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 3b9e7f10-5c2d-4a8b-9e6f-1d0c2b4a6e8f' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
    "amount": 500000
}'
```

| Parameter | Required | Description |
| --- | --- | --- |
| `amount` | Yes | Amount to debit, in cents. From `1` to `99999999`. |
| `source_account` | No | The account to debit. Omit it to debit your default funding bank account. |
| `source_account.uuid` | No | The `uuid` of one of your funding bank accounts. Send it on its own. |
| `source_account.account_number`, `routing_number`, `account_type`, `account_name` | No | The details of an account to debit, sent instead of `uuid`. If they match a funding bank account you already have, GrailPay uses it. Otherwise GrailPay adds a new one. |
| `source_account.default` | No | With account details, `true` also makes that account your default funding bank account. |

To debit a funding bank account other than the default, send its `uuid`:

```json title="Request body"
{
    "amount": 500000,
    "source_account": {
        "uuid": "0199c3e4-5a7b-7d21-8f3e-2b6c9d1a4e87"
    }
}
```

```json title="Response"
{
    "status": true,
    "message": "FBO funding transfer created.",
    "data": {
        "uuid": "0199c3f0-2d4e-7a1b-9c6f-8e3d5b7a1f24",
        "amount": 500000
    },
    "errors": null,
    "request_id": "2d6a4c39-8fcf-4d80-9189-b4764eac31f2"
}
```

**Verify:** A `201` response returns the funding's `uuid`. Save it: you need it to match webhook events and to cancel the
funding. A `201` means GrailPay created the funding, not that money has moved.

:::caution
You cannot delete a funding bank account for 30 days after it is used for an FBO funding. Debit the account you intend
to keep.
:::

## Step 4: Follow the funding to settlement

Each change in the funding's life emits an [FBO funding event](/docs/technical/webhooks/events/fbo-funding/). The
payload is under `data.fbo_funding`, and its `uuid` is the one you saved in Step 3. Route the events alongside your
other handlers, as in [Step 5 of the webhook guide](/docs/technical/webhooks/receive-webhooks#step-5-route-on-the-event-name):

<Tabs syncKey="framework">
<TabItem label="Laravel">

```php title="app/Jobs/ProcessGrailPayEvent.php (partial)"
private function route(array $event): void
{
    match ($event['event']) {
        // Funds reached the FBO account. Payouts can now draw on them.
        'fbo.funding_completed' => $this->markFundingSettled($event['data']['fbo_funding']),
        // The ACH return code is in $event['data']['fbo_funding']['ach_return_code'].
        'fbo.funding_failed' => $this->markFundingFailed($event['data']['fbo_funding']),
        'fbo.funding_canceled' => $this->markFundingCanceled($event['data']['fbo_funding']),
        // Hourly balance notice. Top up when the balance runs low.
        'fbo.account_snapshot' => $this->checkFboBalance($event['data']['fbo_account']),
        default => null,
    };
}
```

</TabItem>
<TabItem label="Rails">

```ruby title="app/jobs/process_grailpay_event_job.rb (partial)"
def route(event)
  case event["event"]
  when "fbo.funding_completed"
    # Funds reached the FBO account. Payouts can now draw on them.
    mark_funding_settled(event["data"]["fbo_funding"])
  when "fbo.funding_failed"
    # The ACH return code is in event["data"]["fbo_funding"]["ach_return_code"].
    mark_funding_failed(event["data"]["fbo_funding"])
  when "fbo.funding_canceled"
    mark_funding_canceled(event["data"]["fbo_funding"])
  when "fbo.account_snapshot"
    # Hourly balance notice. Top up when the balance runs low.
    check_fbo_balance(event["data"]["fbo_account"])
  else
    # An event this integration does not use. Ignore it.
  end
end
```

</TabItem>
<TabItem label="Express">

```javascript title="worker.mjs (partial)"
async function route(event, client) {
  switch (event.event) {
    case 'fbo.funding_completed':
      // Funds reached the FBO account. Payouts can now draw on them.
      return markFundingSettled(event.data.fbo_funding, client);
    case 'fbo.funding_failed':
      // The ACH return code is in event.data.fbo_funding.ach_return_code.
      return markFundingFailed(event.data.fbo_funding, client);
    case 'fbo.funding_canceled':
      return markFundingCanceled(event.data.fbo_funding, client);
    case 'fbo.account_snapshot':
      // Hourly balance notice. Top up when the balance runs low.
      return checkFboBalance(event.data.fbo_account, client);
    default:
      // An event this integration does not use. Ignore it.
      return;
  }
}
```

</TabItem>
<TabItem label="Flask">

```python title="tasks.py (partial)"
def route(event, connection):
    match event["event"]:
        case "fbo.funding_completed":
            # Funds reached the FBO account. Payouts can now draw on them.
            mark_funding_settled(event["data"]["fbo_funding"], connection)
        case "fbo.funding_failed":
            # The ACH return code is in event["data"]["fbo_funding"]["ach_return_code"].
            mark_funding_failed(event["data"]["fbo_funding"], connection)
        case "fbo.funding_canceled":
            mark_funding_canceled(event["data"]["fbo_funding"], connection)
        case "fbo.account_snapshot":
            # Hourly balance notice. Top up when the balance runs low.
            check_fbo_balance(event["data"]["fbo_account"], connection)
        case _:
            # An event this integration does not use. Ignore it.
            pass
```

</TabItem>
</Tabs>

The functions each branch calls, such as `markFundingSettled` and `mark_funding_settled`, stand in for your own code.

To check your fundings without waiting for an event, list them with `filter[type]=fbo_funding`:

```bash title="cURL"
curl --location --globoff 'https://api-sandbox.grailpay.com/api/v3/transactions?filter[type]=fbo_funding' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}'
```

FBO fundings have no payer or payee, so the identity fields on `payor` and `payee` are `null` in this list.

**Verify:** You receive `fbo.funding_completed` for the funding's `uuid`. If you receive `fbo.funding_failed` instead,
check the `ach_return_code` against [Return Codes](/docs/resources/return-codes), fix the cause, and request a new
funding.

### Cancel a funding

To stop a funding you no longer need, call `DELETE /api/v3/vendors/{VENDOR_UUID}/fbo/funding/{funding_uuid}` with the
`uuid` from Step 3:

```bash title="cURL"
curl --location --request DELETE 'https://api-sandbox.grailpay.com/api/v3/vendors/{VENDOR_UUID}/fbo/funding/0199c3f0-2d4e-7a1b-9c6f-8e3d5b7a1f24' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}'
```

A `200` response means the funding is canceled, and `fbo.funding_canceled` follows. You can cancel only until the ACH
is in progress. After that, the request returns `422` with
`This funding transaction cannot be canceled because the ACH is already in progress.`

## Step 5: Check your available balance

Before you pay out, read the balance with `GET /api/v3/vendors/{VENDOR_UUID}/fbo`:

```bash title="cURL"
curl --location 'https://api-sandbox.grailpay.com/api/v3/vendors/{VENDOR_UUID}/fbo' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}'
```

```json title="Response (partial)"
{
    "status": true,
    "message": "",
    "data": {
        "vendor_uuid": "7c41f6a2-a4b9-4df8-9225-2c1b7312042e",
        "current_balance": 4820000,
        "pending_payouts": 1150000,
        "available_balance": 3670000,
        "pending_funding": 500000,
        "balance_status": "review",
        "currency": "USD",
        "last_refreshed_at": "2026-06-02 19:00:00"
    }
}
```

Decide with `available_balance`. It is the lower of `current_balance` minus `pending_payouts` and the available balance
the bank reports. `pending_funding` is money still on its way in, and you cannot spend it yet. `balance_status` is
`good`, `review`, or `low`. Use it as a signal to request another funding. For every field, see
[Check your FBO balance](/docs/technical/payouts/manage-payouts#check-your-fbo-balance).

**Verify:** After `fbo.funding_completed`, `pending_funding` no longer includes the funding, and `current_balance` has
grown by its amount.

## Step 6: Send a standalone payout

Pay a recipient from the FBO account with `POST /api/v3/payouts/standalone`. GrailPay pays the recipient's default bank
account:

```bash title="cURL"
curl --location 'https://api-sandbox.grailpay.com/api/v3/payouts/standalone' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 9c4a2e71-0b3f-4d6e-8a5c-7f1e2d3b4a60' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \
--data '{
    "entity_uuid": "{RECIPIENT_UUID}",
    "amount": 25000,
    "speed": "standard"
}'
```

| Parameter | Required | Description |
| --- | --- | --- |
| `entity_uuid` | Yes | The `uuid` of the onboarded person, business, or merchant to pay. The recipient must have a default bank account. |
| `amount` | Yes | Amount to pay, in cents. At least `10`. |
| `speed` | Yes | `standard`, `fast`, or `fednow`. `fednow` works only when FedNow is enabled on your account. |

**Verify:** A `201` response returns the payout under `data.payout`. Save its `uuid`. The payout follows the same
lifecycle and [payout events](/docs/technical/webhooks/events/payout/) as any other payout, from `payout.created` to
`payout.completed` or `payout.failed`.

If the amount is more than the FBO account can cover, the request returns `422` with
`The current balance of your prefunded account is insufficient to perform this transaction.` Request a funding, wait for
`fbo.funding_completed`, and send the payout again.

## Verify the whole flow

1. List your standalone payouts and find the one from Step 6:

   ```bash title="cURL"
   curl --location --globoff 'https://api-sandbox.grailpay.com/api/v3/payouts?filter[payout_type]=standalone' \
   --header 'Accept: application/json' \
   --header 'Authorization: Bearer {YOUR_API_KEY}'
   ```

2. Call `GET /api/v3/vendors/{VENDOR_UUID}/fbo` again. While the payout is unsettled, its amount is part of
   `pending_payouts`, and `available_balance` is lower by that amount.
3. When you receive `payout.completed`, the payout has settled and has left `pending_payouts`.

## Troubleshooting

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| `403` on any FBO endpoint | The API key belongs to a processor, or lacks the ability the endpoint needs. | Use the vendor's own API key. If it still fails, contact GrailPay support with the `request_id`. |
| `422` with `No prefunded FBO account is configured for this vendor.` | GrailPay has not enabled a pre-funded FBO account for you. | Contact your GrailPay integration support contact. |
| `422` with `No funding bank account exists for this vendor.` | You omitted `source_account` and have no default funding bank account. | Add one as in [Step 2](#step-2-add-a-funding-bank-account), or send `source_account`. |
| `422` with `The bank account number or routing number is invalid.`, or another routing number error | The account details could not be verified. | Check the numbers with the account holder and send them again. |
| `404` with `No bank account was found matching that UUID.` | `source_account.uuid` is not one of your funding bank accounts. | List your accounts with `GET /api/v3/vendors/{VENDOR_UUID}/bank-accounts` and use a `uuid` from that list. |
| `fbo.funding_failed` | The bank returned the debit. | Look up `ach_return_code` in [Return Codes](/docs/resources/return-codes), fix the cause, then request a new funding. |
| A funding bank account cannot be deleted | The account was used for a funding within the last 30 days. | Keep it until 30 days after its last use. Make another account the default in the meantime. |
| Standalone payout returns `422` for an insufficient balance | The payout is larger than the FBO account can cover, or the funding has not settled yet. | Check `available_balance` and `pending_funding` as in [Step 5](#step-5-check-your-available-balance). |
| Standalone payout returns `403` with `FedNow is not available on your account. Please contact support.` | You sent `"speed": "fednow"` without FedNow enabled. | Use `standard` or `fast`, or contact GrailPay support to enable FedNow. |

## Related

- [Manage Payouts](/docs/technical/payouts/manage-payouts): list, fetch, and create payouts, and every FBO balance field.
- [FBO Funding Events](/docs/technical/webhooks/events/fbo-funding/) and
  [FBO Account Events](/docs/technical/webhooks/events/fbo-account/): full payloads.
- [Fetch vendor prefunded FBO account details](/api/payments/#tag/vendors/GET/api/v3/vendors/{uuid}/fbo),
  [Create FBO Funding](/api/payments/#tag/vendors/POST/api/v3/vendors/{uuid}/fbo/funding), and
  [Create Standalone Payout](/api/payments/#tag/payouts/POST/api/v3/payouts/standalone) in the API reference.

## Questions?

If you run into any issues, contact [support@grailpay.com](mailto:support@grailpay.com).