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

# Confirm Payment

> Complete a payment transaction that was previously initiated. Requires the quote_id and reference from the initiate response.

Complete a payment transaction that was previously initiated. This endpoint executes the payment after you've reviewed the quote from the initiate endpoint.

## Overview

After initiating a payment and receiving a quote, use this endpoint to confirm and execute the payment. The payment will be processed immediately upon confirmation.

<Warning>
  Ensure you have sufficient balance before confirming a payment. Failed payments due to insufficient balance cannot be automatically retried.
</Warning>

## Request Body

<ParamField body="quote_id" type="string" required>
  Payment quote ID from the initiate payment response
</ParamField>

<ParamField body="reference" type="string" required>
  Payment reference from the initiate payment response
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates whether the payment was completed successfully
</ResponseField>

<ResponseField name="data" type="object">
  Payment transaction details including status, amount, currency, and recipient information
</ResponseField>

## Error Responses

If the payment fails (e.g., insufficient balance), the response will include:

<ResponseField name="success" type="boolean">
  Will be `false` for failed payments
</ResponseField>

<ResponseField name="data" type="string">
  Error message describing the failure reason
</ResponseField>


## OpenAPI

````yaml POST /payments/complete
openapi: 3.0.0
info:
  title: Pooler Developer API
  description: >-
    Comprehensive API documentation for Pooler payment and financial services
    platform
  version: 1.0.0
servers:
  - url: https://api.usepooler.com
    description: Production server
  - url: https://sandbox.usepooler.com
    description: Sandbox server
security:
  - bearerAuth: []
paths:
  /payments/complete:
    post:
      tags:
        - Payments
      summary: Confirm Payment
      description: >-
        Complete a payment transaction that was previously initiated. Requires
        the quote_id and reference from the initiate response.
      operationId: confirmPayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmPaymentRequest'
      responses:
        '200':
          description: Payment completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '500':
          description: Payment completion failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ConfirmPaymentRequest:
      type: object
      required:
        - quote_id
        - reference
      properties:
        quote_id:
          type: string
          format: uuid
          description: Payment quote ID from initiate response
        reference:
          type: string
          description: Payment reference from initiate response
    PaymentResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        stan:
          type: string
          format: uuid
        data:
          $ref: '#/components/schemas/Payment'
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        stan:
          type: string
          format: uuid
        data:
          type: string
    Payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        reference:
          type: string
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
        amount:
          type: string
        currency:
          type: string
        description:
          type: string
        type:
          type: string
        sub_type:
          type: string
        category:
          type: string
        transaction_date:
          type: string
          format: date-time
        tags:
          type: string
        is_reversed:
          type: boolean
        is_completed:
          type: boolean
        channel:
          type: string
        notes:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Include your API key in the Authorization
        header as: Bearer {your_api_key}

````