openapi: 3.1.0
info:
  title: Qeet Pay API
  version: v1
  description: India-first payments, billing and GST infrastructure (UPI / Cards / NACH) — payments and payouts, billing, tax, risk, embedded finance and platform APIs. Money is always in integer minor units (paise).
  contact:
    name: Qeet Group
    url: https://qeet.in
  license:
    name: Proprietary
    url: https://qeet.in
servers:
  - url: https://api.pay.qeet.in
    description: Production
  - url: https://api.pay.staging.qeet.in
    description: Staging
  - url: http://localhost:4201
    description: Local (docker compose)
security:
  - API-Key: []
tags:
  - name: Orchestration
    description: Smart provider routing — scorecards and cost basis.
  - name: Virtual Accounts
    description: Per-customer virtual accounts with auto-reconciled credits.
  - name: Payments
    description: Accept payments — create authorizes, capture posts the ledger entry (idempotent), read and list.
  - name: Payment Links
    description: Create, read, list and cancel shareable payment links (fixed or open amount), and pay a link by its code.
  - name: Offline
  - name: Mandates
    description: Recurring-mandate lifecycle (create → activate → pause/resume → revoke) and idempotent mandate debits.
  - name: Checkout
    description: Public hosted-checkout — resolve a payment link by code and pay it with no merchant API key.
  - name: Treasury
    description: Programmable money — auto-sweep rules that move idle cash between ledger accounts, plus an advisory idle-cash recommendation.
  - name: Reconciliation
    description: Ingest provider settlement reports — post the money movement and auto-reconcile against captured payments.
  - name: Payroll
  - name: Payouts
    description: Create, approve (maker-checker, idempotent) and reject single payouts; approval disburses and posts to the ledger.
  - name: Ledger
    description: Double-entry ledger accounts and balanced journal entries.
  - name: Billing
    description: Plans, subscriptions, invoices and usage metering, with lifecycle actions (upgrade/downgrade/pause/resume/cancel).
  - name: Revenue Recognition
    description: IndAS 115 revenue schedules — defer revenue, recognise due periods, and read schedules with their slices.
  - name: Dunning
    description: Failed-payment retry rules and attempt history.
  - name: TDS / TCS Returns
    description: Prepare, export, and file quarterly TDS/TCS statutory returns (Form 24Q/26Q/27EQ).
  - name: TDS / TCS
    description: Tax-at-source deductions, certificates and summaries.
  - name: Input Tax Credit
    description: Record inward-supply purchase invoices, reconcile them against supplier-filed GSTR-2B, and report eligible ITC.
  - name: GST Returns
    description: Prepare GSTR-1/GSTR-3B returns for a tax period from merchant invoices and file them to GSTN (ARN).
  - name: GST AI
    description: AI-assisted HSN/SAC classification and the Regulatory-Change Impact Radar — both via the AiGateway §6.4 safety matrix with a deterministic fallback.
  - name: GST Invoicing
    description: Issue GST credit/debit notes against invoices and manage multi-GSTIN registration.
  - name: E-Invoicing (IRN)
    description: Register a GST invoice at the IRP to obtain its IRN + signed QR; read IRN details and cancel within the window.
  - name: ONDC
    description: 'Multi-party settlement for ONDC network orders: create with per-party lines, fulfil, settle post-fulfilment (commission + GST + statutory TCS §52), and cancel.'
  - name: Marketplace
    description: Seller registration and split settlements (TCS/TDS).
  - name: Lending
    description: Working-capital advances — request/accept offers (disburses funds) and apply settlement sweeps to repayment.
  - name: Insurance
    description: Embedded insurance — issue protection policies (collecting premium) and file, approve or reject claims.
  - name: ESG / Carbon
    description: Per-transaction carbon footprint and offsets.
  - name: Escrow
    description: Conditional escrow — hold buyer funds, release (partly) to the seller or refund to the buyer, with event history.
  - name: Cross-Border — Outbound
    description: Outbound/import remittances to foreign vendors via SWIFT, with LRS tracking + 2.5% TCS.
  - name: Cross-Border
    description: Export invoices and inward FX remittances (FIRA).
  - name: Cards
    description: Virtual expense/wallet cards — issue, load funds, spend, freeze/unfreeze/close, and read transaction history.
  - name: BNPL
    description: Buy-Now-Pay-Later installment agreements.
  - name: KYB V-CIP
    description: Video-based Customer Identification Process — schedule and run video-KYC sessions for a merchant's signatory (RBI Master Directions).
  - name: KYB UBO
    description: Ultimate Beneficial Owner registry — natural persons holding > 10% equity (RBI Master Directions).
  - name: KYB
    description: Merchant Know-Your-Business — submit PAN / GSTIN / bank details and query overall verification status.
  - name: Customer KYC
    description: End-customer KYC — Aadhaar-OTP e-KYC (simulated) + PAN verification + consent capture.
  - name: AML
    description: Sanctions/PEP screening, transaction monitoring, mule-account detection, and STR generation/filing with FIU-IND.
  - name: Fraud
    description: Fraud-scoring decision audit — score, verdict, and the Explainable-AI top reasons.
  - name: Messaging
    description: WhatsApp/SMS/email templates and rendered dispatch (queued to qeet-notify via the outbox); delivery callbacks.
  - name: Accounting
    description: Export a period's ledger journal entries + GST invoices to Tally / Zoho Books / SAP Business One / a webhook, and manage connections.
  - name: Webhooks
    description: Register webhook endpoints (event subscriptions + signing secret) and view delivery history.
  - name: Messaging — WhatsApp
    description: Inbound WhatsApp webhook + subscription command bot, and in-chat WhatsApp Pay collections (sandbox rail).
  - name: Merchants
    description: Merchant onboarding (mints an API key + seeds the chart of accounts) and the current-merchant profile.
  - name: Copilot
    description: LLM copilots — treasury & cash-flow, reconciliation, and natural-language query over the merchant's own data. Every answer cites its figures, routes through the AI gateway, and is persisted for audit.
  - name: Agentic Mandates
    description: AI-agent mandates — scoped, capped, revocable authority with a deterministic authorize decision.
  - name: Platform
    description: Resolved request identity — the current merchant plus the Qeet ID JWT subject/roles (null under an API key).
  - name: Analytics
    description: Business metrics — TPV, MRR waterfall, ARR, success rate, and settlement cash-flow forecasting.
  - name: AI
    description: AI gateway decision audit — the trail every AI feature writes through the §6.4 safety matrix.
  - name: Agentic MCP
    description: Model-Context-Protocol tool manifest — the safe tools an AI agent may call.
x-tagGroups:
  - name: Payments
    tags:
      - Orchestration
      - Virtual Accounts
      - Payments
      - Payment Links
      - Offline
      - Mandates
      - Checkout
  - name: Payouts & Money
    tags:
      - Treasury
      - Reconciliation
      - Payroll
      - Payouts
      - Ledger
  - name: Billing
    tags:
      - Billing
      - Revenue Recognition
      - Dunning
  - name: GST & Tax
    tags:
      - TDS / TCS Returns
      - TDS / TCS
      - Input Tax Credit
      - GST Returns
      - GST AI
      - GST Invoicing
      - E-Invoicing (IRN)
  - name: Commerce & Embedded Finance
    tags:
      - ONDC
      - Marketplace
      - Lending
      - Insurance
      - ESG / Carbon
      - Escrow
      - Cross-Border — Outbound
      - Cross-Border
      - Cards
      - BNPL
  - name: Risk & Compliance
    tags:
      - KYB V-CIP
      - KYB UBO
      - KYB
      - Customer KYC
      - AML
      - Fraud
  - name: Platform
    tags:
      - Messaging
      - Accounting
      - Webhooks
      - Messaging — WhatsApp
      - Merchants
      - Copilot
      - Agentic Mandates
      - Platform
      - Analytics
      - AI
      - Agentic MCP
paths:
  /v1/payments/providers/{provider}/cost:
    put:
      tags:
        - Orchestration
      operationId: setCost
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ScorecardView'
  /v1/virtual-accounts:
    get:
      tags:
        - Virtual Accounts
      operationId: list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VirtualAccountView'
    post:
      tags:
        - Virtual Accounts
      operationId: mint
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MintRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/VirtualAccountView'
  /v1/virtual-accounts/{vaId}/credits:
    post:
      tags:
        - Virtual Accounts
      operationId: credit
      parameters:
        - name: vaId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CreditView'
  /v1/virtual-accounts/{vaId}/close:
    post:
      tags:
        - Virtual Accounts
      operationId: close
      parameters:
        - name: vaId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/VirtualAccountView'
  /v1/payments:
    get:
      tags:
        - Payments
      operationId: list_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaymentView'
    post:
      tags:
        - Payments
      operationId: create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PaymentView'
  /v1/payments/{id}/refund:
    post:
      tags:
        - Payments
      operationId: refund
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/payments/{id}/capture:
    post:
      tags:
        - Payments
      operationId: capture
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/payments/razorpay/webhook:
    post:
      tags:
        - Payments
      operationId: handleWebhook
      parameters:
        - name: X-Razorpay-Signature
          in: header
          required: false
          schema:
            type: string
        - name: X-Razorpay-Event-Id
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: OK
  /v1/payment-links:
    get:
      tags:
        - Payment Links
      operationId: list_2
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LinkView'
    post:
      tags:
        - Payment Links
      operationId: create_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLinkRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LinkView'
  /v1/payment-links/{linkId}/cancel:
    post:
      tags:
        - Payment Links
      operationId: cancel
      parameters:
        - name: linkId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LinkView'
  /v1/payment-links/{code}/pay:
    post:
      tags:
        - Payment Links
      operationId: pay
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentLinkPayRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LinkView'
  /v1/offline/upi-lite/wallets:
    get:
      tags:
        - Offline
      operationId: listWallets
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WalletView'
    post:
      tags:
        - Offline
      operationId: createWallet
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWalletRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WalletView'
  /v1/offline/upi-lite/wallets/{walletId}/topup:
    post:
      tags:
        - Offline
      operationId: topUp
      parameters:
        - name: walletId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfflineAmountRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TxnView'
  /v1/offline/upi-lite/wallets/{walletId}/spend:
    post:
      tags:
        - Offline
      operationId: spend
      parameters:
        - name: walletId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfflineAmountRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TxnView'
  /v1/offline/pos/transactions:
    get:
      tags:
        - Offline
      operationId: listTransactions
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PosTxnView'
    post:
      tags:
        - Offline
      operationId: capture_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PosCaptureRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PosTxnView'
  /v1/offline/pos/devices:
    get:
      tags:
        - Offline
      operationId: listDevices
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DeviceView'
    post:
      tags:
        - Offline
      operationId: registerDevice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterDeviceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DeviceView'
  /v1/offline/bharat-qr:
    get:
      tags:
        - Offline
      operationId: listQr
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BharatQrView'
    post:
      tags:
        - Offline
      operationId: generateQr
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BharatQrRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BharatQrView'
  /v1/offline/123pay/intents:
    get:
      tags:
        - Offline
      operationId: listIntents
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/IntentView'
    post:
      tags:
        - Offline
      operationId: createIntent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Intent123Request'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IntentView'
  /v1/offline/123pay/intents/{intentId}/confirm:
    post:
      tags:
        - Offline
      operationId: confirmIntent
      parameters:
        - name: intentId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IntentView'
  /v1/mandates:
    get:
      tags:
        - Mandates
      operationId: list_3
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RecurringMandateView'
    post:
      tags:
        - Mandates
      operationId: create_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMandateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RecurringMandateView'
  /v1/mandates/{id}/revoke:
    post:
      tags:
        - Mandates
      operationId: revoke
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RecurringMandateView'
  /v1/mandates/{id}/pause:
    post:
      tags:
        - Mandates
      operationId: pause
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RecurringMandateView'
  /v1/mandates/{id}/debit:
    post:
      tags:
        - Mandates
      operationId: debit
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DebitRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/mandates/{id}/activate:
    post:
      tags:
        - Mandates
      operationId: activate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RecurringMandateView'
  /v1/checkout/{code}/pay:
    post:
      tags:
        - Checkout
      operationId: pay_1
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutPayRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayResult'
  /v1/virtual-accounts/{vaId}:
    get:
      tags:
        - Virtual Accounts
      operationId: get
      parameters:
        - name: vaId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AccountWithCreditsView'
  /v1/payments/{id}:
    get:
      tags:
        - Payments
      operationId: get_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PaymentView'
  /v1/payments/{id}/refunds:
    get:
      tags:
        - Payments
      operationId: refunds
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RefundView'
  /v1/payments/providers/scorecards:
    get:
      tags:
        - Orchestration
      operationId: scorecards
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScorecardView'
  /v1/payments/providers/routing-explain:
    get:
      tags:
        - Orchestration
      operationId: routingExplain
      parameters:
        - name: candidates
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
        - name: gstin
          in: query
          required: false
          schema:
            type: string
        - name: placeOfSupply
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RoutingExplainView'
  /v1/payment-links/{linkId}:
    get:
      tags:
        - Payment Links
      operationId: get_2
      parameters:
        - name: linkId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LinkView'
  /v1/payment-links/by-code/{code}:
    get:
      tags:
        - Payment Links
      operationId: getByCode
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LinkView'
  /v1/offline/upi-lite/wallets/{walletId}:
    get:
      tags:
        - Offline
      operationId: getWallet
      parameters:
        - name: walletId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WalletWithTxnsView'
  /v1/mandates/{id}:
    get:
      tags:
        - Mandates
      operationId: get_3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RecurringMandateView'
  /v1/mandates/{id}/debits:
    get:
      tags:
        - Mandates
      operationId: debits
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MandateDebitView'
  /v1/checkout/{code}:
    get:
      tags:
        - Checkout
      operationId: get_4
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicView'
  /v1/treasury/sweeps/run:
    post:
      tags:
        - Treasury
      operationId: runSweeps
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SweepRunView'
  /v1/treasury/rules:
    get:
      tags:
        - Treasury
      operationId: listRules
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TreasuryRuleView'
    post:
      tags:
        - Treasury
      operationId: createRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TreasuryCreateRuleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TreasuryRuleView'
  /v1/treasury/rules/{ruleId}/resume:
    post:
      tags:
        - Treasury
      operationId: resumeRule
      parameters:
        - name: ruleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TreasuryRuleView'
  /v1/treasury/rules/{ruleId}/pause:
    post:
      tags:
        - Treasury
      operationId: pauseRule
      parameters:
        - name: ruleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TreasuryRuleView'
  /v1/settlements:
    get:
      tags:
        - Reconciliation
      operationId: payouts_list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SettlementView'
    post:
      tags:
        - Reconciliation
      operationId: ingest
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestSettlementRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/payroll/batches:
    get:
      tags:
        - Payroll
      operationId: payouts_list_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PayrollBatchSummaryView'
    post:
      tags:
        - Payroll
      operationId: payouts_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayrollBatchRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayrollBatchView'
  /v1/payroll/batches/{id}/reject:
    post:
      tags:
        - Payroll
      operationId: reject
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayrollBatchView'
  /v1/payroll/batches/{id}/approve:
    post:
      tags:
        - Payroll
      operationId: approve
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/payouts:
    post:
      tags:
        - Payouts
      operationId: payouts_create_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayoutRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutView'
  /v1/payouts/{id}/reject:
    post:
      tags:
        - Payouts
      operationId: reject_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutView'
  /v1/payouts/{id}/approve:
    post:
      tags:
        - Payouts
      operationId: approve_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/payout-batches:
    get:
      tags:
        - Payouts
      operationId: payouts_list_2
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PayoutBatchSummaryView'
    post:
      tags:
        - Payouts
      operationId: payouts_create_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBatchRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutBatchView'
  /v1/payout-batches/{id}/reject:
    post:
      tags:
        - Payouts
      operationId: reject_2
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutBatchView'
  /v1/payout-batches/{id}/approve:
    post:
      tags:
        - Payouts
      operationId: approve_2
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/payout-batches/csv:
    post:
      tags:
        - Payouts
      operationId: createFromCsv
      parameters:
        - name: currency
          in: query
          required: false
          schema:
            type: string
            default: INR
        - name: description
          in: query
          required: false
          schema:
            type: string
      requestBody:
        content:
          text/csv:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutBatchView'
  /v1/ledger/entries:
    post:
      tags:
        - Ledger
      operationId: postEntry
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostEntryRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/treasury/sweeps:
    get:
      tags:
        - Treasury
      operationId: listSweeps
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SweepExecutionView'
  /v1/treasury/rules/{ruleId}:
    get:
      tags:
        - Treasury
      operationId: getRule
      parameters:
        - name: ruleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TreasuryRuleView'
  /v1/treasury/recommendations:
    get:
      tags:
        - Treasury
      operationId: recommendations
      parameters:
        - name: horizonDays
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 30
        - name: windowDays
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 30
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IdleCashRecommendation'
  /v1/settlements/{id}:
    get:
      tags:
        - Reconciliation
      operationId: payouts_get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SettlementView'
  /v1/payroll/batches/{id}:
    get:
      tags:
        - Payroll
      operationId: payouts_get_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayrollBatchView'
  /v1/payroll/batches/{id}/lines:
    get:
      tags:
        - Payroll
      operationId: lines
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PayrollLineView'
  /v1/payroll/batches/{id}/lines/{lineId}/slip:
    get:
      tags:
        - Payroll
      operationId: slip
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: lineId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SalarySlip'
  /v1/payouts/{id}:
    get:
      tags:
        - Payouts
      operationId: payouts_get_2
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutView'
  /v1/payout-batches/{id}:
    get:
      tags:
        - Payouts
      operationId: payouts_get_3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayoutBatchView'
  /v1/ledger/accounts:
    get:
      tags:
        - Ledger
      operationId: accounts
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LedgerAccountView'
  /v1/ledger/accounts/{id}/balance:
    get:
      tags:
        - Ledger
      operationId: balance
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BalanceView'
  /v1/subscriptions:
    get:
      tags:
        - Billing
      operationId: listSubscriptions
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionView'
    post:
      tags:
        - Billing
      operationId: createSubscription
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionView'
  /v1/subscriptions/{id}/upgrade:
    post:
      tags:
        - Billing
      operationId: upgradeSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradePlanRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/UpgradeView'
  /v1/subscriptions/{id}/resume:
    post:
      tags:
        - Billing
      operationId: resumeSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionView'
  /v1/subscriptions/{id}/pause:
    post:
      tags:
        - Billing
      operationId: pauseSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionView'
  /v1/subscriptions/{id}/downgrade:
    post:
      tags:
        - Billing
      operationId: downgradeSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradePlanRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionView'
  /v1/subscriptions/{id}/cancel:
    post:
      tags:
        - Billing
      operationId: cancelSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: atPeriodEnd
          in: query
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionView'
  /v1/revrec/schedules:
    get:
      tags:
        - Revenue Recognition
      operationId: billing_list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScheduleSummary'
    post:
      tags:
        - Revenue Recognition
      operationId: billing_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScheduleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ScheduleView'
  /v1/revrec/schedules/{scheduleId}/recognize:
    post:
      tags:
        - Revenue Recognition
      operationId: recognize
      parameters:
        - name: scheduleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: asOf
          in: query
          required: false
          schema:
            type: string
            format: date
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ScheduleView'
  /v1/plans:
    get:
      tags:
        - Billing
      operationId: listPlans
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlanView'
    post:
      tags:
        - Billing
      operationId: createPlan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlanRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PlanView'
  /v1/invoices/{id}/pay:
    post:
      tags:
        - Billing
      operationId: payInvoice
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/dunning/subscriptions/{subscriptionId}/trigger-smart:
    post:
      tags:
        - Dunning
      operationId: triggerSmart
      parameters:
        - name: subscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DunningClassifyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AttemptView'
  /v1/dunning/subscriptions/{subscriptionId}/ai-recommend:
    post:
      tags:
        - Dunning
      operationId: aiRecommend
      parameters:
        - name: subscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiRecommendRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AiRecommendView'
  /v1/dunning/rules:
    get:
      tags:
        - Dunning
      operationId: billing_listRules
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DunningRuleView'
    post:
      tags:
        - Dunning
      operationId: billing_createRule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DunningCreateRuleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DunningRuleView'
  /v1/dunning/classify:
    post:
      tags:
        - Dunning
      operationId: classify
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DunningClassifyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ClassificationView'
  /v1/billing/usage:
    post:
      tags:
        - Billing
      operationId: ingestUsage
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsageRequest'
        required: true
      responses:
        '200':
          description: OK
  /v1/subscriptions/{id}:
    get:
      tags:
        - Billing
      operationId: getSubscription
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SubscriptionView'
  /v1/revrec/schedules/{scheduleId}:
    get:
      tags:
        - Revenue Recognition
      operationId: billing_get
      parameters:
        - name: scheduleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ScheduleView'
  /v1/invoices:
    get:
      tags:
        - Billing
      operationId: listInvoices
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BillingInvoiceView'
  /v1/invoices/{id}:
    get:
      tags:
        - Billing
      operationId: getInvoice
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BillingInvoiceView'
  /v1/dunning/subscriptions/{subscriptionId}/attempts:
    get:
      tags:
        - Dunning
      operationId: attempts
      parameters:
        - name: subscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AttemptView'
  /v1/billing/usage/{subscriptionId}:
    get:
      tags:
        - Billing
      operationId: getUsage
      parameters:
        - name: subscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: metricKey
          in: query
          required: true
          schema:
            type: string
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/UsageSummary'
  /v1/tds/returns/{returnId}/file:
    post:
      tags:
        - TDS / TCS Returns
      operationId: file
      parameters:
        - name: returnId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TdsReturnSummary'
  /v1/tds/returns/prepare:
    post:
      tags:
        - TDS / TCS Returns
      operationId: prepare
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TdsPrepareRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TdsReturnView'
  /v1/tds/deductions:
    get:
      tags:
        - TDS / TCS
      operationId: tax_list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DeductionView'
    post:
      tags:
        - TDS / TCS
      operationId: record
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordDeductionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DeductionView'
  /v1/tds/deductions/{deductionId}/certificate:
    post:
      tags:
        - TDS / TCS
      operationId: issueCertificate
      parameters:
        - name: deductionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DeductionView'
  /v1/itc/reconcile:
    post:
      tags:
        - Input Tax Credit
      operationId: reconcile
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReconcileRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ReconSummary'
  /v1/itc/purchases:
    get:
      tags:
        - Input Tax Credit
      operationId: tax_list_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PurchaseView'
    post:
      tags:
        - Input Tax Credit
      operationId: record_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordPurchaseRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PurchaseView'
  /v1/gst/returns/{returnId}/file:
    post:
      tags:
        - GST Returns
      operationId: file_1
      parameters:
        - name: returnId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/FilingReturnSummary'
  /v1/gst/returns/prepare:
    post:
      tags:
        - GST Returns
      operationId: prepare_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilingPrepareRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/FilingReturnView'
  /v1/gst/reg-changes:
    get:
      tags:
        - GST AI
      operationId: listRegChanges
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RegChangeView'
    post:
      tags:
        - GST AI
      operationId: createRegChange
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRegChangeRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RegChangeView'
  /v1/gst/notes/{noteId}/cancel:
    post:
      tags:
        - GST Invoicing
      operationId: cancelNote
      parameters:
        - name: noteId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NoteView'
  /v1/gst/notes/{noteId}/apply:
    post:
      tags:
        - GST Invoicing
      operationId: applyNote
      parameters:
        - name: noteId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NoteView'
  /v1/gst/invoices:
    get:
      tags:
        - GST Invoicing
      operationId: tax_list_2
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GstInvoiceView'
    post:
      tags:
        - GST Invoicing
      operationId: tax_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInvoiceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GstInvoiceView'
  /v1/gst/invoices/{invoiceId}/irn:
    get:
      tags:
        - E-Invoicing (IRN)
      operationId: tax_get
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IrnView'
    post:
      tags:
        - E-Invoicing (IRN)
      operationId: generate
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IrnView'
  /v1/gst/invoices/{invoiceId}/irn/cancel:
    post:
      tags:
        - E-Invoicing (IRN)
      operationId: tax_cancel
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IrnView'
  /v1/gst/invoices/{invoiceId}/debit-note:
    post:
      tags:
        - GST Invoicing
      operationId: debitNote
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoteRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NoteView'
  /v1/gst/invoices/{invoiceId}/credit-note:
    post:
      tags:
        - GST Invoicing
      operationId: creditNote
      parameters:
        - name: invoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NoteRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/NoteView'
  /v1/gst/invoices/{id}/pay:
    post:
      tags:
        - GST Invoicing
      operationId: tax_pay
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
  /v1/gst/gstins:
    get:
      tags:
        - GST Invoicing
      operationId: listGstins
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GstinView'
    post:
      tags:
        - GST Invoicing
      operationId: registerGstin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterGstinRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GstinView'
  /v1/gst/classify:
    post:
      tags:
        - GST AI
      operationId: tax_classify
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GstClassifyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ClassificationResult'
  /v1/tds/summary:
    get:
      tags:
        - TDS / TCS
      operationId: summary
      parameters:
        - name: quarter
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SummaryView'
  /v1/tds/returns:
    get:
      tags:
        - TDS / TCS Returns
      operationId: tax_list_3
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TdsReturnSummary'
  /v1/tds/returns/{returnId}:
    get:
      tags:
        - TDS / TCS Returns
      operationId: tax_get_1
      parameters:
        - name: returnId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TdsReturnView'
  /v1/tds/returns/{returnId}/export:
    get:
      tags:
        - TDS / TCS Returns
      operationId: export
      parameters:
        - name: returnId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
                format: byte
  /v1/tds/deductions/{deductionId}:
    get:
      tags:
        - TDS / TCS
      operationId: tax_get_2
      parameters:
        - name: deductionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DeductionView'
  /v1/itc/purchases/{id}:
    get:
      tags:
        - Input Tax Credit
      operationId: tax_get_3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PurchaseView'
  /v1/itc/eligible-summary:
    get:
      tags:
        - Input Tax Credit
      operationId: eligibleSummary
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EligibleItcSummary'
  /v1/gst/returns:
    get:
      tags:
        - GST Returns
      operationId: list_4
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FilingReturnSummary'
  /v1/gst/returns/{returnId}:
    get:
      tags:
        - GST Returns
      operationId: tax_get_4
      parameters:
        - name: returnId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/FilingReturnView'
  /v1/gst/reg-changes/{id}/impact:
    get:
      tags:
        - GST AI
      operationId: impact
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RegChangeImpactReport'
  /v1/gst/notes:
    get:
      tags:
        - GST Invoicing
      operationId: listNotes
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NoteView'
  /v1/gst/invoices/{id}:
    get:
      tags:
        - GST Invoicing
      operationId: get_5
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GstInvoiceView'
  /v1/ondc/orders:
    get:
      tags:
        - ONDC
      operationId: listOrders
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderSummary'
    post:
      tags:
        - ONDC
      operationId: createOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrderView'
  /v1/ondc/orders/{orderId}/settle:
    post:
      tags:
        - ONDC
      operationId: settle
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrderView'
  /v1/ondc/orders/{orderId}/fulfill:
    post:
      tags:
        - ONDC
      operationId: fulfill
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrderView'
  /v1/ondc/orders/{orderId}/cancel:
    post:
      tags:
        - ONDC
      operationId: commerce_cancel
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrderView'
  /v1/marketplace/splits:
    get:
      tags:
        - Marketplace
      operationId: listSplits
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SplitSummary'
    post:
      tags:
        - Marketplace
      operationId: createSplit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSplitRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SplitView'
  /v1/marketplace/splits/{splitId}/cancel:
    post:
      tags:
        - Marketplace
      operationId: cancelSplit
      parameters:
        - name: splitId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SplitView'
  /v1/marketplace/sellers:
    get:
      tags:
        - Marketplace
      operationId: listSellers
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SellerView'
    post:
      tags:
        - Marketplace
      operationId: registerSeller
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterSellerRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SellerView'
  /v1/marketplace/sellers/{sellerId}/suspend:
    post:
      tags:
        - Marketplace
      operationId: suspend
      parameters:
        - name: sellerId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SellerView'
  /v1/marketplace/sellers/{sellerId}/activate:
    post:
      tags:
        - Marketplace
      operationId: commerce_activate
      parameters:
        - name: sellerId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SellerView'
  /v1/lending/offers:
    get:
      tags:
        - Lending
      operationId: listOffers
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OfferView'
    post:
      tags:
        - Lending
      operationId: requestOffer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OfferRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OfferView'
  /v1/lending/offers/{offerId}/accept:
    post:
      tags:
        - Lending
      operationId: accept
      parameters:
        - name: offerId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LoanView'
  /v1/lending/loans/{loanId}/repayments:
    post:
      tags:
        - Lending
      operationId: applyRepayment
      parameters:
        - name: loanId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepaymentRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LoanView'
  /v1/insurance/policies:
    get:
      tags:
        - Insurance
      operationId: commerce_list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PolicySummary'
    post:
      tags:
        - Insurance
      operationId: issue
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssuePolicyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PolicyView'
  /v1/insurance/policies/{policyId}/claims:
    post:
      tags:
        - Insurance
      operationId: fileClaim
      parameters:
        - name: policyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileClaimRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ClaimView'
  /v1/insurance/policies/{policyId}/cancel:
    post:
      tags:
        - Insurance
      operationId: cancel_1
      parameters:
        - name: policyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PolicyView'
  /v1/insurance/claims/{claimId}/reject:
    post:
      tags:
        - Insurance
      operationId: commerce_reject
      parameters:
        - name: claimId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ClaimView'
  /v1/insurance/claims/{claimId}/approve:
    post:
      tags:
        - Insurance
      operationId: commerce_approve
      parameters:
        - name: claimId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ClaimView'
  /v1/esg/offsets:
    post:
      tags:
        - ESG / Carbon
      operationId: offset
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OffsetRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OffsetView'
  /v1/esg/footprints:
    get:
      tags:
        - ESG / Carbon
      operationId: commerce_list_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RecordView'
    post:
      tags:
        - ESG / Carbon
      operationId: commerce_record
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FootprintRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RecordView'
  /v1/escrow:
    get:
      tags:
        - Escrow
      operationId: commerce_list_2
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EscrowAgreementSummary'
    post:
      tags:
        - Escrow
      operationId: hold
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HoldRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EscrowAgreementView'
  /v1/escrow/{escrowId}/release:
    post:
      tags:
        - Escrow
      operationId: release
      parameters:
        - name: escrowId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MovementRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EscrowAgreementView'
  /v1/escrow/{escrowId}/refund:
    post:
      tags:
        - Escrow
      operationId: commerce_refund
      parameters:
        - name: escrowId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MovementRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EscrowAgreementView'
  /v1/crossborder/outbound:
    get:
      tags:
        - Cross-Border — Outbound
      operationId: commerce_list_3
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OutboundRemittanceView'
    post:
      tags:
        - Cross-Border — Outbound
      operationId: commerce_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRemittanceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OutboundRemittanceView'
  /v1/crossborder/outbound/{remittanceId}/mark-remitted:
    post:
      tags:
        - Cross-Border — Outbound
      operationId: markRemitted
      parameters:
        - name: remittanceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkRemittedRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OutboundRemittanceView'
  /v1/crossborder/outbound/{remittanceId}/mark-failed:
    post:
      tags:
        - Cross-Border — Outbound
      operationId: markFailed
      parameters:
        - name: remittanceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkFailedRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OutboundRemittanceView'
  /v1/crossborder/outbound/quote:
    post:
      tags:
        - Cross-Border — Outbound
      operationId: quote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/QuoteView'
  /v1/crossborder/export-invoices:
    get:
      tags:
        - Cross-Border
      operationId: commerce_list_4
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InvoiceSummary'
    post:
      tags:
        - Cross-Border
      operationId: commerce_create_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExportInvoiceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CrossBorderInvoiceView'
  /v1/crossborder/export-invoices/{exportInvoiceId}/remittances:
    post:
      tags:
        - Cross-Border
      operationId: recordRemittance
      parameters:
        - name: exportInvoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemittanceRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CrossBorderRemittanceView'
  /v1/cards:
    get:
      tags:
        - Cards
      operationId: list_5
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CardSummary'
    post:
      tags:
        - Cards
      operationId: issue_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CardIssueRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/cards/{cardId}/unfreeze:
    post:
      tags:
        - Cards
      operationId: unfreeze
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/cards/{cardId}/spend:
    post:
      tags:
        - Cards
      operationId: commerce_spend
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpendRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/cards/{cardId}/load:
    post:
      tags:
        - Cards
      operationId: load
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CardAmountRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/cards/{cardId}/freeze:
    post:
      tags:
        - Cards
      operationId: freeze
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/cards/{cardId}/close:
    post:
      tags:
        - Cards
      operationId: commerce_close
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/bnpl/agreements:
    get:
      tags:
        - BNPL
      operationId: list_6
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BnplAgreementSummary'
    post:
      tags:
        - BNPL
      operationId: commerce_create_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgreementRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BnplAgreementView'
  /v1/bnpl/agreements/{agreementId}/installments/{seq}/pay:
    post:
      tags:
        - BNPL
      operationId: commerce_pay
      parameters:
        - name: agreementId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: seq
          in: path
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BnplAgreementView'
  /v1/ondc/orders/{orderId}:
    get:
      tags:
        - ONDC
      operationId: getOrder
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OrderView'
  /v1/marketplace/splits/{splitId}:
    get:
      tags:
        - Marketplace
      operationId: getSplit
      parameters:
        - name: splitId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SplitView'
  /v1/lending/loans:
    get:
      tags:
        - Lending
      operationId: listLoans
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LoanSummary'
  /v1/lending/loans/{loanId}:
    get:
      tags:
        - Lending
      operationId: getLoan
      parameters:
        - name: loanId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/LoanView'
  /v1/insurance/policies/{policyId}:
    get:
      tags:
        - Insurance
      operationId: commerce_get
      parameters:
        - name: policyId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PolicyView'
  /v1/esg/summary:
    get:
      tags:
        - ESG / Carbon
      operationId: commerce_summary
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/FootprintSummary'
  /v1/escrow/{escrowId}:
    get:
      tags:
        - Escrow
      operationId: commerce_get_1
      parameters:
        - name: escrowId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EscrowAgreementView'
  /v1/crossborder/outbound/{remittanceId}:
    get:
      tags:
        - Cross-Border — Outbound
      operationId: commerce_get_2
      parameters:
        - name: remittanceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RemittanceDetailView'
  /v1/crossborder/export-invoices/{exportInvoiceId}:
    get:
      tags:
        - Cross-Border
      operationId: commerce_get_3
      parameters:
        - name: exportInvoiceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CrossBorderInvoiceView'
  /v1/cards/{cardId}:
    get:
      tags:
        - Cards
      operationId: commerce_get_4
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CardView'
  /v1/bnpl/agreements/{agreementId}:
    get:
      tags:
        - BNPL
      operationId: commerce_get_5
      parameters:
        - name: agreementId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/BnplAgreementView'
  /v1/merchants/kyb/vcip:
    get:
      tags:
        - KYB V-CIP
      operationId: risk_list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SessionView'
    post:
      tags:
        - KYB V-CIP
      operationId: schedule
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SessionView'
  /v1/merchants/kyb/vcip/{sessionId}/start:
    post:
      tags:
        - KYB V-CIP
      operationId: start
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SessionView'
  /v1/merchants/kyb/vcip/{sessionId}/fail:
    post:
      tags:
        - KYB V-CIP
      operationId: fail
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FailRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SessionView'
  /v1/merchants/kyb/vcip/{sessionId}/complete:
    post:
      tags:
        - KYB V-CIP
      operationId: complete
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SessionView'
  /v1/merchants/kyb/ubo:
    get:
      tags:
        - KYB UBO
      operationId: risk_list_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OwnerView'
    post:
      tags:
        - KYB UBO
      operationId: add
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OwnerView'
  /v1/merchants/kyb/pan:
    post:
      tags:
        - KYB
      operationId: submitPan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KybPanRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KybView'
  /v1/merchants/kyb/gstin:
    post:
      tags:
        - KYB
      operationId: submitGstin
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GstinRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KybView'
  /v1/merchants/kyb/bank:
    post:
      tags:
        - KYB
      operationId: submitBank
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KybView'
  /v1/kyc/customers:
    get:
      tags:
        - Customer KYC
      operationId: risk_list_2
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/KycView'
    post:
      tags:
        - Customer KYC
      operationId: risk_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KycView'
  /v1/kyc/customers/{id}/pan:
    post:
      tags:
        - Customer KYC
      operationId: submitPan_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KycPanRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KycView'
  /v1/kyc/customers/{id}/consent:
    post:
      tags:
        - Customer KYC
      operationId: consent
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsentRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KycView'
  /v1/kyc/customers/{id}/aadhaar/verify:
    post:
      tags:
        - Customer KYC
      operationId: verifyAadhaar
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AadhaarVerifyRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KycView'
  /v1/kyc/customers/{id}/aadhaar/initiate:
    post:
      tags:
        - Customer KYC
      operationId: initiateAadhaar
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AadhaarInitiateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KycView'
  /v1/aml/str-reports:
    get:
      tags:
        - AML
      operationId: strReports
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StrView'
    post:
      tags:
        - AML
      operationId: createStr
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStrRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StrView'
  /v1/aml/screen:
    post:
      tags:
        - AML
      operationId: screen
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScreenRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ScreeningView'
  /v1/aml/mule-scan:
    post:
      tags:
        - AML
      operationId: muleScan
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MuleScanRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MuleView'
  /v1/aml/monitor:
    post:
      tags:
        - AML
      operationId: monitor
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MonitorRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MonitorResult'
  /v1/aml/cases:
    get:
      tags:
        - AML
      operationId: cases
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CaseView'
    post:
      tags:
        - AML
      operationId: createCase
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCaseRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CaseView'
  /v1/aml/cases/{id}/close:
    post:
      tags:
        - AML
      operationId: closeCase
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloseCaseRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CaseView'
  /v1/merchants/kyb/vcip/{sessionId}:
    get:
      tags:
        - KYB V-CIP
      operationId: risk_get
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SessionView'
  /v1/merchants/kyb/ubo/{id}:
    get:
      tags:
        - KYB UBO
      operationId: risk_get_1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/OwnerView'
    delete:
      tags:
        - KYB UBO
      operationId: remove
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
  /v1/merchants/kyb/status:
    get:
      tags:
        - KYB
      operationId: status
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KybView'
  /v1/kyc/customers/{id}:
    get:
      tags:
        - Customer KYC
      operationId: risk_get_2
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/KycView'
  /v1/fraud/decisions:
    get:
      tags:
        - Fraud
      operationId: risk_list_3
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FraudDecisionSummary'
  /v1/fraud/decisions/{id}:
    get:
      tags:
        - Fraud
      operationId: risk_get_3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/FraudDecisionView'
  /v1/aml/alerts:
    get:
      tags:
        - AML
      operationId: alerts
      parameters:
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - OPEN
              - DISMISSED
              - ESCALATED
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertView'
  /v1/messaging/templates:
    get:
      tags:
        - Messaging
      operationId: listTemplates
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TemplateView'
    put:
      tags:
        - Messaging
      operationId: upsertTemplate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/TemplateView'
  /v1/accounting/connections:
    get:
      tags:
        - Accounting
      operationId: listConnections
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConnectionView'
    put:
      tags:
        - Accounting
      operationId: upsertConnection
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ConnectionView'
  /v1/webhooks/endpoints:
    get:
      tags:
        - Webhooks
      operationId: platform_list
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EndpointView'
    post:
      tags:
        - Webhooks
      operationId: register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EndpointView'
  /v1/messaging/whatsapp/pay:
    get:
      tags:
        - Messaging — WhatsApp
      operationId: listPay
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PayCollectionView'
    post:
      tags:
        - Messaging — WhatsApp
      operationId: createPay
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppPayRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayCollectionView'
  /v1/messaging/whatsapp/pay/{id}/confirm:
    post:
      tags:
        - Messaging — WhatsApp
      operationId: confirmPay
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PayCollectionView'
  /v1/messaging/whatsapp/inbound:
    get:
      tags:
        - Messaging — WhatsApp
      operationId: listInbound
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InboundMessageView'
    post:
      tags:
        - Messaging — WhatsApp
      operationId: inbound
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InboundRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/InboundView'
  /v1/messaging/dispatches/{dispatchId}/failed:
    post:
      tags:
        - Messaging
      operationId: failed
      parameters:
        - name: dispatchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FailedRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DispatchView'
  /v1/messaging/dispatches/{dispatchId}/delivered:
    post:
      tags:
        - Messaging
      operationId: delivered
      parameters:
        - name: dispatchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveredRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DispatchView'
  /v1/messaging/dispatch:
    post:
      tags:
        - Messaging
      operationId: dispatch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DispatchRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DispatchView'
  /v1/merchants:
    post:
      tags:
        - Merchants
      operationId: platform_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMerchantRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CreateMerchantResponse'
  /v1/copilot/treasury/ask:
    post:
      tags:
        - Copilot
      operationId: treasuryAsk
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CopilotAnswer'
  /v1/copilot/reconciliation/ask:
    post:
      tags:
        - Copilot
      operationId: reconciliationAsk
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CopilotAnswer'
  /v1/copilot/query:
    post:
      tags:
        - Copilot
      operationId: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AskRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CopilotAnswer'
  /v1/agentic/mandates:
    get:
      tags:
        - Agentic Mandates
      operationId: platform_list_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgentMandateView'
    post:
      tags:
        - Agentic Mandates
      operationId: platform_issue
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentMandateIssueRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AgentMandateView'
  /v1/agentic/mandates/{mandateId}/revoke:
    post:
      tags:
        - Agentic Mandates
      operationId: platform_revoke
      parameters:
        - name: mandateId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeRequest'
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AgentMandateView'
  /v1/agentic/mandates/{mandateId}/authorize:
    post:
      tags:
        - Agentic Mandates
      operationId: authorize
      parameters:
        - name: mandateId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthorizeRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AuthorizationDecision'
  /v1/accounting/exports:
    get:
      tags:
        - Accounting
      operationId: listExports
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExportView'
    post:
      tags:
        - Accounting
      operationId: createExport
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExportRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ExportView'
  /v1/webhooks/endpoints/{id}/deliveries:
    get:
      tags:
        - Webhooks
      operationId: deliveries
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DeliveryView'
  /v1/messaging/dispatches:
    get:
      tags:
        - Messaging
      operationId: listDispatches
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DispatchView'
  /v1/messaging/dispatches/{dispatchId}:
    get:
      tags:
        - Messaging
      operationId: getDispatch
      parameters:
        - name: dispatchId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/DispatchView'
  /v1/merchants/me:
    get:
      tags:
        - Merchants
      operationId: me
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MerchantView'
  /v1/me:
    get:
      tags:
        - Platform
      operationId: me_1
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MeResponse'
  /v1/copilot/conversations:
    get:
      tags:
        - Copilot
      operationId: conversations
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConversationSummary'
  /v1/copilot/conversations/{conversationId}:
    get:
      tags:
        - Copilot
      operationId: conversation
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ConversationView'
  /v1/analytics/tpv:
    get:
      tags:
        - Analytics
      operationId: tpv
      parameters:
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: granularity
          in: query
          required: false
          schema:
            type: string
            default: DAY
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TpvBucket'
  /v1/analytics/success-rate:
    get:
      tags:
        - Analytics
      operationId: successRate
      parameters:
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: method
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SuccessRate'
  /v1/analytics/mrr:
    get:
      tags:
        - Analytics
      operationId: mrr
      parameters:
        - name: from
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MrrWaterfallRow'
  /v1/analytics/compliance-health:
    get:
      tags:
        - Analytics
      operationId: complianceHealth
      parameters:
        - name: windowDays
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 30
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ComplianceHealth'
  /v1/analytics/cash-flow-forecast:
    get:
      tags:
        - Analytics
      operationId: cashFlowForecast
      parameters:
        - name: horizonDays
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 30
        - name: windowDays
          in: query
          required: false
          schema:
            type: integer
            format: int32
            default: 30
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CashFlowForecast'
  /v1/analytics/arr:
    get:
      tags:
        - Analytics
      operationId: arr
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ArrView'
  /v1/ai/health:
    get:
      tags:
        - AI
      operationId: health
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/GatewayHealth'
  /v1/ai/decisions:
    get:
      tags:
        - AI
      operationId: platform_list_2
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AiDecisionSummary'
  /v1/ai/decisions/{decisionId}:
    get:
      tags:
        - AI
      operationId: platform_get
      parameters:
        - name: decisionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AiDecisionView'
  /v1/agentic/mcp/manifest:
    get:
      tags:
        - Agentic MCP
      operationId: manifest
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/McpManifest'
  /v1/agentic/mandates/{mandateId}:
    get:
      tags:
        - Agentic Mandates
      operationId: platform_get_1
      parameters:
        - name: mandateId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/MandateDetail'
  /v1/accounting/exports/{id}:
    get:
      tags:
        - Accounting
      operationId: getExport
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ExportView'
  /v1/accounting/exports/{id}/download:
    get:
      tags:
        - Accounting
      operationId: download
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: string
  /v1/webhooks/endpoints/{id}:
    delete:
      tags:
        - Webhooks
      operationId: disable
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
components:
  schemas:
    CostRequest:
      type: object
      properties:
        costBps:
          type: integer
          format: int32
          maximum: 10000
          minimum: 0
    ScorecardView:
      type: object
      properties:
        provider:
          type: string
        attempts:
          type: integer
          format: int64
        successes:
          type: integer
          format: int64
        failures:
          type: integer
          format: int64
        authRate:
          type: number
          format: double
        consecutiveFailures:
          type: integer
          format: int32
        costBps:
          type: integer
          format: int32
        health:
          type: string
        lastOutcomeAt:
          type: string
          format: date-time
    MintRequest:
      type: object
      properties:
        customerRef:
          type: string
          minLength: 1
      required:
        - customerRef
    VirtualAccountView:
      type: object
      properties:
        id:
          type: string
        customerRef:
          type: string
        vaNumber:
          type: string
        ifsc:
          type: string
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        closedAt:
          type: string
          format: date-time
    CreditRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        utr:
          type: string
          minLength: 1
        payerName:
          type: string
        payerRef:
          type: string
      required:
        - amountMinor
        - currency
        - utr
    CreditView:
      type: object
      properties:
        id:
          type: string
        vaId:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        utr:
          type: string
        payerName:
          type: string
        payerRef:
          type: string
        ledgerEntryId:
          type: string
        creditedAt:
          type: string
          format: date-time
    CreatePaymentRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        method:
          type: string
          enum:
            - UPI
            - CARD
            - NET_BANKING
            - WALLET
        description:
          type: string
        simulateFailure:
          type: boolean
      required:
        - currency
        - method
    PaymentView:
      type: object
      properties:
        id:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        method:
          type: string
        status:
          type: string
        providerPaymentId:
          type: string
        ledgerEntryId:
          type: string
    RefundRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        reason:
          type: string
    CreateLinkRequest:
      type: object
      properties:
        title:
          type: string
          minLength: 1
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        reference:
          type: string
        expiresAt:
          type: string
          format: date-time
      required:
        - currency
        - title
    LinkView:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        title:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        reference:
          type: string
        status:
          type: string
        paymentId:
          type: string
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        paidAt:
          type: string
          format: date-time
    PaymentLinkPayRequest:
      type: object
      properties:
        method:
          type: string
          enum:
            - UPI
            - CARD
            - NET_BANKING
            - WALLET
        amountMinor:
          type: integer
          format: int64
        simulateFailure:
          type: boolean
      required:
        - method
    CreateWalletRequest:
      type: object
      properties:
        customerRef:
          type: string
          minLength: 1
        currency:
          type: string
      required:
        - customerRef
    WalletView:
      type: object
      properties:
        id:
          type: string
        customerRef:
          type: string
        balanceMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        closedAt:
          type: string
          format: date-time
    OfflineAmountRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
      required:
        - amountMinor
    TxnView:
      type: object
      properties:
        id:
          type: string
        walletId:
          type: string
        type:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        ledgerEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
    PosCaptureRequest:
      type: object
      properties:
        deviceId:
          type: string
          format: uuid
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        method:
          type: string
      required:
        - amountMinor
        - deviceId
    PosTxnView:
      type: object
      properties:
        id:
          type: string
        deviceId:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        method:
          type: string
        rrn:
          type: string
        ledgerEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
    RegisterDeviceRequest:
      type: object
      properties:
        label:
          type: string
          minLength: 1
        serialNo:
          type: string
          minLength: 1
      required:
        - label
        - serialNo
    DeviceView:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        serialNo:
          type: string
        status:
          type: string
        createdAt:
          type: string
          format: date-time
    BharatQrRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        merchantName:
          type: string
        reference:
          type: string
    BharatQrView:
      type: object
      properties:
        id:
          type: string
        amountMinor:
          type: integer
          format: int64
        dynamic:
          type: boolean
        currency:
          type: string
        merchantName:
          type: string
        reference:
          type: string
        payload:
          type: string
        createdAt:
          type: string
          format: date-time
    Intent123Request:
      type: object
      properties:
        payerMobile:
          type: string
          minLength: 1
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
      required:
        - amountMinor
        - payerMobile
    IntentView:
      type: object
      properties:
        id:
          type: string
        payerMobile:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        ledgerEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
        confirmedAt:
          type: string
          format: date-time
    CreateMandateRequest:
      type: object
      properties:
        customerRef:
          type: string
          minLength: 1
        type:
          type: string
          enum:
            - UPI_AUTOPAY
            - NACH
        limitMinor:
          type: integer
          format: int64
        currency:
          type: string
        frequency:
          type: string
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
            - YEARLY
            - AS_PRESENTED
        startDate:
          type: string
          format: date
        endDate:
          type: string
          format: date
      required:
        - customerRef
        - frequency
        - startDate
        - type
    RecurringMandateView:
      type: object
      properties:
        id:
          type: string
        customerId:
          type: string
        type:
          type: string
        limitMinor:
          type: integer
          format: int64
        currency:
          type: string
        frequency:
          type: string
        startDate:
          type: string
        endDate:
          type: string
        status:
          type: string
        providerMandateId:
          type: string
    DebitRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        description:
          type: string
    ActivateRequest:
      type: object
      properties:
        providerMandateId:
          type: string
    CheckoutPayRequest:
      type: object
      properties:
        method:
          type: string
          enum:
            - UPI
            - CARD
            - NET_BANKING
            - WALLET
        amountMinor:
          type: integer
          format: int64
        customerName:
          type: string
        customerEmail:
          type: string
      required:
        - method
    PayResult:
      type: object
      properties:
        code:
          type: string
        status:
          type: string
        paid:
          type: boolean
    AccountWithCreditsView:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/VirtualAccountView'
        credits:
          type: array
          items:
            $ref: '#/components/schemas/CreditView'
    RefundView:
      type: object
      properties:
        id:
          type: string
        paymentId:
          type: string
        amountMinor:
          type: integer
          format: int64
        status:
          type: string
        ledgerEntryId:
          type: string
    ComplianceView:
      type: object
      properties:
        gstinPresent:
          type: boolean
        gstinValid:
          type: boolean
        supplierStateCode:
          type: string
        placeOfSupplyStateCode:
          type: string
        supplyType:
          type: string
        igstApplicable:
          type: boolean
        compliant:
          type: boolean
        notes:
          type: array
          items:
            type: string
    RankedProviderView:
      type: object
      properties:
        provider:
          type: string
        predictedAuthRate:
          type: number
          format: double
        costBps:
          type: integer
          format: int32
        health:
          type: string
        score:
          type: number
          format: double
        why:
          type: string
    RoutingExplainView:
      type: object
      properties:
        ranking:
          type: array
          items:
            $ref: '#/components/schemas/RankedProviderView'
        recommendedProvider:
          type: string
        method:
          type: string
        aiAssisted:
          type: boolean
        decisionId:
          type: string
        compliance:
          $ref: '#/components/schemas/ComplianceView'
        explanation:
          type: string
    WalletWithTxnsView:
      type: object
      properties:
        wallet:
          $ref: '#/components/schemas/WalletView'
        txns:
          type: array
          items:
            $ref: '#/components/schemas/TxnView'
    MandateDebitView:
      type: object
      properties:
        id:
          type: string
        mandateId:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        ledgerEntryId:
          type: string
    PublicView:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        merchantName:
          type: string
        expiresAt:
          type: string
          format: date-time
    SweepExecutionView:
      type: object
      properties:
        id:
          type: string
        ruleId:
          type: string
        amountMinor:
          type: integer
          format: int64
        sourceBalanceBeforeMinor:
          type: integer
          format: int64
        ledgerEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
    SweepRunView:
      type: object
      properties:
        evaluated:
          type: integer
          format: int32
        fired:
          type: integer
          format: int32
        totalSweptMinor:
          type: integer
          format: int64
        executions:
          type: array
          items:
            $ref: '#/components/schemas/SweepExecutionView'
    TreasuryCreateRuleRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        sourceAccountCode:
          type: string
          minLength: 1
        targetAccountCode:
          type: string
          minLength: 1
        trigger:
          type: string
          enum:
            - THRESHOLD
            - SCHEDULE
        thresholdMinor:
          type: integer
          format: int64
        schedule:
          type: string
        keepMinor:
          type: integer
          format: int64
      required:
        - name
        - sourceAccountCode
        - targetAccountCode
        - trigger
    TreasuryRuleView:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        sourceAccountCode:
          type: string
        targetAccountCode:
          type: string
        trigger:
          type: string
        thresholdMinor:
          type: integer
          format: int64
        schedule:
          type: string
        keepMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    IngestSettlementRequest:
      type: object
      properties:
        provider:
          type: string
          minLength: 1
        providerSettlementId:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 1
        settledAt:
          type: string
          format: date-time
        reportedNetMinor:
          type: integer
          format: int64
        items:
          type: array
          items:
            $ref: '#/components/schemas/SettlementLineDto'
          minItems: 1
      required:
        - currency
        - items
        - provider
        - providerSettlementId
    SettlementLineDto:
      type: object
      properties:
        paymentId:
          type: string
          format: uuid
        providerPaymentId:
          type: string
        grossMinor:
          type: integer
          format: int64
        feeMinor:
          type: integer
          format: int64
        taxMinor:
          type: integer
          format: int64
    CreatePayrollBatchRequest:
      type: object
      properties:
        currency:
          type: string
          minLength: 1
        period:
          type: string
        description:
          type: string
        lines:
          type: array
          items:
            $ref: '#/components/schemas/PayrollLineDto'
          minItems: 1
      required:
        - currency
        - lines
    PayrollLineDto:
      type: object
      properties:
        employeeRef:
          type: string
          minLength: 1
        employeeName:
          type: string
        rail:
          type: string
          enum:
            - UPI
            - IMPS
            - NEFT
            - RTGS
        destination:
          type: string
          minLength: 1
        accountNumber:
          type: string
        ifsc:
          type: string
        grossMinor:
          type: integer
          format: int64
        pfMinor:
          type: integer
          format: int64
        esiMinor:
          type: integer
          format: int64
        ptMinor:
          type: integer
          format: int64
        tdsMinor:
          type: integer
          format: int64
      required:
        - destination
        - employeeRef
        - rail
    PayrollBatchView:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        period:
          type: string
        status:
          type: string
        lineCount:
          type: integer
          format: int32
        totalGrossMinor:
          type: integer
          format: int64
        totalStatutoryMinor:
          type: integer
          format: int64
        totalNetMinor:
          type: integer
          format: int64
        paidCount:
          type: integer
          format: int32
        failedCount:
          type: integer
          format: int32
        payoutBatchId:
          type: string
        description:
          type: string
        lines:
          type: array
          items:
            $ref: '#/components/schemas/PayrollLineView'
    PayrollLineView:
      type: object
      properties:
        id:
          type: string
        employeeRef:
          type: string
        employeeName:
          type: string
        rail:
          type: string
        destination:
          type: string
        verified:
          type: boolean
        grossMinor:
          type: integer
          format: int64
        pfMinor:
          type: integer
          format: int64
        esiMinor:
          type: integer
          format: int64
        ptMinor:
          type: integer
          format: int64
        tdsMinor:
          type: integer
          format: int64
        statutoryMinor:
          type: integer
          format: int64
        netPayMinor:
          type: integer
          format: int64
        status:
          type: string
        payoutId:
          type: string
        ledgerEntryId:
          type: string
        failureReason:
          type: string
    CreatePayoutRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        rail:
          type: string
          enum:
            - UPI
            - IMPS
            - NEFT
            - RTGS
        destination:
          type: string
          minLength: 1
        description:
          type: string
      required:
        - currency
        - destination
        - rail
    PayoutView:
      type: object
      properties:
        id:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        rail:
          type: string
        status:
          type: string
        ledgerEntryId:
          type: string
    CreateBatchRequest:
      type: object
      properties:
        currency:
          type: string
          minLength: 1
        description:
          type: string
        payouts:
          type: array
          items:
            $ref: '#/components/schemas/PayoutLineDto'
          minItems: 1
      required:
        - currency
        - payouts
    PayoutLineDto:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        rail:
          type: string
          enum:
            - UPI
            - IMPS
            - NEFT
            - RTGS
        destination:
          type: string
          minLength: 1
        description:
          type: string
      required:
        - destination
        - rail
    PayoutBatchView:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        status:
          type: string
        totalCount:
          type: integer
          format: int32
        totalAmountMinor:
          type: integer
          format: int64
        paidCount:
          type: integer
          format: int32
        failedCount:
          type: integer
          format: int32
        description:
          type: string
        payouts:
          type: array
          items:
            $ref: '#/components/schemas/PayoutLineView'
    PayoutLineView:
      type: object
      properties:
        id:
          type: string
        amountMinor:
          type: integer
          format: int64
        rail:
          type: string
        destination:
          type: string
        status:
          type: string
        ledgerEntryId:
          type: string
    LedgerLineDto:
      type: object
      properties:
        accountId:
          type: string
          format: uuid
        direction:
          type: string
          enum:
            - DEBIT
            - CREDIT
        amountMinor:
          type: integer
          format: int64
      required:
        - accountId
        - direction
    PostEntryRequest:
      type: object
      properties:
        description:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 1
        lines:
          type: array
          items:
            $ref: '#/components/schemas/LedgerLineDto'
          minItems: 1
      required:
        - currency
        - description
        - lines
    IdleCashRecommendation:
      type: object
      properties:
        settlementBalanceMinor:
          type: integer
          format: int64
        suggestedBufferMinor:
          type: integer
          format: int64
        idleCashMinor:
          type: integer
          format: int64
        avgDailyNetMinor:
          type: integer
          format: int64
        projectedEndBalanceMinor:
          type: integer
          format: int64
        horizonDays:
          type: integer
          format: int32
        recommendation:
          type: string
    DiscrepancyView:
      type: object
      properties:
        type:
          type: string
        paymentId:
          type: string
        providerPaymentId:
          type: string
        expectedMinor:
          type: integer
          format: int64
        reportedMinor:
          type: integer
          format: int64
        detail:
          type: string
    ReconciliationView:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
        matchedCount:
          type: integer
          format: int32
        discrepancyCount:
          type: integer
          format: int32
        discrepancies:
          type: array
          items:
            $ref: '#/components/schemas/DiscrepancyView'
    SettlementView:
      type: object
      properties:
        id:
          type: string
        provider:
          type: string
        providerSettlementId:
          type: string
        currency:
          type: string
        grossAmountMinor:
          type: integer
          format: int64
        feeAmountMinor:
          type: integer
          format: int64
        taxAmountMinor:
          type: integer
          format: int64
        netAmountMinor:
          type: integer
          format: int64
        itemCount:
          type: integer
          format: int32
        status:
          type: string
        ledgerEntryId:
          type: string
        reconciliation:
          $ref: '#/components/schemas/ReconciliationView'
    PayrollBatchSummaryView:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        period:
          type: string
        status:
          type: string
        lineCount:
          type: integer
          format: int32
        totalGrossMinor:
          type: integer
          format: int64
        totalNetMinor:
          type: integer
          format: int64
        paidCount:
          type: integer
          format: int32
        failedCount:
          type: integer
          format: int32
        description:
          type: string
    SalarySlip:
      type: object
      properties:
        lineId:
          type: string
        batchId:
          type: string
        employeeRef:
          type: string
        employeeName:
          type: string
        period:
          type: string
        currency:
          type: string
        grossMinor:
          type: integer
          format: int64
        pfMinor:
          type: integer
          format: int64
        esiMinor:
          type: integer
          format: int64
        ptMinor:
          type: integer
          format: int64
        tdsMinor:
          type: integer
          format: int64
        statutoryMinor:
          type: integer
          format: int64
        netPayMinor:
          type: integer
          format: int64
        status:
          type: string
        payoutRef:
          type: string
        ledgerEntryId:
          type: string
    PayoutBatchSummaryView:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        status:
          type: string
        totalCount:
          type: integer
          format: int32
        totalAmountMinor:
          type: integer
          format: int64
        paidCount:
          type: integer
          format: int32
        failedCount:
          type: integer
          format: int32
        description:
          type: string
    LedgerAccountView:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        type:
          type: string
        currency:
          type: string
    BalanceView:
      type: object
      properties:
        accountId:
          type: string
        balanceMinor:
          type: integer
          format: int64
    CreateSubscriptionRequest:
      type: object
      properties:
        planId:
          type: string
          format: uuid
        customerRef:
          type: string
          minLength: 1
      required:
        - customerRef
        - planId
    SubscriptionView:
      type: object
      properties:
        id:
          type: string
        planId:
          type: string
        status:
          type: string
        firstInvoiceId:
          type: string
        cancelAtPeriodEnd:
          type: boolean
    UpgradePlanRequest:
      type: object
      properties:
        newPlanId:
          type: string
          format: uuid
      required:
        - newPlanId
    UpgradeView:
      type: object
      properties:
        subscriptionId:
          type: string
        newPlanId:
          type: string
        prorationMinor:
          type: integer
          format: int64
        prorationInvoiceId:
          type: string
    CreateScheduleRequest:
      type: object
      properties:
        sourceType:
          type: string
          minLength: 1
        sourceRef:
          type: string
        totalMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        method:
          type: string
          enum:
            - STRAIGHT_LINE
            - IMMEDIATE
        start:
          type: string
          format: date
        periods:
          type: integer
          format: int32
      required:
        - currency
        - sourceType
        - totalMinor
    EntryView:
      type: object
      properties:
        id:
          type: string
        seq:
          type: integer
          format: int32
        periodStart:
          type: string
          format: date
        periodEnd:
          type: string
          format: date
        amountMinor:
          type: integer
          format: int64
        status:
          type: string
        ledgerEntryId:
          type: string
        recognizedAt:
          type: string
          format: date-time
    ScheduleSummary:
      type: object
      properties:
        id:
          type: string
        sourceType:
          type: string
        sourceRef:
          type: string
        currency:
          type: string
        totalMinor:
          type: integer
          format: int64
        recognizedMinor:
          type: integer
          format: int64
        method:
          type: string
        status:
          type: string
        periodStart:
          type: string
          format: date
        periodEnd:
          type: string
          format: date
        createdAt:
          type: string
          format: date-time
    ScheduleView:
      type: object
      properties:
        schedule:
          $ref: '#/components/schemas/ScheduleSummary'
        deferralEntryId:
          type: string
        entries:
          type: array
          items:
            $ref: '#/components/schemas/EntryView'
    CreatePlanRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        interval:
          type: string
          enum:
            - MONTH
            - YEAR
        pricingModel:
          type: string
          enum:
            - FLAT
            - PER_UNIT
            - TIERED
            - VOLUME
            - HYBRID
        tiers:
          type: string
        usageMetricKey:
          type: string
        trialDays:
          type: integer
          format: int32
      required:
        - code
        - currency
        - interval
        - name
    PlanView:
      type: object
      properties:
        id:
          type: string
        code:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        interval:
          type: string
        pricingModel:
          type: string
        trialDays:
          type: integer
          format: int32
    DunningClassifyRequest:
      type: object
      properties:
        failureCode:
          type: string
          minLength: 1
      required:
        - failureCode
    AttemptView:
      type: object
      properties:
        id:
          type: string
        subscriptionId:
          type: string
        attemptNumber:
          type: integer
          format: int32
        scheduledAt:
          type: string
          format: date-time
        attemptedAt:
          type: string
          format: date-time
        result:
          type: string
        failureReason:
          type: string
        failureCategory:
          type: string
        recommendedDelayHours:
          type: integer
          format: int32
        recommendedChannels:
          type: string
        classificationRationale:
          type: string
    AiRecommendRequest:
      type: object
      properties:
        failureCode:
          type: string
          minLength: 1
        daysUntilPayday:
          type: integer
          format: int32
        engagementScore:
          type: number
          format: double
        preferredChannel:
          type: string
        preferredLanguage:
          type: string
        customerContactHint:
          type: string
      required:
        - failureCode
    AiRecommendView:
      type: object
      properties:
        subscriptionId:
          type: string
        category:
          type: string
        retryable:
          type: boolean
        recommendedDelayHours:
          type: integer
          format: int32
        channelOrder:
          type: array
          items:
            type: string
        messageTone:
          type: string
        reasons:
          type: array
          items:
            type: string
        aiAssisted:
          type: boolean
        decisionId:
          type: string
    DunningCreateRuleRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        failureCodePattern:
          type: string
        retryIntervalHours:
          type: integer
          format: int32
          minimum: 1
        maxAttempts:
          type: integer
          format: int32
          minimum: 1
        notifyChannels:
          type: string
      required:
        - name
    DunningRuleView:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        failureCodePattern:
          type: string
        retryIntervalHours:
          type: integer
          format: int32
        maxAttempts:
          type: integer
          format: int32
        notifyChannels:
          type: string
        active:
          type: boolean
    ClassificationView:
      type: object
      properties:
        category:
          type: string
        retryable:
          type: boolean
        recommendedDelayHours:
          type: integer
          format: int32
        recommendedChannels:
          type: string
        rationale:
          type: string
    UsageRequest:
      type: object
      properties:
        subscriptionId:
          type: string
          format: uuid
        metricKey:
          type: string
          minLength: 1
        quantity:
          type: integer
          format: int64
      required:
        - metricKey
        - subscriptionId
    BillingInvoiceView:
      type: object
      properties:
        id:
          type: string
        subscriptionId:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        ledgerEntryId:
          type: string
    UsageSummary:
      type: object
      properties:
        subscriptionId:
          type: string
        metricKey:
          type: string
        totalQuantity:
          type: integer
          format: int64
        from:
          type: string
        to:
          type: string
    TdsReturnSummary:
      type: object
      properties:
        id:
          type: string
        form:
          type: string
        fy:
          type: string
        quarter:
          type: string
        status:
          type: string
        deducteeCount:
          type: integer
          format: int32
        deductionCount:
          type: integer
          format: int32
        totalGrossMinor:
          type: integer
          format: int64
        totalTaxMinor:
          type: integer
          format: int64
        bsrCode:
          type: string
        challanNo:
          type: string
        challanDate:
          type: string
          format: date
        ackToken:
          type: string
        preparedAt:
          type: string
          format: date-time
        filedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    TdsPrepareRequest:
      type: object
      properties:
        form:
          type: string
          enum:
            - FORM_24Q
            - FORM_26Q
            - FORM_27EQ
        quarter:
          type: string
          minLength: 1
      required:
        - quarter
    TdsReturnLineView:
      type: object
      properties:
        deducteeName:
          type: string
        deducteePan:
          type: string
        section:
          type: string
        grossMinor:
          type: integer
          format: int64
        rateBps:
          type: integer
          format: int32
        taxMinor:
          type: integer
          format: int64
        deductedOn:
          type: string
          format: date
        transactionRef:
          type: string
    TdsReturnView:
      type: object
      properties:
        ret:
          $ref: '#/components/schemas/TdsReturnSummary'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/TdsReturnLineView'
    RecordDeductionRequest:
      type: object
      properties:
        kind:
          type: string
          enum:
            - TDS
            - TCS
        section:
          type: string
          minLength: 1
        deducteeName:
          type: string
          minLength: 1
        deducteePan:
          type: string
        grossMinor:
          type: integer
          format: int64
        rateBps:
          type: integer
          format: int32
        transactionRef:
          type: string
        deductedOn:
          type: string
          format: date
      required:
        - deductedOn
        - deducteeName
        - grossMinor
        - kind
        - rateBps
        - section
    DeductionView:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
        section:
          type: string
        deducteeName:
          type: string
        deducteePan:
          type: string
        grossMinor:
          type: integer
          format: int64
        rateBps:
          type: integer
          format: int32
        taxMinor:
          type: integer
          format: int64
        transactionRef:
          type: string
        deductedOn:
          type: string
          format: date
        quarter:
          type: string
        certificateNo:
          type: string
        createdAt:
          type: string
          format: date-time
    Gstr2bLine:
      type: object
      properties:
        supplierGstin:
          type: string
        invoiceNumber:
          type: string
        totalGstMinor:
          type: integer
          format: int64
    ReconcileRequest:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/Gstr2bLine'
      required:
        - lines
    ReconSummary:
      type: object
      properties:
        matched:
          type: integer
          format: int32
        mismatched:
          type: integer
          format: int32
        missingIn2b:
          type: integer
          format: int32
    RecordPurchaseRequest:
      type: object
      properties:
        supplierGstin:
          type: string
          minLength: 1
        supplierName:
          type: string
          minLength: 1
        invoiceNumber:
          type: string
          minLength: 1
        invoiceDate:
          type: string
          format: date
        taxableMinor:
          type: integer
          format: int64
        cgstMinor:
          type: integer
          format: int64
        sgstMinor:
          type: integer
          format: int64
        igstMinor:
          type: integer
          format: int64
        itcEligible:
          type: boolean
      required:
        - invoiceDate
        - invoiceNumber
        - supplierGstin
        - supplierName
    PurchaseView:
      type: object
      properties:
        id:
          type: string
        supplierGstin:
          type: string
        supplierName:
          type: string
        invoiceNumber:
          type: string
        invoiceDate:
          type: string
          format: date
        taxableMinor:
          type: integer
          format: int64
        cgstMinor:
          type: integer
          format: int64
        sgstMinor:
          type: integer
          format: int64
        igstMinor:
          type: integer
          format: int64
        totalGstMinor:
          type: integer
          format: int64
        itcEligible:
          type: boolean
        reconStatus:
          type: string
        createdAt:
          type: string
          format: date-time
        reconciledAt:
          type: string
          format: date-time
    FilingReturnSummary:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        period:
          type: string
        status:
          type: string
        invoiceCount:
          type: integer
          format: int32
        totalTaxableMinor:
          type: integer
          format: int64
        totalCgstMinor:
          type: integer
          format: int64
        totalSgstMinor:
          type: integer
          format: int64
        totalIgstMinor:
          type: integer
          format: int64
        totalTaxMinor:
          type: integer
          format: int64
        arn:
          type: string
        preparedAt:
          type: string
          format: date-time
        filedAt:
          type: string
          format: date-time
    FilingPrepareRequest:
      type: object
      properties:
        type:
          type: string
          enum:
            - GSTR1
            - GSTR3B
        period:
          type: string
          minLength: 1
      required:
        - period
    FilingReturnLineView:
      type: object
      properties:
        invoiceNumber:
          type: string
        buyerGstin:
          type: string
        placeOfSupply:
          type: string
        supplyType:
          type: string
        taxableMinor:
          type: integer
          format: int64
        cgstMinor:
          type: integer
          format: int64
        sgstMinor:
          type: integer
          format: int64
        igstMinor:
          type: integer
          format: int64
    FilingReturnView:
      type: object
      properties:
        ret:
          $ref: '#/components/schemas/FilingReturnSummary'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/FilingReturnLineView'
    CreateRegChangeRequest:
      type: object
      properties:
        hsnSac:
          type: string
          minLength: 1
        changeType:
          type: string
          enum:
            - RATE_CHANGE
        oldRatePct:
          type: integer
          format: int32
        newRatePct:
          type: integer
          format: int32
        effectiveDate:
          type: string
          format: date
        title:
          type: string
          minLength: 1
        source:
          type: string
      required:
        - effectiveDate
        - hsnSac
        - newRatePct
        - title
    RegChangeView:
      type: object
      properties:
        id:
          type: string
        hsnSac:
          type: string
        changeType:
          type: string
        oldRatePct:
          type: integer
          format: int32
        newRatePct:
          type: integer
          format: int32
        effectiveDate:
          type: string
          format: date
        title:
          type: string
        source:
          type: string
        announcedAt:
          type: string
          format: date-time
    NoteView:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        originalInvoiceId:
          type: string
        reason:
          type: string
        taxableMinor:
          type: integer
          format: int64
        totalMinor:
          type: integer
          format: int64
        status:
          type: string
        ledgerEntryId:
          type: string
        issuedAt:
          type: string
          format: date-time
    CreateInvoiceRequest:
      type: object
      properties:
        supplierGstin:
          type: string
          minLength: 1
        buyerGstin:
          type: string
        placeOfSupply:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 1
        lines:
          type: array
          items:
            $ref: '#/components/schemas/GstInvoiceLineDto'
          minItems: 1
      required:
        - currency
        - lines
        - placeOfSupply
        - supplierGstin
    GstInvoiceLineDto:
      type: object
      properties:
        description:
          type: string
          minLength: 1
        hsnSac:
          type: string
          minLength: 1
        quantity:
          type: integer
          format: int64
        unitPriceMinor:
          type: integer
          format: int64
        gstRate:
          type: integer
          format: int32
          minimum: 0
      required:
        - description
        - hsnSac
    GstInvoiceView:
      type: object
      properties:
        id:
          type: string
        invoiceNumber:
          type: string
        supplyType:
          type: string
        status:
          type: string
        taxableMinor:
          type: integer
          format: int64
        cgstMinor:
          type: integer
          format: int64
        sgstMinor:
          type: integer
          format: int64
        igstMinor:
          type: integer
          format: int64
        totalGstMinor:
          type: integer
          format: int64
        totalMinor:
          type: integer
          format: int64
        ledgerEntryId:
          type: string
        lines:
          type: array
          items:
            $ref: '#/components/schemas/LineView'
    LineView:
      type: object
      properties:
        description:
          type: string
        hsnSac:
          type: string
        taxableMinor:
          type: integer
          format: int64
        cgstMinor:
          type: integer
          format: int64
        sgstMinor:
          type: integer
          format: int64
        igstMinor:
          type: integer
          format: int64
        lineTotalMinor:
          type: integer
          format: int64
    IrnView:
      type: object
      properties:
        invoiceId:
          type: string
        invoiceNumber:
          type: string
        irnStatus:
          type: string
        irn:
          type: string
        ackNo:
          type: string
        ackDate:
          type: string
          format: date-time
        signedQrCode:
          type: string
        generatedAt:
          type: string
          format: date-time
        cancelledAt:
          type: string
          format: date-time
        cancelReason:
          type: string
    CancelRequest:
      type: object
      properties:
        reason:
          type: string
          minLength: 1
      required:
        - reason
    NoteRequest:
      type: object
      properties:
        reason:
          type: string
          minLength: 1
        taxableMinor:
          type: integer
          format: int64
        cgstMinor:
          type: integer
          format: int64
        sgstMinor:
          type: integer
          format: int64
        igstMinor:
          type: integer
          format: int64
      required:
        - reason
    RegisterGstinRequest:
      type: object
      properties:
        gstin:
          type: string
          minLength: 1
        legalName:
          type: string
          minLength: 1
        stateCode:
          type: string
          minLength: 1
        isDefault:
          type: boolean
      required:
        - gstin
        - legalName
        - stateCode
    GstinView:
      type: object
      properties:
        id:
          type: string
        gstin:
          type: string
        legalName:
          type: string
        stateCode:
          type: string
        isDefault:
          type: boolean
    GstClassifyRequest:
      type: object
      properties:
        description:
          type: string
          minLength: 1
      required:
        - description
    ClassificationResult:
      type: object
      properties:
        decisionId:
          type: string
        model:
          type: string
        source:
          type: string
        fellBack:
          type: boolean
        requiresReview:
          type: boolean
        confidence:
          type: number
          format: double
        explanation:
          type: string
        suggestions:
          type: array
          items:
            $ref: '#/components/schemas/HsnSuggestion'
    HsnSuggestion:
      type: object
      properties:
        hsnSac:
          type: string
        kind:
          type: string
        gstRate:
          type: integer
          format: int32
        confidence:
          type: number
          format: double
        label:
          type: string
    SummaryView:
      type: object
      properties:
        quarter:
          type: string
        count:
          type: integer
          format: int32
        totalGrossMinor:
          type: integer
          format: int64
        totalTaxMinor:
          type: integer
          format: int64
        taxBySection:
          type: object
          additionalProperties:
            type: integer
            format: int64
    EligibleItcSummary:
      type: object
      properties:
        eligibleInvoiceCount:
          type: integer
          format: int32
        eligibleItcMinor:
          type: integer
          format: int64
    InvoiceImpact:
      type: object
      properties:
        invoiceId:
          type: string
        invoiceNumber:
          type: string
        taxableMinor:
          type: integer
          format: int64
        currentGstMinor:
          type: integer
          format: int64
        forecastGstMinor:
          type: integer
          format: int64
        deltaGstMinor:
          type: integer
          format: int64
    RegChangeImpactReport:
      type: object
      properties:
        changeId:
          type: string
        hsnSac:
          type: string
        oldRatePct:
          type: integer
          format: int32
        newRatePct:
          type: integer
          format: int32
        effectiveDate:
          type: string
          format: date
        forecast:
          type: boolean
        confidence:
          type: number
          format: double
        disclaimer:
          type: string
        affectedInvoiceCount:
          type: integer
          format: int32
        affectedLineCount:
          type: integer
          format: int32
        totalTaxableMinor:
          type: integer
          format: int64
        currentGstMinor:
          type: integer
          format: int64
        forecastGstMinor:
          type: integer
          format: int64
        deltaGstMinor:
          type: integer
          format: int64
        decisionId:
          type: string
        invoices:
          type: array
          items:
            $ref: '#/components/schemas/InvoiceImpact'
    CreateOrderRequest:
      type: object
      properties:
        networkOrderId:
          type: string
          minLength: 1
        buyerApp:
          type: string
          minLength: 1
        sellerApp:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 1
        lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineRequest'
          minItems: 1
      required:
        - buyerApp
        - currency
        - lines
        - networkOrderId
        - sellerApp
    OrderLineRequest:
      type: object
      properties:
        partyRef:
          type: string
          minLength: 1
        role:
          type: string
        grossMinor:
          type: integer
          format: int64
        commissionBps:
          type: integer
          format: int32
        commissionGstRate:
          type: integer
          format: int32
        tcsBps:
          type: integer
          format: int32
      required:
        - grossMinor
        - partyRef
    OrderLineView:
      type: object
      properties:
        partyRef:
          type: string
        role:
          type: string
        grossMinor:
          type: integer
          format: int64
        commissionMinor:
          type: integer
          format: int64
        commissionGstMinor:
          type: integer
          format: int64
        tcsMinor:
          type: integer
          format: int64
        netMinor:
          type: integer
          format: int64
    OrderSummary:
      type: object
      properties:
        id:
          type: string
        networkOrderId:
          type: string
        buyerApp:
          type: string
        sellerApp:
          type: string
        currency:
          type: string
        grossMinor:
          type: integer
          format: int64
        commissionMinor:
          type: integer
          format: int64
        commissionGstMinor:
          type: integer
          format: int64
        tcsMinor:
          type: integer
          format: int64
        partyNetMinor:
          type: integer
          format: int64
        partyCount:
          type: integer
          format: int32
        status:
          type: string
        holdEntryId:
          type: string
        settleEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
    OrderView:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/OrderSummary'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineView'
    CreateSplitRequest:
      type: object
      properties:
        paymentId:
          type: string
          format: uuid
        sourceRef:
          type: string
        currency:
          type: string
          minLength: 1
        lines:
          type: array
          items:
            $ref: '#/components/schemas/SplitLineRequest'
          minItems: 1
      required:
        - currency
        - lines
    SplitLineRequest:
      type: object
      properties:
        sellerRef:
          type: string
          minLength: 1
        grossMinor:
          type: integer
          format: int64
        commissionBps:
          type: integer
          format: int32
        commissionGstRate:
          type: integer
          format: int32
        tcsBps:
          type: integer
          format: int32
        tdsBps:
          type: integer
          format: int32
      required:
        - grossMinor
        - sellerRef
    SplitItemView:
      type: object
      properties:
        sellerRef:
          type: string
        grossMinor:
          type: integer
          format: int64
        commissionMinor:
          type: integer
          format: int64
        commissionGstMinor:
          type: integer
          format: int64
        tcsMinor:
          type: integer
          format: int64
        tdsMinor:
          type: integer
          format: int64
        netMinor:
          type: integer
          format: int64
    SplitSummary:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        grossMinor:
          type: integer
          format: int64
        commissionMinor:
          type: integer
          format: int64
        commissionGstMinor:
          type: integer
          format: int64
        tcsMinor:
          type: integer
          format: int64
        tdsMinor:
          type: integer
          format: int64
        sellerNetMinor:
          type: integer
          format: int64
        itemCount:
          type: integer
          format: int32
        status:
          type: string
        ledgerEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
    SplitView:
      type: object
      properties:
        split:
          $ref: '#/components/schemas/SplitSummary'
        items:
          type: array
          items:
            $ref: '#/components/schemas/SplitItemView'
    RegisterSellerRequest:
      type: object
      properties:
        sellerRef:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
        gstin:
          type: string
        pan:
          type: string
        commissionBps:
          type: integer
          format: int32
      required:
        - name
        - sellerRef
    SellerView:
      type: object
      properties:
        id:
          type: string
        sellerRef:
          type: string
        name:
          type: string
        gstin:
          type: string
        pan:
          type: string
        commissionBps:
          type: integer
          format: int32
        status:
          type: string
        createdAt:
          type: string
          format: date-time
    OfferRequest:
      type: object
      properties:
        currency:
          type: string
          minLength: 1
        avgMonthlyVolumeMinor:
          type: integer
          format: int64
      required:
        - avgMonthlyVolumeMinor
        - currency
    OfferView:
      type: object
      properties:
        id:
          type: string
        currency:
          type: string
        principalMinor:
          type: integer
          format: int64
        feeBps:
          type: integer
          format: int32
        feeMinor:
          type: integer
          format: int64
        totalRepayableMinor:
          type: integer
          format: int64
        repaymentPercentBps:
          type: integer
          format: int32
        status:
          type: string
        expiresAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    LoanSummary:
      type: object
      properties:
        id:
          type: string
        offerId:
          type: string
        currency:
          type: string
        principalMinor:
          type: integer
          format: int64
        feeMinor:
          type: integer
          format: int64
        totalRepayableMinor:
          type: integer
          format: int64
        outstandingMinor:
          type: integer
          format: int64
        repaymentPercentBps:
          type: integer
          format: int32
        status:
          type: string
        disbursedEntryId:
          type: string
        disbursedAt:
          type: string
          format: date-time
        repaidAt:
          type: string
          format: date-time
    LoanView:
      type: object
      properties:
        loan:
          $ref: '#/components/schemas/LoanSummary'
        repayments:
          type: array
          items:
            $ref: '#/components/schemas/RepaymentView'
    RepaymentView:
      type: object
      properties:
        settlementAmountMinor:
          type: integer
          format: int64
        sweptMinor:
          type: integer
          format: int64
        ledgerEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
    RepaymentRequest:
      type: object
      properties:
        settlementAmountMinor:
          type: integer
          format: int64
        sourceRef:
          type: string
      required:
        - settlementAmountMinor
    IssuePolicyRequest:
      type: object
      properties:
        product:
          type: string
          enum:
            - PAYMENT_PROTECTION
            - FRAUD_COVER
            - SUBSCRIPTION_INTERRUPTION
        holderRef:
          type: string
          minLength: 1
        premiumMinor:
          type: integer
          format: int64
        coverAmountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
      required:
        - coverAmountMinor
        - currency
        - holderRef
        - premiumMinor
        - product
    ClaimView:
      type: object
      properties:
        id:
          type: string
        policyId:
          type: string
        amountMinor:
          type: integer
          format: int64
        reason:
          type: string
        status:
          type: string
        payoutEntryId:
          type: string
        createdAt:
          type: string
          format: date-time
        decidedAt:
          type: string
          format: date-time
    PolicySummary:
      type: object
      properties:
        id:
          type: string
        product:
          type: string
        holderRef:
          type: string
        currency:
          type: string
        premiumMinor:
          type: integer
          format: int64
        coverAmountMinor:
          type: integer
          format: int64
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        cancelledAt:
          type: string
          format: date-time
    PolicyView:
      type: object
      properties:
        policy:
          $ref: '#/components/schemas/PolicySummary'
        claims:
          type: array
          items:
            $ref: '#/components/schemas/ClaimView'
    FileClaimRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        reason:
          type: string
      required:
        - amountMinor
    RejectRequest:
      type: object
      properties:
        note:
          type: string
    OffsetRequest:
      type: object
      properties:
        gramsToOffset:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        pricePerTonneMinor:
          type: integer
          format: int64
      required:
        - currency
        - gramsToOffset
        - pricePerTonneMinor
    OffsetView:
      type: object
      properties:
        id:
          type: string
        gramsCo2Offset:
          type: integer
          format: int64
        costMinor:
          type: integer
          format: int64
        currency:
          type: string
        ledgerEntryId:
          type: string
        note:
          type: string
        createdAt:
          type: string
          format: date-time
    FootprintRequest:
      type: object
      properties:
        transactionRef:
          type: string
          minLength: 1
        method:
          type: string
          enum:
            - UPI
            - CARD
            - NET_BANKING
            - WALLET
        amountMinor:
          type: integer
          format: int64
      required:
        - amountMinor
        - method
        - transactionRef
    RecordView:
      type: object
      properties:
        id:
          type: string
        transactionRef:
          type: string
        method:
          type: string
        amountMinor:
          type: integer
          format: int64
        gramsCo2:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
    HoldRequest:
      type: object
      properties:
        buyerRef:
          type: string
          minLength: 1
        sellerRef:
          type: string
          minLength: 1
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        description:
          type: string
      required:
        - amountMinor
        - buyerRef
        - currency
        - sellerRef
    EscrowAgreementSummary:
      type: object
      properties:
        id:
          type: string
        buyerRef:
          type: string
        sellerRef:
          type: string
        currency:
          type: string
        amountMinor:
          type: integer
          format: int64
        releasedMinor:
          type: integer
          format: int64
        refundedMinor:
          type: integer
          format: int64
        remainingMinor:
          type: integer
          format: int64
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        closedAt:
          type: string
          format: date-time
    EscrowAgreementView:
      type: object
      properties:
        escrow:
          $ref: '#/components/schemas/EscrowAgreementSummary'
        events:
          type: array
          items:
            $ref: '#/components/schemas/EscrowEventView'
    EscrowEventView:
      type: object
      properties:
        type:
          type: string
        amountMinor:
          type: integer
          format: int64
        ledgerEntryId:
          type: string
        note:
          type: string
        createdAt:
          type: string
          format: date-time
    MovementRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        note:
          type: string
      required:
        - amountMinor
    CreateRemittanceRequest:
      type: object
      properties:
        beneficiaryName:
          type: string
          minLength: 1
        beneficiarySwift:
          type: string
          minLength: 1
        beneficiaryAccount:
          type: string
          minLength: 1
        beneficiaryCountry:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 1
        foreignAmountMinor:
          type: integer
          format: int64
        purposeCode:
          type: string
          minLength: 1
      required:
        - beneficiaryAccount
        - beneficiaryCountry
        - beneficiaryName
        - beneficiarySwift
        - currency
        - foreignAmountMinor
        - purposeCode
    OutboundRemittanceView:
      type: object
      properties:
        id:
          type: string
        beneficiaryName:
          type: string
        beneficiarySwift:
          type: string
        beneficiaryCountry:
          type: string
        purposeCode:
          type: string
        currency:
          type: string
        foreignAmountMinor:
          type: integer
          format: int64
        fxRate:
          type: number
        principalInrMinor:
          type: integer
          format: int64
        tcsMinor:
          type: integer
          format: int64
        inrDebitedMinor:
          type: integer
          format: int64
        financialYear:
          type: string
        lrsCumulativeAfterMinor:
          type: integer
          format: int64
        status:
          type: string
        ledgerEntryId:
          type: string
        remittanceReference:
          type: string
        createdAt:
          type: string
          format: date-time
    MarkRemittedRequest:
      type: object
      properties:
        remittanceReference:
          type: string
          minLength: 1
      required:
        - remittanceReference
    MarkFailedRequest:
      type: object
      properties:
        reason:
          type: string
          minLength: 1
      required:
        - reason
    QuoteRequest:
      type: object
      properties:
        currency:
          type: string
          minLength: 1
        foreignAmountMinor:
          type: integer
          format: int64
      required:
        - currency
        - foreignAmountMinor
    QuoteView:
      type: object
      properties:
        currency:
          type: string
        foreignAmountMinor:
          type: integer
          format: int64
        fxRate:
          type: number
        principalInrMinor:
          type: integer
          format: int64
        financialYear:
          type: string
        lrsCumulativeBeforeMinor:
          type: integer
          format: int64
        lrsThresholdMinor:
          type: integer
          format: int64
        tcsMinor:
          type: integer
          format: int64
        tcsBps:
          type: integer
          format: int32
        inrDebitedMinor:
          type: integer
          format: int64
    CreateExportInvoiceRequest:
      type: object
      properties:
        invoiceNumber:
          type: string
          minLength: 1
        buyerCountry:
          type: string
          minLength: 1
        currency:
          type: string
          minLength: 1
        foreignAmountMinor:
          type: integer
          format: int64
        purposeCode:
          type: string
          minLength: 1
        lut:
          type: boolean
      required:
        - buyerCountry
        - currency
        - foreignAmountMinor
        - invoiceNumber
        - purposeCode
    CrossBorderInvoiceView:
      type: object
      properties:
        invoice:
          $ref: '#/components/schemas/InvoiceSummary'
        remittances:
          type: array
          items:
            $ref: '#/components/schemas/CrossBorderRemittanceView'
    CrossBorderRemittanceView:
      type: object
      properties:
        id:
          type: string
        foreignAmountMinor:
          type: integer
          format: int64
        foreignCurrency:
          type: string
        fxRate:
          type: number
        inrAmountMinor:
          type: integer
          format: int64
        firaReference:
          type: string
        purposeCode:
          type: string
        ledgerEntryId:
          type: string
        remittedAt:
          type: string
          format: date-time
    InvoiceSummary:
      type: object
      properties:
        id:
          type: string
        invoiceNumber:
          type: string
        buyerCountry:
          type: string
        currency:
          type: string
        foreignAmountMinor:
          type: integer
          format: int64
        purposeCode:
          type: string
        lut:
          type: boolean
        status:
          type: string
        createdAt:
          type: string
          format: date-time
    RemittanceRequest:
      type: object
      properties:
        foreignAmountMinor:
          type: integer
          format: int64
        firaReference:
          type: string
          minLength: 1
      required:
        - firaReference
        - foreignAmountMinor
    CardIssueRequest:
      type: object
      properties:
        holderRef:
          type: string
          minLength: 1
        type:
          type: string
          enum:
            - EXPENSE
            - WALLET
        currency:
          type: string
          minLength: 1
      required:
        - currency
        - holderRef
        - type
    CardSummary:
      type: object
      properties:
        id:
          type: string
        holderRef:
          type: string
        type:
          type: string
        maskedPan:
          type: string
        currency:
          type: string
        balanceMinor:
          type: integer
          format: int64
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        closedAt:
          type: string
          format: date-time
    CardView:
      type: object
      properties:
        card:
          $ref: '#/components/schemas/CardSummary'
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/TransactionView'
    TransactionView:
      type: object
      properties:
        type:
          type: string
        amountMinor:
          type: integer
          format: int64
        ledgerEntryId:
          type: string
        description:
          type: string
        createdAt:
          type: string
          format: date-time
    SpendRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
        description:
          type: string
      required:
        - amountMinor
    CardAmountRequest:
      type: object
      properties:
        amountMinor:
          type: integer
          format: int64
      required:
        - amountMinor
    CreateAgreementRequest:
      type: object
      properties:
        customerRef:
          type: string
          minLength: 1
        orderRef:
          type: string
          minLength: 1
        orderAmountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        installments:
          type: integer
          format: int32
        interestBps:
          type: integer
          format: int32
        firstDueDate:
          type: string
          format: date
      required:
        - currency
        - customerRef
        - firstDueDate
        - installments
        - interestBps
        - orderAmountMinor
        - orderRef
    BnplAgreementSummary:
      type: object
      properties:
        id:
          type: string
        customerRef:
          type: string
        orderRef:
          type: string
        currency:
          type: string
        orderAmountMinor:
          type: integer
          format: int64
        interestBps:
          type: integer
          format: int32
        totalPayableMinor:
          type: integer
          format: int64
        installmentsCount:
          type: integer
          format: int32
        paidInstallments:
          type: integer
          format: int32
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        settledAt:
          type: string
          format: date-time
    BnplAgreementView:
      type: object
      properties:
        agreement:
          $ref: '#/components/schemas/BnplAgreementSummary'
        installments:
          type: array
          items:
            $ref: '#/components/schemas/InstallmentView'
    InstallmentView:
      type: object
      properties:
        seq:
          type: integer
          format: int32
        dueDate:
          type: string
          format: date
        amountMinor:
          type: integer
          format: int64
        status:
          type: string
        paidAt:
          type: string
          format: date-time
    FootprintSummary:
      type: object
      properties:
        recordCount:
          type: integer
          format: int64
        totalGramsCo2:
          type: integer
          format: int64
        totalGramsOffset:
          type: integer
          format: int64
        netGramsCo2:
          type: integer
          format: int64
    RemittanceDetailView:
      type: object
      properties:
        remittance:
          $ref: '#/components/schemas/OutboundRemittanceView'
        events:
          type: array
          items:
            $ref: '#/components/schemas/RemittanceEventView'
    RemittanceEventView:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        amountMinor:
          type: integer
          format: int64
        note:
          type: string
        createdAt:
          type: string
          format: date-time
    ScheduleRequest:
      type: object
      properties:
        subjectName:
          type: string
          minLength: 1
        subjectRef:
          type: string
        agentId:
          type: string
        scheduledAt:
          type: string
          format: date-time
      required:
        - subjectName
    SessionView:
      type: object
      properties:
        id:
          type: string
        merchantId:
          type: string
        subjectName:
          type: string
        subjectRef:
          type: string
        status:
          type: string
        agentId:
          type: string
        scheduledAt:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        livenessScore:
          type: integer
          format: int32
        geoTag:
          type: string
        retentionExpiresAt:
          type: string
          format: date-time
        failureReason:
          type: string
    FailRequest:
      type: object
      properties:
        reason:
          type: string
    CompleteRequest:
      type: object
      properties:
        biometricRef:
          type: string
          minLength: 1
        livenessScore:
          type: integer
          format: int32
          maximum: 100
          minimum: 0
        geoTag:
          type: string
      required:
        - biometricRef
    AddRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        pan:
          type: string
        din:
          type: string
        nationality:
          type: string
        ownershipBps:
          type: integer
          format: int32
          maximum: 10000
          minimum: 1001
        controlPerson:
          type: boolean
      required:
        - name
        - ownershipBps
    OwnerView:
      type: object
      properties:
        id:
          type: string
        merchantId:
          type: string
        name:
          type: string
        pan:
          type: string
        din:
          type: string
        nationality:
          type: string
        ownershipBps:
          type: integer
          format: int32
        controlPerson:
          type: boolean
        panStatus:
          type: string
        createdAt:
          type: string
          format: date-time
    KybPanRequest:
      type: object
      properties:
        pan:
          type: string
          minLength: 1
      required:
        - pan
    KybView:
      type: object
      properties:
        merchantId:
          type: string
        overallStatus:
          type: string
        panStatus:
          type: string
        gstinStatus:
          type: string
        bankStatus:
          type: string
        verifiedAt:
          type: string
          format: date-time
    GstinRequest:
      type: object
      properties:
        gstin:
          type: string
          minLength: 1
      required:
        - gstin
    BankRequest:
      type: object
      properties:
        accountNumber:
          type: string
          minLength: 1
        ifsc:
          type: string
          minLength: 1
      required:
        - accountNumber
        - ifsc
    CreateRequest:
      type: object
      properties:
        customerRef:
          type: string
          minLength: 1
        fullName:
          type: string
          minLength: 1
        consentGiven:
          type: boolean
        consentArtifact:
          type: string
      required:
        - customerRef
        - fullName
    KycView:
      type: object
      properties:
        id:
          type: string
        merchantId:
          type: string
        customerRef:
          type: string
        fullName:
          type: string
        aadhaarLast4:
          type: string
        aadhaarTxnId:
          type: string
        aadhaarStatus:
          type: string
        pan:
          type: string
        panStatus:
          type: string
        consentGiven:
          type: boolean
        consentAt:
          type: string
          format: date-time
        overallStatus:
          type: string
        verifiedAt:
          type: string
          format: date-time
    KycPanRequest:
      type: object
      properties:
        pan:
          type: string
          minLength: 1
      required:
        - pan
    ConsentRequest:
      type: object
      properties:
        consentArtifact:
          type: string
    AadhaarVerifyRequest:
      type: object
      properties:
        txnId:
          type: string
          minLength: 1
        otp:
          type: string
          minLength: 1
      required:
        - otp
        - txnId
    AadhaarInitiateRequest:
      type: object
      properties:
        aadhaar:
          type: string
          minLength: 1
      required:
        - aadhaar
    CreateStrRequest:
      type: object
      properties:
        caseId:
          type: string
          format: uuid
        subject:
          type: string
          minLength: 1
        grounds:
          type: string
          minLength: 1
        fileImmediately:
          type: boolean
      required:
        - grounds
        - subject
    StrView:
      type: object
      properties:
        id:
          type: string
        caseId:
          type: string
        subject:
          type: string
        grounds:
          type: string
        status:
          type: string
        fiuReferenceId:
          type: string
        createdAt:
          type: string
          format: date-time
        filedAt:
          type: string
          format: date-time
    ScreenRequest:
      type: object
      properties:
        partyType:
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
            - BENEFICIARY
        partyName:
          type: string
          minLength: 1
        identifier:
          type: string
      required:
        - partyName
        - partyType
    ScreeningView:
      type: object
      properties:
        id:
          type: string
        partyType:
          type: string
        partyName:
          type: string
        identifier:
          type: string
        result:
          type: string
        matchCount:
          type: integer
          format: int32
        riskScore:
          type: integer
          format: int32
        screenedAt:
          type: string
          format: date-time
    MuleScanRequest:
      type: object
      properties:
        beneficiaryRef:
          type: string
          minLength: 1
        inboundMinor:
          type: integer
          format: int64
        outboundMinor:
          type: integer
          format: int64
        inboundCount:
          type: integer
          format: int32
        outboundCount:
          type: integer
          format: int32
        medianHoldSeconds:
          type: integer
          format: int64
        distinctCounterparties:
          type: integer
          format: int32
      required:
        - beneficiaryRef
    MuleView:
      type: object
      properties:
        beneficiaryRef:
          type: string
        riskScore:
          type: integer
          format: int32
        severity:
          type: string
        flagged:
          type: boolean
        reasons:
          type: array
          items:
            type: string
    MonitorRequest:
      type: object
      properties:
        transactionRef:
          type: string
          minLength: 1
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
          minLength: 1
        mcc:
          type: integer
          format: int32
        countryCode:
          type: string
        txnCount24h:
          type: integer
          format: int32
        amount24hMinor:
          type: integer
          format: int64
        beneficiaryRef:
          type: string
      required:
        - amountMinor
        - currency
        - transactionRef
    AlertView:
      type: object
      properties:
        id:
          type: string
        subjectRef:
          type: string
        transactionRef:
          type: string
        ruleCode:
          type: string
        category:
          type: string
        riskScore:
          type: integer
          format: int32
        severity:
          type: string
        status:
          type: string
        caseId:
          type: string
        createdAt:
          type: string
          format: date-time
    MonitorResult:
      type: object
      properties:
        alertCount:
          type: integer
          format: int32
        alerts:
          type: array
          items:
            $ref: '#/components/schemas/AlertView'
    CreateCaseRequest:
      type: object
      properties:
        subject:
          type: string
          minLength: 1
        description:
          type: string
        alertIds:
          type: array
          items:
            type: string
            format: uuid
      required:
        - subject
    CaseView:
      type: object
      properties:
        id:
          type: string
        subject:
          type: string
        description:
          type: string
        status:
          type: string
        disposition:
          type: string
        riskScore:
          type: integer
          format: int32
        alertCount:
          type: integer
          format: int32
        openedAt:
          type: string
          format: date-time
        closedAt:
          type: string
          format: date-time
    CloseCaseRequest:
      type: object
      properties:
        disposition:
          type: string
          enum:
            - CLEARED
            - FALSE_POSITIVE
            - STR_FILED
      required:
        - disposition
    FraudDecisionSummary:
      type: object
      properties:
        id:
          type: string
        paymentId:
          type: string
        score:
          type: integer
          format: int32
        decision:
          type: string
        model:
          type: string
        createdAt:
          type: string
          format: date-time
    FraudDecisionView:
      type: object
      properties:
        id:
          type: string
        paymentId:
          type: string
        score:
          type: integer
          format: int32
        decision:
          type: string
        model:
          type: string
        topReasons:
          type: array
          items:
            $ref: '#/components/schemas/FraudReason'
        aiDecisionId:
          type: string
        createdAt:
          type: string
          format: date-time
    FraudReason:
      type: object
      properties:
        feature:
          type: string
        contribution:
          type: number
          format: double
        value:
          type: number
          format: double
        reason:
          type: string
    TemplateRequest:
      type: object
      properties:
        templateKey:
          type: string
          minLength: 1
        channel:
          type: string
          enum:
            - WHATSAPP
            - SMS
            - EMAIL
        body:
          type: string
          minLength: 1
      required:
        - body
        - channel
        - templateKey
    TemplateView:
      type: object
      properties:
        id:
          type: string
        templateKey:
          type: string
        channel:
          type: string
        body:
          type: string
        active:
          type: boolean
        createdAt:
          type: string
          format: date-time
    ConnectionRequest:
      type: object
      properties:
        target:
          type: string
          minLength: 1
        enabled:
          type: boolean
        webhookUrl:
          type: string
        zohoOrganizationId:
          type: string
      required:
        - target
    ConnectionView:
      type: object
      properties:
        id:
          type: string
        target:
          type: string
        enabled:
          type: boolean
        webhookUrl:
          type: string
        zohoOrganizationId:
          type: string
        updatedAt:
          type: string
          format: date-time
    RegisterRequest:
      type: object
      properties:
        url:
          type: string
          minLength: 1
        events:
          type: string
        signingSecret:
          type: string
          minLength: 1
      required:
        - signingSecret
        - url
    EndpointView:
      type: object
      properties:
        id:
          type: string
        url:
          type: string
        events:
          type: string
        status:
          type: string
    WhatsAppPayRequest:
      type: object
      properties:
        payerPhone:
          type: string
        payerVpa:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        description:
          type: string
        relatedRef:
          type: string
      required:
        - amountMinor
    PayCollectionView:
      type: object
      properties:
        id:
          type: string
        payerPhone:
          type: string
        payerVpa:
          type: string
        amountMinor:
          type: integer
          format: int64
        currency:
          type: string
        status:
          type: string
        description:
          type: string
        providerRef:
          type: string
        ledgerEntryId:
          type: string
        relatedRef:
          type: string
        createdAt:
          type: string
          format: date-time
        confirmedAt:
          type: string
          format: date-time
    ConfirmRequest:
      type: object
      properties:
        providerRef:
          type: string
        success:
          type: boolean
    InboundRequest:
      type: object
      properties:
        from:
          type: string
          minLength: 1
        text:
          type: string
        messageId:
          type: string
          minLength: 1
      required:
        - from
        - messageId
    InboundView:
      type: object
      properties:
        messageId:
          type: string
        from:
          type: string
        command:
          type: string
        processed:
          type: boolean
        reply:
          $ref: '#/components/schemas/ReplyView'
    ReplyView:
      type: object
      properties:
        dispatchId:
          type: string
        channel:
          type: string
        recipient:
          type: string
        body:
          type: string
        status:
          type: string
    FailedRequest:
      type: object
      properties:
        reason:
          type: string
          minLength: 1
      required:
        - reason
    DispatchView:
      type: object
      properties:
        id:
          type: string
        templateKey:
          type: string
        channel:
          type: string
        recipient:
          type: string
        renderedBody:
          type: string
        status:
          type: string
        providerRef:
          type: string
        relatedRef:
          type: string
        failureReason:
          type: string
        createdAt:
          type: string
          format: date-time
        sentAt:
          type: string
          format: date-time
    DeliveredRequest:
      type: object
      properties:
        providerRef:
          type: string
          minLength: 1
      required:
        - providerRef
    DispatchRequest:
      type: object
      properties:
        templateKey:
          type: string
          minLength: 1
        channel:
          type: string
          enum:
            - WHATSAPP
            - SMS
            - EMAIL
        recipient:
          type: string
          minLength: 1
        variables:
          type: object
          additionalProperties:
            type: string
        relatedRef:
          type: string
      required:
        - channel
        - recipient
        - templateKey
    CreateMerchantRequest:
      type: object
      properties:
        slug:
          type: string
          minLength: 1
        name:
          type: string
          minLength: 1
      required:
        - name
        - slug
    CreateMerchantResponse:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        apiKey:
          type: string
    AskRequest:
      type: object
      properties:
        conversationId:
          type: string
          format: uuid
        question:
          type: string
          minLength: 1
      required:
        - question
    CopilotAnswer:
      type: object
      properties:
        conversationId:
          type: string
          format: uuid
        messageId:
          type: string
          format: uuid
        surface:
          type: string
        question:
          type: string
        answer:
          type: string
        figures:
          type: array
          items:
            $ref: '#/components/schemas/Figure'
        citations:
          type: array
          items:
            type: string
        confidence:
          type: number
          format: double
        fellBack:
          type: boolean
        requiresHumanReview:
          type: boolean
        aiDecisionId:
          type: string
          format: uuid
        model:
          type: string
        sandbox:
          type: boolean
    Figure:
      type: object
      properties:
        key:
          type: string
        label:
          type: string
        value: {}
        unit:
          type: string
    AgentMandateIssueRequest:
      type: object
      properties:
        agentId:
          type: string
          minLength: 1
        label:
          type: string
        maxTxnMinor:
          type: integer
          format: int64
        cumulativeCapMinor:
          type: integer
          format: int64
        allowedOperations:
          type: array
          items:
            type: string
        allowedPayees:
          type: array
          items:
            type: string
        validFrom:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
      required:
        - agentId
        - cumulativeCapMinor
        - maxTxnMinor
    AgentMandateView:
      type: object
      properties:
        id:
          type: string
        agentId:
          type: string
        label:
          type: string
        maxTxnMinor:
          type: integer
          format: int64
        cumulativeCapMinor:
          type: integer
          format: int64
        spentMinor:
          type: integer
          format: int64
        remainingMinor:
          type: integer
          format: int64
        allowedOperations:
          type: array
          items:
            type: string
        allowedPayees:
          type: array
          items:
            type: string
        validFrom:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        status:
          type: string
        createdAt:
          type: string
          format: date-time
        revokedAt:
          type: string
          format: date-time
    RevokeRequest:
      type: object
      properties:
        reason:
          type: string
    AuthorizeRequest:
      type: object
      properties:
        operation:
          type: string
          minLength: 1
        payeeRef:
          type: string
        amountMinor:
          type: integer
          format: int64
        capture:
          type: boolean
        idempotencyKey:
          type: string
      required:
        - amountMinor
        - operation
    AuthorizationDecision:
      type: object
      properties:
        mandateId:
          type: string
        allowed:
          type: boolean
        reason:
          type: string
        operation:
          type: string
        payeeRef:
          type: string
        amountMinor:
          type: integer
          format: int64
        spentMinor:
          type: integer
          format: int64
        remainingMinor:
          type: integer
          format: int64
        useId:
          type: string
    CreateExportRequest:
      type: object
      properties:
        target:
          type: string
          minLength: 1
        periodStart:
          type: string
          format: date-time
        periodEnd:
          type: string
          format: date-time
      required:
        - periodEnd
        - periodStart
        - target
    ExportView:
      type: object
      properties:
        id:
          type: string
        target:
          type: string
        periodStart:
          type: string
          format: date-time
        periodEnd:
          type: string
          format: date-time
        status:
          type: string
        recordCount:
          type: integer
          format: int32
        externalRef:
          type: string
        detail:
          type: string
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
    DeliveryView:
      type: object
      properties:
        id:
          type: string
        eventType:
          type: string
        status:
          type: string
        attemptCount:
          type: integer
          format: int32
        lastResponseCode:
          type: integer
          format: int32
        lastError:
          type: string
        deliveredAt:
          type: string
          format: date-time
    InboundMessageView:
      type: object
      properties:
        id:
          type: string
        messageId:
          type: string
        from:
          type: string
        body:
          type: string
        command:
          type: string
        receivedAt:
          type: string
          format: date-time
    MerchantView:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        status:
          type: string
    MeResponse:
      type: object
      properties:
        merchantId:
          type: string
        subject:
          type: string
        roles:
          type: array
          items:
            type: string
        authenticated:
          type: boolean
    ConversationSummary:
      type: object
      properties:
        id:
          type: string
        surface:
          type: string
        title:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ConversationView:
      type: object
      properties:
        id:
          type: string
        surface:
          type: string
        title:
          type: string
        messages:
          type: array
          items:
            $ref: '#/components/schemas/MessageView'
    MessageView:
      type: object
      properties:
        id:
          type: string
        role:
          type: string
        content:
          type: string
        figuresJson:
          type: string
        confidence:
          type: number
          format: double
        fellBack:
          type: boolean
        aiDecisionId:
          type: string
        createdAt:
          type: string
          format: date-time
    TpvBucket:
      type: object
      properties:
        period:
          type: string
          format: date-time
        totalMinor:
          type: integer
          format: int64
        txCount:
          type: integer
          format: int64
    SuccessRate:
      type: object
      properties:
        captured:
          type: integer
          format: int64
        failed:
          type: integer
          format: int64
        ratePercent:
          type: number
          format: double
    MrrWaterfallRow:
      type: object
      properties:
        period:
          type: string
          format: date-time
        newMrr:
          type: integer
          format: int64
        expansion:
          type: integer
          format: int64
        contraction:
          type: integer
          format: int64
        churn:
          type: integer
          format: int64
        reactivation:
          type: integer
          format: int64
        netChange:
          type: integer
          format: int64
    ComplianceHealth:
      type: object
      properties:
        merchantId:
          type: string
          format: uuid
        generatedAt:
          type: string
          format: date-time
        overallStatus:
          type: string
        reconciliation:
          $ref: '#/components/schemas/ReconHealth'
        filing:
          $ref: '#/components/schemas/FilingSummary'
        fraud:
          $ref: '#/components/schemas/FraudPosture'
        kyb:
          $ref: '#/components/schemas/KybOnboarding'
        kpis:
          $ref: '#/components/schemas/FinancialKpis'
    FilingSummary:
      type: object
      properties:
        totalReturns:
          type: integer
          format: int32
        filedCount:
          type: integer
          format: int32
        preparedCount:
          type: integer
          format: int32
        draftCount:
          type: integer
          format: int32
        errorCount:
          type: integer
          format: int32
        totalTaxFiledMinor:
          type: integer
          format: int64
        latestFiledPeriod:
          type: string
        status:
          type: string
        asOf:
          type: string
          format: date-time
    FinancialKpis:
      type: object
      properties:
        currentMrrMinor:
          type: integer
          format: int64
        currentArrMinor:
          type: integer
          format: int64
        trailingTpvMinor:
          type: integer
          format: int64
        trailingSuccessRatePercent:
          type: number
          format: double
        windowDays:
          type: integer
          format: int32
        asOf:
          type: string
          format: date-time
    FraudPosture:
      type: object
      properties:
        scoringEnabled:
          type: boolean
        mode:
          type: string
        description:
          type: string
        asOf:
          type: string
          format: date-time
    KybOnboarding:
      type: object
      properties:
        overallStatus:
          type: string
        panStatus:
          type: string
        gstinStatus:
          type: string
        bankStatus:
          type: string
        onboardingComplete:
          type: boolean
        verifiedAt:
          type: string
          format: date-time
        asOf:
          type: string
          format: date-time
    ReconHealth:
      type: object
      properties:
        totalSettlements:
          type: integer
          format: int32
        reconciledCount:
          type: integer
          format: int32
        discrepancyCount:
          type: integer
          format: int32
        pendingCount:
          type: integer
          format: int32
        nodalBalanceMinor:
          type: integer
          format: int64
        nodalHealthy:
          type: boolean
        status:
          type: string
        asOf:
          type: string
          format: date-time
    CashFlowForecast:
      type: object
      properties:
        startingBalanceMinor:
          type: integer
          format: int64
        avgDailyNetMinor:
          type: integer
          format: int64
        horizonDays:
          type: integer
          format: int32
        projectedEndBalanceMinor:
          type: integer
          format: int64
        recommendation:
          type: string
        points:
          type: array
          items:
            $ref: '#/components/schemas/ForecastPoint'
    ForecastPoint:
      type: object
      properties:
        day:
          type: integer
          format: int32
        date:
          type: string
          format: date
        projectedBalanceMinor:
          type: integer
          format: int64
    ArrView:
      type: object
      properties:
        mrrMinor:
          type: integer
          format: int64
        arrMinor:
          type: integer
          format: int64
    GatewayHealth:
      type: object
      properties:
        status:
          type: string
        model:
          type: string
        sandbox:
          type: boolean
    AiDecisionSummary:
      type: object
      properties:
        id:
          type: string
        feature:
          type: string
        model:
          type: string
        confidence:
          type: number
          format: double
        humanReviewed:
          type: boolean
        fellBack:
          type: boolean
        createdAt:
          type: string
          format: date-time
    AiDecisionView:
      type: object
      properties:
        id:
          type: string
        feature:
          type: string
        model:
          type: string
        inputHash:
          type: string
        maskedInput:
          type: string
        outputJson:
          type: string
        confidence:
          type: number
          format: double
        humanReviewed:
          type: boolean
        fellBack:
          type: boolean
        createdAt:
          type: string
          format: date-time
    McpManifest:
      type: object
      properties:
        protocolVersion:
          type: string
        server:
          type: string
        version:
          type: string
        description:
          type: string
        tools:
          type: array
          items:
            $ref: '#/components/schemas/McpTool'
    McpTool:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        requiredScope:
          type: string
        inputSchema:
          type: object
          additionalProperties: {}
    MandateDetail:
      type: object
      properties:
        mandate:
          $ref: '#/components/schemas/AgentMandateView'
        uses:
          type: array
          items:
            $ref: '#/components/schemas/UseView'
    UseView:
      type: object
      properties:
        id:
          type: string
        operation:
          type: string
        payeeRef:
          type: string
        amountMinor:
          type: integer
          format: int64
        allowed:
          type: boolean
        reason:
          type: string
        createdAt:
          type: string
          format: date-time
  securitySchemes:
    API-Key:
      type: apiKey
      description: Programmatic API key (`qp_live_…` / `qp_test_…`) presented as the `X-Api-Key` header.
      name: X-Api-Key
      in: header
