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

# Recurring and authorizations

> Handle recurrences, preauthorizations, and capture/void operations with typed APIs.

# Recurring and authorizations

<Tip>
  **Recurrence** charges repeat on a schedule; **preauthorization** holds funds before capture or void. Amounts remain in **minor units** everywhere.
</Tip>

This section covers:

* recurring payment creation and cancellation
* preauthorization capture (full/partial)
* authorization void

## Create recurrence

```ts theme={null}
import { Currency } from 'gopay-sdk';

const recurrence = await client.createRecurrence(paymentId, {
  amount: 9900,
  currency: Currency.CZK,
  order_number: 'REC-2026-0001',
  order_description: 'Monthly subscription charge',
  items: [
    {
      type: 'ITEM',
      name: 'Pro subscription',
      amount: 9900,
      count: 1,
    },
  ],
});
```

## Void recurrence

```ts theme={null}
await client.voidRecurrence(paymentId);
```

## Capture full authorization

```ts theme={null}
await client.captureAuthorization(paymentId);
```

## Capture partial authorization

```ts theme={null}
await client.captureAuthorizationPartial(paymentId, {
  amount: 4900,
  items: [
    {
      type: 'ITEM',
      name: 'Partially shipped item',
      amount: 4900,
      count: 1,
    },
  ],
});
```

## Void authorization

```ts theme={null}
await client.voidAuthorization(paymentId);
```

## Card operations

### Get card details

```ts theme={null}
const card = await client.getCardDetails(cardId);
console.log(card.card_brand, card.status);
```

### Delete card

```ts theme={null}
await client.deleteCard(cardId);
```

`deleteCard` expects `204 No Content` from the API on success.
