# Funding

> Products a funder pays for, awards of units per period to a record from a funder in contacts, care delivered against an award from time entries, bookings or by hand, usage against the award per period, and claims per funder and period with the funder's response per line, rendered and sent through app-supplied formats and channels.

- Category: Billing & commerce
- Module: `funding`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/funding
- Page: https://bettersupabase.com/blocks/funding

## Install

```bash
npx better-supabase add funding
```

The command also installs `updated-at`, `memberships`, `permissions`, `subjects`, `contacts`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by funding; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    subjects: {},
    contacts: {},
    // Modes: "managed", "custom". The default is "managed".
    funding: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/funding`.

## Events

- `funding_award.created`
- `funding_award.ended`
- `funding_award.exceeded`
- `funding_award.updated`
- `funding_claim.created`
- `funding_claim.deleted`
- `funding_claim.responded`
- `funding_claim.sent`
- `funding_delivery.registered`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md), [subjects](https://bettersupabase.com/blocks/subjects.md), [contacts](https://bettersupabase.com/blocks/contacts.md)

Works with: [time-tracking](https://bettersupabase.com/blocks/time-tracking.md), [bookings](https://bettersupabase.com/blocks/bookings.md), [invoices](https://bettersupabase.com/blocks/invoices.md), [numbering](https://bettersupabase.com/blocks/numbering.md), [notifications](https://bettersupabase.com/blocks/notifications.md), [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md)
