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

# Confirm Payment

> Confirm a pre-authorized payment and capture the reserved funds.

This endpoint captures the reserved funds of a pre-authorized payment. You can confirm the full reserved amount or a partial amount less than or equal to the original pre-authorization.

<Info>
  If you specify an `amount` lower than the original pre-authorized amount, only that partial amount is captured and the remaining funds are released back to the customer.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://developers.flouci.com/api/v2/confirm_payment' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer <PUBLIC_KEY>:<PRIVATE_KEY>' \
    -d '{
      "payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
      "amount": "8500"
    }'
  ```
</RequestExample>

### Body

<ParamField body="payment_id" type="string" required>
  The ID of the pre-authorized payment to confirm.
</ParamField>

<ParamField body="amount" type="string">
  The amount in millimes to capture. Must be less than or equal to the original pre-authorized amount. If omitted, the full pre-authorized amount is captured.
</ParamField>

<ResponseExample>
  ```json Success theme={null}
  {
    "result": {
      "payment_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
      "status": "confirmed",
      "amount": "8500",
      "confirmed_at": "2025-01-15T10:30:00Z"
    },
    "status": "success"
  }
  ```

  ```json Error theme={null}
  {
    "status": "error",
    "message": "Pre-auth payment cannot be confirmed",
    "code": "CONFIRMATION_FAILED"
  }
  ```
</ResponseExample>
