# Capture card hold
Source: https://docs.lomi.africa/api/charge/ChargesController_captureCardCharge

Capture card hold

***

title: "Capture card hold"
description: "Capture card hold"
full: true
method: post
path: /charge/card/{id}/capture
operationId: ChargesController\_captureCardCharge
-------------------------------------------------

## Overview

Capture card hold

Takes some or all of a confirmed card hold. A lower amount releases the rest. The sale completes when the capture is recorded.

### When to use this

Use after the customer confirms a hold (`status` is `requires_capture`) and you know how much to keep.

### Caveats

Send `Idempotency-Key`. Omit `amount` to take the full hold. The captured amount must still meet the card minimum. You can capture once.

### See also

[Card holds](/build/accept/card-holds) · [Cancel card charge](/api/charge/ChargesController_cancelCardCharge)

## Authentication

Merchant routes require an API key in the `X-API-KEY` header (see [Integration overview](/api)). Use a **test** key against `https://sandbox.api.lomi.africa` and a **live** key against `https://api.lomi.africa`.

## Endpoint

`POST /charge/card/{id}/capture`

Base URLs:

* `https://sandbox.api.lomi.africa`
* `https://api.lomi.africa`

## Request

### Path parameters

| Name | Required | Schema | Description               |
| ---- | -------- | ------ | ------------------------- |
| `id` | Yes      | -      | Card payment id (pi\_...) |

### Query parameters

*No query parameters.*

### Headers

| Name              | In     | Required | Schema | Description                                                                                                                                          |
| ----------------- | ------ | -------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Idempotency-Key` | header | Yes      | -      | Required for this money-moving call. Reuse the same key when retrying the same capture.                                                              |
| `Lomi-Account`    | header | No       | -      | Optional lomi. Network account id (`acct_...`). When present, the API key acts as the Operator and the request targets the connected Member Account. |

### Request body

| Field    | Required | Description                                                                      |
| -------- | -------- | -------------------------------------------------------------------------------- |
| `amount` | No       | Amount to take, in the same currency as the hold. Omit to capture the full hold. |

## Responses

| Status | Description        |
| ------ | ------------------ |
| `200`  | Card hold captured |

## Errors

Errors follow the standard JSON error format (status code and machine-readable message). Validate inputs before calling; **401** indicates a missing/invalid key, **404** a missing resource for this organization, **429** rate limiting. Send `Idempotency-Key` on every capture.

## Example

```bash
curl -sS -X POST "https://sandbox.api.lomi.africa/charge/card/pi_123/capture" \
  -H "X-API-KEY: $LOMI_SECRET_KEY" \
  -H "Idempotency-Key: capture-senoto-1001" \
  -H "Content-Type: application/json" \
  -d '{"amount":25000}'
```

## OpenAPI

* **operationId**: `ChargesController_captureCardCharge`
* **Operation**: `POST /charge/card/{id}/capture`

Full schemas and **Try it**: [API reference](/api). Machine-readable contract: repo `apps/docs/openapi.json`.
