# Shipments

> Shipments with packages and addresses, labels bought through a versioned carrier interface, and a tracking timeline fed by polling or verified carrier webhooks, with the shipment's status taken from its latest tracking event.

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

## Install

```bash
npx better-supabase add shipments
```

The command also installs `updated-at`, `tenant`, `access`.

## Configure

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

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

export default defineConfig({
  blocks: {
    // Required by shipments; add installs them too.
    "updated-at": {},
    tenant: {},
    access: {},
    // Modes: "managed", "custom". The default is "managed".
    shipments: { mode: "managed" },
  },
});
```

## Client

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

## Events

- `shipment.cancelled`
- `shipment.created`
- `shipment.labeled`
- `shipment.status_changed`

## Related blocks

Requires: [tenant](https://bettersupabase.com/blocks/tenant.md), [access](https://bettersupabase.com/blocks/access.md)

Works with: [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md), [assets](https://bettersupabase.com/blocks/assets.md)

## Recipes

- [Shipment tracking](https://bettersupabase.com/recipes/shipment-tracking.md): Shipments with their status and the tracking timeline of the selected one, newest event first.
