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

# Bank Confirm Payment

> Record the bank's webhook confirmation of this transfer (UC2).
Idempotent on (org, bankRef): re-delivery is a no-op; the same reference
on a different payment is rejected.



## OpenAPI

````yaml /api/openapi-finindex.json post /api/v1/payments/{payment_id}/bank-confirm
openapi: 3.1.0
info:
  title: Finindex API — ERP · Finance · Accounting
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/payments/{payment_id}/bank-confirm:
    post:
      tags:
        - Payments
      summary: Bank Confirm Payment
      description: |-
        Record the bank's webhook confirmation of this transfer (UC2).
        Idempotent on (org, bankRef): re-delivery is a no-op; the same reference
        on a different payment is rejected.
      operationId: bank_confirm_payment_api_v1_payments__payment_id__bank_confirm_post
      parameters:
        - name: payment_id
          in: path
          required: true
          schema:
            type: string
            title: Payment Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankConfirmInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentResponse'
        '401':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    BankConfirmInput:
      properties:
        bankRef:
          type: string
          minLength: 1
          title: Bankref
          description: bank movement reference
        amount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Amount
          description: gross bank movement; must equal amount + bank fee
      type: object
      required:
        - bankRef
      title: BankConfirmInput
    PaymentResponse:
      properties:
        id:
          type: string
          title: Id
        paymentNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentnumber
        paymentDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Paymentdate
        method:
          anyOf:
            - type: string
            - type: 'null'
          title: Method
        sourceAccountKey:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceaccountkey
        supplierId:
          anyOf:
            - type: string
            - type: 'null'
          title: Supplierid
        employeeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Employeeid
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        amount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Amount
        bankFeeAmount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Bankfeeamount
        fctVatAmount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Fctvatamount
        fctCitAmount:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Fctcitamount
        bankRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankref
        bankConfirmedAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Bankconfirmedat
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
        glPosted:
          type: boolean
          title: Glposted
          default: false
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        createdAt:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdat
        allocations:
          items:
            $ref: '#/components/schemas/AllocationResponse'
          type: array
          title: Allocations
          default: []
      type: object
      required:
        - id
        - amount
      title: PaymentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AllocationResponse:
      properties:
        id:
          type: string
          title: Id
        billId:
          type: string
          title: Billid
        allocatedAmount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Allocatedamount
      type: object
      required:
        - id
        - billId
        - allocatedAmount
      title: AllocationResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````