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

# Complete kcp payment

> Complete a KCP payment



## OpenAPI

````yaml /api-reference/openapi.json post /payment_links/kcp/payment
openapi: 3.0.0
info:
  description: Documentation of the early finverse services
  title: Finverse Public
  termsOfService: https://example.com
  contact:
    name: Maintainers
    email: info@finverse.com
  license:
    name: unknown license
  version: 0.0.1
servers:
  - url: https://api.prod.finverse.net
security:
  - Oauth2:
      - test
tags:
  - name: public
    description: Publicly accessible endpoints
    x-group: Public
  - name: customer
    description: Customer app and institution endpoints
    x-group: Customer
  - name: link
    description: Finverse Link flows
    x-group: Link
  - name: login_identity
    description: Login identity lifecycle and metadata
    x-group: Login identity
  - name: accounts
    description: Accounts, balances, and account numbers
    x-group: Accounts
  - name: statements
    description: Statements and composite statements
    x-group: Statements
  - name: transactions
    description: Transaction history
    x-group: Transactions
  - name: identity_income
    description: Identity and income insights
    x-group: Identity & income
  - name: payment_links
    description: Payment link creation and checkout
    x-group: Payment links
  - name: mandates
    description: Direct debit mandates
    x-group: Mandates
  - name: payments
    description: Payment initiation and status
    x-group: Payment operations
  - name: payouts
    description: Payouts and scheduled payouts
    x-group: Payouts
  - name: payment_users
    description: Payment user profiles
    x-group: Payment users
  - name: payment_accounts
    description: Payment accounts for users
    x-group: Payment accounts
  - name: payment_methods
    description: Stored payment methods
    x-group: Payment methods
  - name: bills
    description: Bill presentment
    x-group: Bills
  - name: disputes
    description: Payment disputes
    x-group: Disputes
  - name: ledger
    description: Ledger and statements
    x-group: Ledger
paths:
  /payment_links/kcp/payment:
    post:
      tags:
        - payment_links
      summary: Complete kcp payment
      description: Complete a KCP payment
      operationId: completeKcpPayment
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteKcpPaymentRequest'
        description: Parameters from the KCP SDK callback to complete the payment
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompleteKcpPaymentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBodyModelV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrBodyModelV2'
      security:
        - Oauth2:
            - kcp:completePayment
components:
  schemas:
    CompleteKcpPaymentRequest:
      required:
        - tran_cd
        - enc_data
        - enc_info
        - ordr_idxx
      properties:
        buyr_mail:
          description: Buyer's mail
          type: string
        card_pay_method:
          description: Card payment method
          type: string
        card_point_use:
          description: If card point is used
          type: string
          enum:
            - 'Y'
            - 'N'
        enc_data:
          type: string
        enc_info:
          type: string
        kcp_select_card_code:
          description: KCP select card code
          type: string
          example: CCXB
        lang:
          type: string
        ordr_chk:
          description: In the format of "[FV Payment ID]|[Amount]"
          type: string
        ordr_idxx:
          description: FV Payment ID
          type: string
        res_cd:
          description: Result code, "0000" if the payment is successful
          type: string
        res_msg:
          description: Result message
          type: string
        ret_pay_method:
          type: string
        trace_no:
          description: Trace number
          type: string
        tran_cd:
          description: Transaction code
          type: string
        use_pay_method:
          type: string
    CompleteKcpPaymentResponse:
      required:
        - redirect
      properties:
        redirect:
          description: retryUrl from the token's claims
          type: string
    ErrBodyModelV2:
      properties:
        error:
          $ref: '#/components/schemas/FvErrorModelV2'
    FvErrorModelV2:
      required:
        - type
        - error_code
        - message
        - details
        - request_id
      properties:
        details:
          type: string
        error_code:
          type: string
          example: CREDENTIALS_INVALID
        message:
          type: string
        request_id:
          description: The request_id provided in the request header
          type: string
        type:
          description: The error type
          type: string
          enum:
            - LINK_ERROR
            - API_ERROR
          example: LINKING_ERROR
  securitySchemes:
    Oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://finverse-dev.us.auth0.com/oauth/token
          scopes:
            account: Account
            balance: Balance
            credit: Credit
            institution: Institution
            investment: Investment
            link: Link
            test: Test
            transaction: Transaction

````