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

# Capture an authorized card payment

> Captures a previously authorized card transaction. Optionally accepts a partial capture amount.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/payments/{id}/capture
openapi: 3.0.0
info:
  title: PlugToPay API
  description: API to make payments easy in multiple gateways.
  version: 1.0.0
servers:
  - url: http://localhost:7701
    description: Test Server
security: []
paths:
  /api/v1/payments/{id}/capture:
    post:
      tags:
        - Payments
      summary: Capture an authorized card payment
      description: >-
        Captures a previously authorized card transaction. Optionally accepts a
        partial capture amount.
      parameters:
        - $ref: '#/components/parameters/XClientId'
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: false
        content:
          application/json:
            schema:
              properties:
                amount:
                  description: Capture amount in cents (omit for full capture)
                  type: integer
                  example: 5000
              type: object
      responses:
        '200':
          description: Capture processed successfully
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    example: approved
                  transaction_id:
                    type: string
                    example: 01hvxyz...
                  amount:
                    type: integer
                    example: 15000
                  captured_amount:
                    type: integer
                    example: 15000
                  message:
                    type: string
                    example: Capture processed successfully.
                type: object
        '401':
          description: Unauthorized — Invalid API Key
        '404':
          description: Transaction not found
        '422':
          description: Validation error or transaction not capturable
        '500':
          description: Gateway or internal error
      security:
        - ApiKeyAuth: []
components:
  parameters:
    XClientId:
      name: x-client-id
      in: header
      description: Client identifier for the company in the request.
      required: true
      schema:
        type: string
        example: client_abc123
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Company API key. Send in the X-API-Key header.
      name: X-API-Key
      in: header

````