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

# Capture

> For the charge to be carried out from a pre-authorization, it's necessary to send from your cash register to our API a request to capture the value of the payment-related transaction.



## OpenAPI

````yaml /openapi.yml post /api/v2/capture/{transactionId}
openapi: 3.0.3
info:
  title: Gateway API
  version: v2
  contact:
    name: Support
    email: support@paybyrd.com
  license:
    name: Copyright © Paybyrd
  termsOfService: https://paybyrd.com/en/privacy
servers:
  - url: https://gateway.paybyrd.com
    description: Production
security:
  - authByApiKey: []
paths:
  /api/v2/capture/{transactionId}:
    post:
      tags:
        - Transactions
      summary: Capture
      description: >-
        For the charge to be carried out from a pre-authorization, it's
        necessary to send from your cash register to our API a request to
        capture the value of the payment-related transaction.
      operationId: api-transactions-capture
      parameters:
        - name: transactionId
          in: path
          description: >-
            The transaction identification refers to the pre-authorization
            generated by Paybyrd.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CaptureRequest'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  $ref: '#/components/examples/CaptureResponseExample'
              schema:
                $ref: '#/components/schemas/CaptureResponse'
        '202':
          description: '202'
          content:
            application/json:
              examples:
                Result:
                  $ref: '#/components/examples/AcceptedResponseExample'
              schema:
                $ref: '#/components/schemas/AcceptedResponse'
      deprecated: false
components:
  schemas:
    CaptureRequest:
      type: object
      required:
        - amount
        - isoAmount
      properties:
        amount:
          type: string
          description: >-
            For the capture amount, please use the 'isoAmount' field. This is
            essential due to our multi-currency support
          deprecated: true
        isoAmount:
          type: integer
          description: The amount in ISO format, with the following pattern "2500"
          format: int64
    CaptureResponse:
      type: object
      properties:
        amount:
          type: string
          description: The value that has been captured.
          example: '3.00'
        isoAmount:
          type: integer
          description: The value that has been captured.
          example: 300
          format: int64
        code:
          $ref: '#/components/schemas/PaybyrdCode'
        description:
          $ref: '#/components/schemas/PaybyrdDescription'
        sourceTransaction:
          $ref: '#/components/schemas/CaptureSourceTransactionResponse'
        transactionId:
          type: string
          description: >-
            This field contains the unique identifier that represents the new
            transaction that is created by the capture.
          example: c16ce479-319d-4e7b-a966-7735c34b2cc5
    AcceptedResponse:
      type: object
      properties:
        code:
          type: string
          description: BYRD010
        description:
          type: string
          description: Request accepted
        links:
          $ref: '#/components/schemas/AcceptedLinkResponse'
    PaybyrdCode:
      type: string
      description: >-
        Represents the Paybyrd code of the web request. To see more details
        check in [Return Codes](ref:appendix-return-codes) page.
      example: BYRD200
      enum:
        - BYRD010
        - BYRD200
        - BYRD201
        - BYRD203
        - BYRD205
        - BYRD206
        - BYRD207
        - BYRD208
        - BYRD230
        - BYRD231
        - BYRD240
        - BYRD290
        - BYRD291
        - BYRD292
        - BYRD294
        - BYRD299
        - BYRD401
        - BYRD403
        - BYRD900
        - BYRD901
        - BYRD999
    PaybyrdDescription:
      type: string
      example: Operation successfully completed
      description: >-
        Represents a textually the description of the Paybyrd code of the web
        request.  To see more details check in [Return
        Codes](ref:appendix-return-codes) page
      enum:
        - Request accepted
        - Operation successfully completed
        - Payment being processed. Waiting for shopper
        - >-
          An error occurred while processing the payment. Please query the
          transaction to confirm its status
        - Operation rejected
        - Operation blocked by velocity
        - Pending redirect
        - Payment canceled by the shopper
        - Payment already refunded
        - >-
          The refund amount exceeds the remaining balance of the original
          payment
        - Token is expired
        - >-
          An error occurred while pre processing the transaction. Please review
          your request and try again
        - >-
          An error occurred during while preparing transaction for acquiring.
          Please review your request and try again
        - >-
          No payment methods available for this operation. Please contact
          Paybyrd's support
        - >-
          Transaction could not be updated. Please review your request and try
          again
        - >-
          Operation could not be completed. Please review your request and try
          again
        - Resource access is forbidden
        - Resource access unauthorized
        - Invalid input
        - Resource not found
        - Operation failed
    CaptureSourceTransactionResponse:
      type: object
      properties:
        amount:
          type: string
          example: '13.00'
        isoAmount:
          type: integer
          example: 1300
          format: int64
        capturedAmount:
          type: string
          example: '3.00'
        isoCapturedAmount:
          type: integer
          example: 300
        remainingAmount:
          type: string
          example: '10.00'
        isoRemainingAmount:
          type: integer
          example: 1000
        transactionId:
          type: string
          example: 4faa13cd-f6ff-414e-b5bd-b61d1e72e418
    AcceptedLinkResponse:
      type: object
      properties:
        href:
          type: string
          description: The partial url to get the current process.
        rel:
          type: string
          description: The related entity to the process.
        type:
          type: string
          description: The HTTP method which must be used in the partial url.
  examples:
    CaptureResponseExample:
      value:
        amount: '3.00'
        isoAmount: 300
        code: BYRD200
        description: Operation successfully completed
        sourceTransaction:
          amount: '13.00'
          isoAmount: 1300
          capturedAmount: '3.00'
          isoCapturedAmount: 300
          remainingAmount: '10.00'
          isoRemainingAmount: 1000
          transactionId: 4faa13cd-f6ff-414e-b5bd-b61d1e72e418
        transactionId: c16ce479-319d-4e7b-a966-7735c34b2cc5
    AcceptedResponseExample:
      value:
        code: BYRD010
        description: Request accepted
        links:
          href: /api/v2/transactions?requestId=93ce3e62-82b9-4570-8248-45915e794fd0
          rel: transactions
          type: GET
  securitySchemes:
    authByApiKey:
      type: apiKey
      in: header
      name: x-api-key

````