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

# endstate.testHelpers.createTap

> Simulates a tap on a test chip and returns a fresh single-use credential.

```ts theme={null}
createTap(body: CreateTestTapRequest, options?: RequestOptions): Promise<CreateTestTapResponse>
```

|             |                                                                                                 |
| ----------- | ----------------------------------------------------------------------------------------------- |
| Endpoint    | [`POST /v1/test-helpers/taps`](/api-reference/test-helpers/generate-an-e-value-for-a-test-chip) |
| Credential  | Secret key (`end_sk_...`)                                                                       |
| Retry class | `write`                                                                                         |

Never repeated. The API accepts no idempotency key here, so a second send is a second write. Only `429 rate_limit.exceeded` is retried.

## Example

```ts theme={null}
const result = await endstate.testHelpers.createTap({
  chip_id: "ABCDEF0123",
});
```

## Parameters

<ParamField body="chip_id" type="string" required>
  Identifier of the test chip to generate a tap for.
</ParamField>

<ParamField body="count" type="integer">
  Optional counter value. Defaults to the next emulated chip counter and reserves it, so each tap returns a new e-value. Explicit counts must be greater than the chip's current highestObservedCount.
</ParamField>

## Returns

`200` - `CreateTestTapResponse`.

<ResponseField name="chip_id" type="string" required />

<ResponseField name="e" type="string" required />

<ResponseField name="count" type="integer" required />

## Errors

Branch on `error.code`, never on the HTTP status - several codes share one.

| Code                   | HTTP | Retry         |
| ---------------------- | ---- | ------------- |
| `auth.forbidden`       | 403  | Do not retry  |
| `auth.unauthorized`    | 401  | Do not retry  |
| `chip.not_a_test_chip` | 400  | Do not retry  |
| `chip.not_found`       | 404  | Do not retry  |
| `internal.error`       | 500  | Safe to retry |
| `validation.failed`    | 400  | Do not retry  |

See [Errors and retries](/sdks/core/errors-and-retries) for the error types and how to narrow them.
