{
 "openapi": "3.1.0",
 "info": {
  "title": "Upi transactions (India statutory)",
  "version": "20261030b",
  "description": "Read and maintain upi transactions records (india.upi_ledger)."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "upi-transactions": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "txn_no": {
      "type": "string",
      "description": "Txn no",
      "readOnly": true
     },
     "engine_id": {
      "type": "string",
      "format": "uuid",
      "description": "Engine id",
      "readOnly": true
     },
     "handle_id": {
      "type": "string",
      "format": "uuid",
      "description": "Handle id",
      "readOnly": true
     },
     "transaction_ref": {
      "type": "string",
      "description": "Transaction ref",
      "readOnly": true
     },
     "flow": {
      "type": "string",
      "description": "Flow",
      "readOnly": true
     },
     "payer_vpa": {
      "type": "string",
      "description": "Payer vpa",
      "readOnly": true
     },
     "payee_vpa": {
      "type": "string",
      "description": "Payee vpa",
      "readOnly": true
     },
     "payee_name": {
      "type": "string",
      "description": "Payee name",
      "readOnly": true
     },
     "amount": {
      "type": "string",
      "format": "decimal",
      "description": "Amount",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "note": {
      "type": "string",
      "description": "Note",
      "readOnly": true
     },
     "intent_url": {
      "type": "string",
      "description": "Intent url",
      "readOnly": true
     },
     "qr_payload": {
      "type": "string",
      "description": "Qr payload",
      "readOnly": true
     },
     "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Expires at",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "npci_response_code": {
      "type": "string",
      "description": "Npci response code",
      "readOnly": true
     },
     "rrn": {
      "type": "string",
      "description": "Rrn",
      "readOnly": true
     },
     "upi_txn_id": {
      "type": "string",
      "description": "Upi txn id",
      "readOnly": true
     },
     "payer_name": {
      "type": "string",
      "description": "Payer name",
      "readOnly": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at",
      "readOnly": true
     },
     "settled_at": {
      "type": "string",
      "format": "date-time",
      "description": "Settled at",
      "readOnly": true
     },
     "failure_reason": {
      "type": "string",
      "description": "Failure reason",
      "readOnly": true
     },
     "source_module": {
      "type": "string",
      "description": "Source module",
      "readOnly": true
     },
     "source_resource": {
      "type": "string",
      "description": "Source resource",
      "readOnly": true
     },
     "source_record_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source record id",
      "readOnly": true
     },
     "source_no": {
      "type": "string",
      "description": "Source no",
      "readOnly": true
     },
     "applied_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Applied amount",
      "readOnly": true
     },
     "ar_receipt_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ar receipt id",
      "readOnly": true
     },
     "simulated": {
      "type": "boolean",
      "description": "Simulated",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "engine_name": {
      "type": "string",
      "description": "Engine name",
      "readOnly": true
     },
     "engine_kind": {
      "type": "string",
      "description": "Engine kind",
      "readOnly": true
     },
     "handle_vpa": {
      "type": "string",
      "description": "Handle vpa",
      "readOnly": true
     },
     "refunded": {
      "type": "string",
      "format": "decimal",
      "description": "Refunded",
      "readOnly": true
     },
     "callbacks": {
      "type": "integer",
      "description": "Callbacks",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/india/upi-transactions": {
   "get": {
    "summary": "list upi-transactions",
    "operationId": "list_upi_transactions_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post upi transactions",
    "operationId": "action_upi_transactions_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/india/upi-transactions/{id}": {
   "get": {
    "summary": "get upi-transactions",
    "operationId": "get_upi_transactions_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put upi transactions",
    "operationId": "action_upi_transactions_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete upi transactions",
    "operationId": "action_upi_transactions_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/india/upi-transactions/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_upi_transactions_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}