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

# Open Loop Card Funding Sources

> Set which spend account pays for each hosted open-loop card you generate.

Open-loop cards are funded from **your** account, not the recipient's. When someone claims a hosted card link and spends it, the money comes out of a spend account you nominate at the moment you generate the link.

<Warning>
  **The funding options here are narrower than on `createVirtualCard`.**

  The open-loop path exposes exactly one funding control: `userCashBalanceId`. There is no `primaryFundingSource`, no `bankAccountId`, no `usePrepaymentBalance`, and no `useRewardsBalance`. External bank accounts cannot fund an open-loop card — the spend account must be funded first.

  If you are porting an integration from `createVirtualCard`, do not assume the same fields carry over. See [Differences from standard cards](#differences-from-standard-cards).
</Warning>

***

## Setting the funding source

Pass `userCashBalanceId` on [`generateVCShareLinks`](/features/open-loop-cards/send-open-loop-cards). It applies to every card generated in that request.

```graphql theme={null}
mutation GenerateVCShareLinks($input: GenerateVCShareLinksInput!) {
  generateVCShareLinks(input: $input) {
    shareRequestId
    generatedShareLinks {
      linkUrl
      status
    }
  }
}
```

```json theme={null}
{
  "input": {
    "offerId": "ed669305-5e43-40a0-9a25-7a15ed174628",
    "userCashBalanceId": "b1155504-ad30-4b2f-873d-b8795277b128",
    "shareMethod": "GENERATE_URL",
    "spendLimit": 50.00,
    "daysUntilExpiration": 30
  }
}
```

<Note>
  **`userCashBalanceId` is marked optional in the schema, but treat it as required.**

  Omit it and the cards fall back to a default balance on your account. For a payout or rewards program that is almost never what you want — it makes spend unattributable and puts campaign disbursements against general account funds. Always set it explicitly, on every request.
</Note>

<Card title="Restricted Access" icon="lock">
  This mutation requires a Bearer token with the `CREATE_SHARE_LINK` scope. Basic auth is rejected.
</Card>

***

## Per-card funding across a batch

`userCashBalanceId` is set per **request**, not per link. Every card in one `generateVCShareLinks` call draws from the same spend account.

To fund different cards from different accounts, issue one request per funding source:

```typescript theme={null}
// One request per campaign, each pointed at its own spend account.
const campaigns = [
  { name: 'Q3 referral',  cashBalanceId: 'b1155504-...', limit: 25, count: 200 },
  { name: 'Q3 win-back',  cashBalanceId: 'c2266615-...', limit: 50, count: 50  },
];

for (const campaign of campaigns) {
  await graphql(
    `mutation GenerateVCShareLinks($input: GenerateVCShareLinksInput!) {
       generateVCShareLinks(input: $input) {
         shareRequestId
         generatedShareLinks { linkUrl status }
       }
     }`,
    {
      input: {
        offerId,
        userCashBalanceId: campaign.cashBalanceId,
        shareMethod: 'GENERATE_URL',
        spendLimit: campaign.limit,
        daysUntilExpiration: 30,
      },
    },
  );
}
```

<Info>
  **Use one spend account per program, not one shared pot.** A dedicated spend account per campaign gives you a clean balance to reconcile against, an obvious place to see remaining exposure, and a natural stopping point if something goes wrong — draining one account cannot touch another. It also means [`getSpendAccountVirtualAccountNumbers`](/features/virtual-account-numbers) gives that campaign its own routing and account number for direct funding.
</Info>

***

## Funding the spend account

Because open-loop cards cannot pull from an external bank at spend time, the spend account has to hold funds before recipients start claiming. Three ways to get money in:

| Method                                                                       | Use when                                                                                                            |
| :--------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ |
| [Deposit from an external account](/features/deposit-from-external-accounts) | Standard top-up from a linked bank account or card.                                                                 |
| [Virtual account numbers](/features/virtual-account-numbers)                 | You want to push funds in by ACH, wire, RTP, or FedNow. Each spend account gets its own routing and account number. |
| [Transfer between spend accounts](/features/transfer-between-spend-accounts) | Moving budget from one program to another.                                                                          |

Check the balance before a large batch with [`getUserCashBalances`](/features/get-spend-accounts), reading `availableCashBalance` rather than `totalCashBalance`.

***

## Differences from standard cards

| Control                       | `createVirtualCard`                                    | `generateVCShareLinks` |
| :---------------------------- | :----------------------------------------------------- | :--------------------- |
| Specific spend account        | `userCashBalanceId`                                    | `userCashBalanceId`    |
| External bank account         | `primaryFundingSource: BANK_ACCOUNT` + `bankAccountId` | Not available          |
| Prepayment balance            | `usePrepaymentBalance`                                 | Not exposed            |
| Rewards balance               | `useRewardsBalance`                                    | Not exposed            |
| Change funding after issuance | `editVirtualCard`                                      | Not available          |

The practical consequence: open-loop programs are **prefunded**. You cannot run them off an external bank account the way you can run a standard corporate card, so treat spend account balance as an operational requirement and monitor it.

For the full picture on standard cards, see [Manage Virtual Card Funding Sources](/features/virtual-card-funding-sources).

***

## Common mistakes

<AccordionGroup>
  <Accordion title="Passing primaryFundingSource or bankAccountId">
    Neither field exists on `GenerateVCShareLinksInput`. Open-loop cards are funded from a spend account only. Fund the spend account first, then generate links against it.
  </Accordion>

  <Accordion title="Omitting userCashBalanceId because the schema says it is optional">
    It is optional in the type definition but effectively required in practice. Without it your cards draw from a default balance, and campaign spend becomes impossible to attribute or cap.
  </Accordion>

  <Accordion title="Assuming funding can be changed after the link is generated">
    There is no edit path for an issued share link's funding. If you nominated the wrong spend account, deactivate the links with `deactivateVCShareLinks` and generate a new batch.
  </Accordion>

  <Accordion title="Generating a large batch without checking the balance">
    Confirm `availableCashBalance` covers the batch — `spendLimit` multiplied by the number of links — before generating. A batch that outruns its funding fails at the recipient, not at your API call, which means your support team hears about it before you do.
  </Accordion>
</AccordionGroup>

***

<CardGroup cols={2}>
  <Card title="Open Loop Cards Overview" icon="credit-card" href="/features/open-loop-cards/send-open-loop-cards">
    Generating, listing, and deactivating hosted card links.
  </Card>

  <Card title="Delivery Methods" icon="paper-plane" href="/features/open-loop-cards/open-loop-card-delivery-methods">
    The four ways to get a card link to a recipient.
  </Card>

  <Card title="Virtual Account Numbers" icon="building-columns" href="/features/virtual-account-numbers">
    Give each program's spend account its own routing and account number.
  </Card>

  <Card title="Virtual Card Funding Sources" icon="wallet" href="/features/virtual-card-funding-sources">
    The fuller set of funding controls on standard cards.
  </Card>
</CardGroup>
