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

# Record product application repayment

> Record product application repayment. Access is subject to the permissions, authentication, and branch requirements documented for this operation.



## OpenAPI

````yaml /openapi/tenant-staff-v1.openapi.yaml post /product-applications/{applicationId}/repay
openapi: 3.1.0
info:
  title: Anbyan Staff Session API
  version: 1.0.0
  description: >
    Human staff API authenticated with short-lived staff sessions. Login uses
    email and password, followed by MFA when required.
servers:
  - url: https://{tenantDomain}/api/v1/staff
    description: Staff session API on a tenant domain
    variables:
      tenantDomain:
        default: tenant.example.com
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Ledger
  - name: Deposits
  - name: Withdrawals
  - name: Transfers
  - name: Vaults
  - name: Direct Deposits
  - name: Bank Migrations
  - name: Accounts
  - name: Account Products
  - name: Clients
  - name: Client Compliance
  - name: Product Applications
  - name: Card Programs
  - name: Card Design Sets
  - name: Cards
  - name: Dashboard
  - name: Simulator
  - name: Compliance Program
  - name: Staff
  - name: Incidents
  - name: Branches
  - name: Jurisdictions
  - name: Locations
  - name: Notifications
  - name: Settings
  - name: FX
  - name: Passbooks
  - name: Access Control
  - name: Users
  - name: Activity Logs
paths:
  /product-applications/{applicationId}/repay:
    post:
      tags:
        - Product Applications
      summary: Record product application repayment
      description: >-
        Record product application repayment. Access is subject to the
        permissions, authentication, and branch requirements documented for this
        operation.
      operationId: repayProductApplication
      parameters:
        - $ref: '#/components/parameters/ApplicationId'
      requestBody:
        $ref: '#/components/requestBodies/ProductRepaymentRequest'
      responses:
        '200':
          $ref: '#/components/responses/ProductRepaymentResponse'
components:
  parameters:
    ApplicationId:
      name: applicationId
      in: path
      required: true
      schema:
        type: string
  requestBodies:
    ProductRepaymentRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProductRepaymentRequest'
  responses:
    ProductRepaymentResponse:
      description: Product application repayment response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProductRepaymentResponse'
  schemas:
    ProductRepaymentRequest:
      type: object
      required:
        - amount
        - sourceType
      properties:
        amount:
          type: string
        sourceType:
          type: string
          enum:
            - internal_account
            - cash
            - external_settlement
        sourceAccountId:
          type: string
        settlementRail:
          type: string
          enum:
            - ach
            - wire
            - cash_pickup
            - manual
        settlementDetails:
          $ref: '#/components/schemas/ExternalSettlementDetails'
        settlementReference:
          type: string
        notes:
          type: string
    ProductRepaymentResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            application:
              $ref: '#/components/schemas/ProductApplication'
            ledgerTransaction:
              $ref: '#/components/schemas/LedgerTransactionSummary'
            allocation:
              type: object
              properties:
                interestAmount:
                  type: string
                principalAmount:
                  type: string
    ExternalSettlementDetails:
      type: object
      required:
        - counterpartyName
        - referenceCode
      properties:
        counterpartyName:
          type: string
        institutionName:
          type: string
        referenceCode:
          type: string
    ProductApplication:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        status:
          type: string
        requestType:
          type: string
        clientId:
          type: string
        accountProductId:
          type:
            - string
            - 'null'
        cardProgramId:
          type:
            - string
            - 'null'
        targetAccountId:
          type:
            - string
            - 'null'
        accountHolderType:
          type: string
        currency:
          type: string
        requestedAmount:
          type: number
        requestedTermMonths:
          type:
            - integer
            - 'null'
        requestedInterestRate:
          type:
            - string
            - 'null'
        fundingPurpose:
          type:
            - string
            - 'null'
        createdAt:
          type: string
          format: date-time
        approvedAt:
          type:
            - string
            - 'null'
          format: date-time
        termProfile:
          oneOf:
            - $ref: '#/components/schemas/ProductTermProfile'
            - type: 'null'
        settlements:
          type: array
          items:
            $ref: '#/components/schemas/ProductApplicationSettlement'
    LedgerTransactionSummary:
      type: object
      properties:
        id:
          type: string
        referenceableType:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        postedAt:
          type:
            - string
            - 'null'
          format: date-time
    ProductTermProfile:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        principalAmount:
          type: string
        nominalInterestRate:
          type:
            - string
            - 'null'
        termMonths:
          type:
            - integer
            - 'null'
        status:
          type: string
        fundedAt:
          type:
            - string
            - 'null'
          format: date-time
        servicingStartedAt:
          type:
            - string
            - 'null'
          format: date-time
    ProductApplicationSettlement:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
        direction:
          type: string
        rail:
          type: string
        status:
          type: string
        amount:
          type: string
        currency:
          type: string
        reference:
          type:
            - string
            - 'null'
        settledAt:
          type:
            - string
            - 'null'
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.