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

# Database

> Dodo Payments local sync: searchable entities, `.search()` filters, and operators.

The Dodo Payments plugin syncs data locally. Use `corsair.dodopayments.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Customers

Path: `dodopayments.db.customers.search`

```ts theme={null}
const rows = await corsair.dodopayments.db.customers.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `email` | `string` | equals, contains, startsWith, endsWith, in |
| `phone_number` | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Payments

Path: `dodopayments.db.payments.search`

```ts theme={null}
const rows = await corsair.dodopayments.db.payments.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `amount` | `number` | equals, gt, gte, lt, lte, in |
| `currency` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `customer_id` | `string` | equals, contains, startsWith, endsWith, in |
| `subscription_id` | `string` | equals, contains, startsWith, endsWith, in |
| `payment_link` | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Refunds

Path: `dodopayments.db.refunds.search`

```ts theme={null}
const rows = await corsair.dodopayments.db.refunds.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `payment_id` | `string` | equals, contains, startsWith, endsWith, in |
| `amount` | `number` | equals, gt, gte, lt, lte, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `reason` | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Subscriptions

Path: `dodopayments.db.subscriptions.search`

```ts theme={null}
const rows = await corsair.dodopayments.db.subscriptions.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `customer_id` | `string` | equals, contains, startsWith, endsWith, in |
| `plan_id` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `created_at` | `string` | equals, contains, startsWith, endsWith, in |
| `createdAt` | `date` | equals, before, after, between |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.