This paper explores the potential of blockchain technology and the Internet of Things (IoT) to enhance safety and traceability for the pharmaceutical supply chain, primarily focusing on medication storage. This research arises from challenges tied to improper warehousing procedures and the requirement for flawless data accuracy among various participants in the supply chain. In order to track and monitor the conditions of medical supplies, an IoT middleware is developed that utilises the Hyperledger Fabric Blockchain. The data gathered from IoT end-points is securely transmitted to the node running the HyperLedger Blockchain using the MQTT protocol. The developed prototype provides an immutable history of drug storage conditions, such as temperature, and humidity. To ascertain the system’s performance, we have conducted systematic tests. The experimental results suggest that the developed proof of concept demonstrates its ability to handle different loads, maintain optimal transaction throughput and latency and efficiently manage and secure IoT data in real-time. Moreover, it ensures continuous data collection from supply chain IoT nodes and synchronisation with the blockchain network.