> ## 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.

# Finish two-step card payment



## OpenAPI

````yaml /openapi.yml post /api/v2/payment/{transactionId}/pay
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/payment/{transactionId}/pay:
    post:
      tags:
        - Payments
      summary: Finish two-step card payment
      operationId: api-payments-pay
      parameters:
        - name: transactionId
          in: path
          description: The transaction identification to be paid
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayRequest'
            examples:
              Request example:
                $ref: '#/components/examples/PayRequestExample'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  $ref: '#/components/examples/PayResponseExample'
              schema:
                $ref: '#/components/schemas/PayResponse'
      deprecated: false
components:
  schemas:
    PayRequest:
      type: object
      required:
        - card
      properties:
        card:
          $ref: '#/components/schemas/Card'
    PayResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/PaybyrdCode'
        description:
          $ref: '#/components/schemas/PaybyrdDescription'
        status:
          type: string
          example: Success
    Card:
      type: object
      required:
        - number
        - expiration
        - cvv
        - holder
      properties:
        number:
          type: string
          description: The card number
          example: '5149682323738886'
        expiration:
          type: string
          description: The card expiration date with pattern "MM/YY"
          example: 03/29
        cvv:
          type: string
          description: The Card Verification Value
          example: '929'
        holder:
          type: string
          description: The card holder name
          example: Peter Parker
        aav:
          type: string
          description: The authentication value returned by the 3DS authentication
        dsTransactionId:
          type: string
          description: >-
            The transaction id returned by the Directory Server executed on 3DS
            authentication
        eci:
          type: string
          description: The card ECI code returned by the 3DS authentication
        xid:
          type: string
          description: The card transaction identifier returned by the 3DS authentication
        verificationMethod:
          type: string
          description: >-
            The card verification method indicates if the 3DS was previously
            performed.  When this value is not provided, Paybyrd will respond
            with the action URL to initiate the 3D Secure flow. For that case, a
            second step will be required for the payment creation. For
            'ThreeDSecure' it is also necessary to provide the 3DS
            authentication data (aav, dsTransactionId, eci and threeDsVersion).
            When 'ThreeDSecureAttempt' is provided, a proof of attempt must also
            be sent. In case you want Paybyrd to handle all the 3DS flow, you
            must leave this field empty. For this scenario, we will respond with
            an Action Url that must be triggered on the client side. This will
            trigger the 3DS flow automatically.
          enum:
            - ThreeDSecure
            - ThreeDSecureAttempt
            - None
    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
  examples:
    PayRequestExample:
      description: This is an example to use when to finish two-step card payment.
      value:
        card:
          number: '5386134136087954'
          expiration: 03/29
          cvv: '965'
          holder: Peter Parker
          ThreeDsVersion: V2
          Aav: cbd05c44c572458ba7468df0f75c932a
          DsTransactionId: a3ad6ed8-c4b0-4cb4-972e-46e86a041ad1
          Eci: '01'
          VerificationMethod: ThreeDSecure
    PayResponseExample:
      value:
        code: BYRD200
        description: Operation successfully completed
        status: Success
  securitySchemes:
    authByApiKey:
      type: apiKey
      in: header
      name: x-api-key

````