With the limited Internet bandwidth in a given area, unlimited data plans can create congestion because there is no retribution for transmitting many packets. The real-time pricing mechanism can inform users of their Internet consumption to limit congestion during peak hours. However, implementing real-time pricing is opex-heavy from the network provider side and requires high-integrity operations to gain consumer trust. This paper aims to leverage the software-defined network to solve the opex issues and blockchain technology to solve trust issues. First, the network congestion level in a given area is analyzed. Then, the price is adjusted accordingly. Devices that send a lot of traffic during congestion will be charged more expensive bills than if transmitting traffic during an off-peak period. To prevent over-charging, the consumers can pre-configure a customized Internet profile stating how many data bytes they are willing to send during congestion. The software-defined controller also authenticates consumers and checks whether they have enough token deposits in the blockchain as Internet usage fees. We implement our work using Ethereum and POX controllers. The experiment results show that the proposed real-time pricing can be performed seamlessly, and the network provider can reap up to 72.91% more profits than existing approaches, such as usage-based pricing or time-dependent pricing. The fairness and trustability of real-time pricing is also guaranteed through the proof-of-usage mechanism and the transparency of the blockchain.