# waitForTerminateService

> **waitForTerminateService**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `fwssTerminated`: `true`; `serviceTerminationEpoch`: `bigint`; `terminationTxHash`: `""` \| `` `0x${string}` ``; `txStatus`: `""` \| `"pending"` \| `"confirmed"`; `txSuccess`: `boolean` \| `null`; \}\>

Defined in: [packages/synapse-core/src/sp/terminate-service.ts:327](https://github.com/FilOzone/synapse-sdk/blob/2d2d7bce6ac65fcd0372c9c89607bd05cfc52093/packages/synapse-core/src/sp/terminate-service.ts#L327)

Wait for the data set termination status.

GET /pdp/data-sets/{dataSetId}/terminate

Polls until the provider's transaction confirms and the termination epoch is
recorded. A 404 means no client-requested termination exists: either none
was submitted, or the provider's transaction failed and the request was
discarded ([WaitForTerminateServiceNotFoundError](/reference/filoz/synapse-core/errors/classes/waitforterminateservicenotfounderror/)).

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/optionstype/) | [waitForTerminateService.OptionsType](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `fwssTerminated`: `true`; `serviceTerminationEpoch`: `bigint`; `terminationTxHash`: `""` \| `` `0x${string}` ``; `txStatus`: `""` \| `"pending"` \| `"confirmed"`; `txSuccess`: `boolean` \| `null`; \}\>

Status [waitForTerminateService.OutputType](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/outputtype/)

## Throws

Errors [waitForTerminateService.ErrorType](/reference/filoz/synapse-core/sp/namespaces/waitforterminateservice/type-aliases/errortype/)