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

# Payment Identifier

> Use payment IDs for idempotency across payment requests

## Client Hook

```typescript theme={null}
import { createPaymentIdHook } from '@armory-sh/extensions';

const autoIdHook = createPaymentIdHook();

const fixedIdHook = createPaymentIdHook({
  paymentId: 'invoice-2026-00042'
});
```

## Server Declaration

```typescript theme={null}
import { declarePaymentIdentifierExtension } from '@armory-sh/extensions';

const extension = declarePaymentIdentifierExtension({
  required: true
});
```

## Utility

```typescript theme={null}
import { generatePaymentId } from '@armory-sh/extensions';

const id = generatePaymentId();
```
