# extendSubscriptionItemFreeTrial()

> Billing is currently in Beta and its APIs are experimental and may undergo breaking changes. To mitigate potential disruptions, we recommend [pinning](https://clerk.com/docs/pinning.md) your SDK and `clerk-js` package versions.

Extends the free trial period of a Subscription Item. Returns the updated [`BillingSubscriptionItem`](https://clerk.com/docs/reference/backend/types/billing-subscription-item.md).

```ts
function extendSubscriptionItemFreeTrial(
  subscriptionItemId: string,
  params: ExtendSubscriptionItemFreeTrialParams,
): Promise<BillingSubscriptionItem>
```

## `ExtendSubscriptionItemFreeTrialParams`

| Name     | Type | Description                                                                                                                    |
| -------- | ---- | ------------------------------------------------------------------------------------------------------------------------------ |
| extendTo | Date | An RFC3339 timestamp to extend the free trial to. Must be in the future and not more than 365 days from the current trial end. |

## Example

> Using `clerkClient` varies based on the SDK you're using. Refer to the [overview](https://clerk.com/docs/reference/backend/overview.md) for usage details, including guidance on [how to access the `userId` and other properties](https://clerk.com/docs/reference/backend/overview.md#example-get-the-user-id-and-other-properties).

```tsx
const response = await clerkClient.billing.extendSubscriptionItemFreeTrial('subi_123', {
  extendTo: new Date('2026-12-31'),
})
```

## Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint `POST /billing/subscription_items/{subscription_item_id}/extend_free_trial`. See the [BAPI reference](https://clerk.com/docs/reference/backend-api/tag/billing/POST/billing/subscription_items/%7Bsubscription_item_id%7D/extend_free_trial){{ target: '_blank' }} for more information.

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
