# purchases

Native purchase coordination: responsibilities, supported exports and extension points.

## Purpose [#purpose]

A vendor-neutral interface wraps the optional RevenueCat SDK. Configuration, connection and identity changes serialize SDK operations. A generation guard prevents stale identity results from updating the current customer state. React hooks expose offerings, purchase and restore state.

## Public exports [#public-exports]

| Subpath | Target |
| --- | --- |
| `.` | `./src/index.ts` |
| `./react` | `./src/react.ts` |

These paths come from `packages/purchases/package.json`. A `.` entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

## How to extend [#how-to-extend]

Register the supported SDK at native startup, configure its public key and keep identity changes inside the package. Client purchase state is presentation; server-verified Paid Access remains authoritative.

Read the [native purchase coordination guide](/docs/features/payments) for the full flow.

## Key files [#key-files]

- [`packages/purchases/package.json`](https://github.com/CarlosZiegler/doro/blob/main/packages/purchases/package.json)

