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

# placement()

> Present Encore offers via a fluent builder API

Creates a placement builder for presenting offers. This is the recommended way to present offers — it matches the API pattern across all Encore SDKs.

## Signature

```tsx theme={null}
placement(id?: string): PlacementBuilder
```

### PlacementBuilder

```tsx theme={null}
class PlacementBuilder {
  show(): Promise<PlacementResult>
}
```

## Parameters

| Name | Type              | Description                                                                           |
| ---- | ----------------- | ------------------------------------------------------------------------------------- |
| `id` | string (optional) | The placement identifier configured in the Encore Dashboard. Defaults to empty string |

## Returns

`PlacementBuilder.show()` returns a [`PlacementResult`](./placement-result) object.

## Usage

```tsx theme={null}
const result = await Encore.placement('cancellation_flow').show();

if (result.status === 'granted') {
  // User accepted the offer
} else {
  // User dismissed — proceed with original flow
}
```

### With named placements for analytics

```tsx theme={null}
await Encore.placement('onboarding_upsell').show();
await Encore.placement('cancel_flow').show();
await Encore.placement('settings_upgrade').show();
```

<Info>
  Register `onPurchaseRequest` and `onPassthrough` handlers before calling `show()`. See [onPurchaseRequest()](./on-purchase-request) and [onPassthrough()](./on-passthrough).
</Info>
