> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Capture a Payment

> Captures an authorized payment. A payment must be in `authorized` status to be captured. You can capture for the full authorized amount or a lesser amount.



## OpenAPI

````yaml /openapi/core.json post /payments/{id}/capture
openapi: 3.1.0
info:
  title: Razorpay Core Resources API
  description: >-
    The Razorpay Core Resources API provides endpoints for managing Orders,
    Payments, Refunds, and Settlements. Use HTTP Basic Auth with your Key ID as
    the username and Key Secret as the password.
  version: 1.0.0
  contact:
    name: Razorpay Support
    url: https://razorpay.com/support
servers:
  - url: https://api.razorpay.com/v1
    description: Razorpay Production API
security:
  - basicAuth: []
tags:
  - name: Orders
    description: >-
      Orders represent payment intents. Create an order before accepting a
      payment from a customer.
  - name: Payments
    description: >-
      Payments represent individual payment transactions. Fetch, list, and
      capture payments.
  - name: Refunds
    description: >-
      Refunds represent the reversal of a payment back to the customer. Initiate
      full or partial refunds against captured payments.
  - name: Settlements
    description: >-
      Settlements represent the transfer of funds collected from payments to
      your registered bank account.
paths:
  /payments/{id}/capture:
    post:
      tags:
        - Payments
      summary: Capture a Payment
      description: >-
        Captures an authorized payment. A payment must be in `authorized` status
        to be captured. You can capture for the full authorized amount or a
        lesser amount.
      operationId: capturePayment
      parameters:
        - name: id
          in: path
          required: true
          description: The unique identifier of the authorized payment to capture.
          schema:
            type: string
            example: pay_DJkTfWoJ5ZFPce
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentCaptureRequest'
            example:
              amount: 50000
              currency: INR
      responses:
        '200':
          description: >-
            The payment was successfully captured. Returns the updated payment
            object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payment'
              example:
                id: pay_DJkTfWoJ5ZFPce
                entity: payment
                amount: 50000
                currency: INR
                status: captured
                order_id: order_IluGWxBm9U8zJ8
                method: upi
                captured: true
                description: 'Payment for order #1001'
                email: john.doe@example.com
                contact: '+919876543210'
                created_at: 1595491108
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    PaymentCaptureRequest:
      type: object
      description: Request body for capturing an authorized payment.
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          description: >-
            The amount to capture, in the smallest currency sub-unit. Must be
            equal to or less than the authorized payment amount.
          example: 50000
        currency:
          type: string
          description: >-
            The ISO 4217 currency code. Must match the currency of the original
            payment.
          example: INR
    Payment:
      type: object
      description: A Razorpay Payment object representing a payment transaction.
      properties:
        id:
          type: string
          description: Unique identifier for the payment.
          example: pay_DJkTfWoJ5ZFPce
        entity:
          type: string
          description: Entity type, always `payment` for payment objects.
          example: payment
        amount:
          type: integer
          description: >-
            The payment amount in the smallest currency sub-unit (e.g., paise
            for INR).
          example: 50000
        currency:
          type: string
          description: The ISO 4217 currency code for the payment.
          example: INR
        status:
          type: string
          description: The current status of the payment.
          enum:
            - created
            - authorized
            - captured
            - refunded
            - failed
          example: captured
        order_id:
          type: string
          description: The unique identifier of the order associated with this payment.
          example: order_IluGWxBm9U8zJ8
        method:
          type: string
          description: The payment method used for this transaction.
          enum:
            - card
            - netbanking
            - wallet
            - upi
            - emi
          example: upi
        captured:
          type: boolean
          description: >-
            Indicates whether the payment has been captured. `true` if the
            payment is captured.
          example: true
        description:
          type: string
          description: A brief description of the payment.
          example: 'Payment for order #1001'
        email:
          type: string
          description: The email address of the customer who made the payment.
          example: john.doe@example.com
        contact:
          type: string
          description: The phone number of the customer who made the payment.
          example: '+919876543210'
        created_at:
          type: integer
          description: Unix timestamp (in seconds) at which the payment was created.
          example: 1595491108
    ErrorResponse:
      type: object
      description: An error response returned by the API.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: A machine-readable error code.
              example: BAD_REQUEST_ERROR
            description:
              type: string
              description: A human-readable description of the error.
              example: The amount must be at least 100 paise.
            source:
              type: string
              description: The source of the error (e.g., `business` or `customer`).
              example: business
            step:
              type: string
              description: The step at which the error occurred.
              example: payment_initiation
            reason:
              type: string
              description: A brief reason for the error.
              example: input_validation_failed
            metadata:
              type: object
              description: Additional metadata about the error.
              additionalProperties: true
  responses:
    BadRequestError:
      description: The request was invalid or contained incorrect parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnauthorizedError:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use your Razorpay Key ID as the username and Key Secret as the password.

````