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

# Sepay Webhook

> Receive bank transaction callback from SEPay webhook.

1. Generates a deterministic UUID based on SEPay ID.
2. Inserts the transaction into the bank_transactions table.
3. Searches for a matching unconfirmed AP payment.
4. Auto-confirms the payment if matched.



## OpenAPI

````yaml /api/openapi-cutmake.json post /sepay
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /sepay:
    post:
      tags:
        - SEPay Webhook
      summary: Sepay Webhook
      description: |-
        Receive bank transaction callback from SEPay webhook.

        1. Generates a deterministic UUID based on SEPay ID.
        2. Inserts the transaction into the bank_transactions table.
        3. Searches for a matching unconfirmed AP payment.
        4. Auto-confirms the payment if matched.
      operationId: sepay_webhook_sepay_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SepayWebhookPayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SepayWebhookPayload:
      properties:
        id:
          type: integer
          title: Id
        gateway:
          anyOf:
            - type: string
            - type: 'null'
          title: Gateway
        transactionDate:
          type: string
          title: Transactiondate
        accountNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Accountnumber
        subAccount:
          anyOf:
            - type: string
            - type: 'null'
          title: Subaccount
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        transferType:
          type: string
          title: Transfertype
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        transferAmount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Transferamount
        accumulated:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Accumulated
        referenceCode:
          anyOf:
            - type: string
            - type: 'null'
          title: Referencecode
      type: object
      required:
        - id
        - transactionDate
        - transferType
        - transferAmount
        - accumulated
      title: SepayWebhookPayload
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````