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

# Auth, Capture, and Void

> Pre-authorize a card, capture the funds later, or void the authorization before settlement. Use this flow when the final charge amount is not known at the time of payment.

## Overview

The Auth/Capture/Void flow splits a card charge into two steps:

1. **Authorize** — reserve the funds on the customer's card without charging them yet
2. **Capture** — settle the reserved funds once you are ready (e.g. after shipping or fulfillment)
3. **Void** (optional) — cancel the authorization before capture if the order is cancelled

This is useful for hotel holds, ride reservations, or any situation where the final amount is confirmed after the initial authorization.

***

## Key Requirements

<Info>
  Use your **public API key** encoded in Base64. See the [Authentication
  guide](/guides/authentication) for setup instructions.
</Info>

Set these headers on every request:

```json theme={null}
{
  "Authorization": "Payaza <base64-encoded-public-key>",
  "Content-Type": "application/json"
}
```

***

## Endpoints

| Method | Endpoint                                                 | Description                                                                                  |
| ------ | -------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `POST` | `/card/auth_capture/authorize`                           | Pre-authorize a card and reserve funds                                                       |
| `POST` | `/card/auth_capture/capture`                             | Capture (settle) a previously authorized amount                                              |
| `POST` | `/card/auth_capture/void`                                | Void an authorization before it is captured                                                  |
| `GET`  | `/card/auth_capture/authorize/{authorization_reference}` | Retrieve a single authorization by reference                                                 |
| `GET`  | `/card/auth_capture/authorize`                           | List authorizations with optional filters (`status`, `page`, `size`, `from_date`, `to_date`) |

***

## How it works

<Steps>
  <Step title="Authorize the card">
    Call the Authorize endpoint with the customer's card details and the amount
    to reserve. On success, you receive an `authorization_reference` — store
    this.
  </Step>

  <Step title="Capture when ready">
    When you are ready to charge (e.g. after order fulfillment), call the
    Capture endpoint with the `authorization_reference`. The reserved funds are
    settled to your account.
  </Step>

  <Step title="Void if needed">
    If the order is cancelled before capture, call the Void endpoint with the
    `authorization_reference` to release the hold on the customer's card.
  </Step>
</Steps>

<Warning>
  Authorizations that are neither captured nor voided will expire automatically.
  The expiry window depends on the card network. Implement monitoring to capture
  or void authorizations before they expire.
</Warning>

***

## Best-fit scenarios

* **Inventory-dependent orders** — Authorize at checkout, capture after stock is confirmed
* **Hotel and travel holds** — Reserve funds at booking, settle the final amount at check-out
* **Risk-reviewed transactions** — Hold funds while manual review is completed before capture

***

## What's next

<CardGroup cols={2}>
  <Card title="Card Collections" icon="credit-card" href="/guides/card-collection">
    Standard card charges without the auth/capture split.
  </Card>

  <Card title="Refunds & Chargebacks" icon="arrow-rotate-left" href="/guides/refunds-chargebacks">
    Reverse a captured payment or respond to a chargeback.
  </Card>
</CardGroup>
