Looking to make a quick withdrawal from the ATM down the street? Well, if it isn’t owned by your bank, you’ll be paying more than ever. According to a Bankrate analysis, average out-of-network ATM withdrawal fees have risen to an all-time high of $4.57 per transaction.

Double Jeopardy

The ATM fees consumers are forced to pay on out-of-network withdrawals are in reality two fees. One portion is the fee charged by the bank that owns the ATM. Theoretically, these fees compensate the bank for the cost of installing, servicing, and stocking ATM machines with cash and are disclosed to the customer via an on-screen notification at the time of withdrawal. The other portion of the fee, however, is charged by your own custodian bank that you hold the account with. Unlike the noncustomer withdrawal fees, this portion of the cost is generally not disclosed on-screen at the time of withdrawal.

Two Causes

The first cause is a shift in the way banks structure their checking account offerings. In recent years, firms have taken some steps to make basic banking services more available and affordable. 38% of banks now offer basic checking accounts free of balance requirements and monthly fees. Furthermore, accounts charging monthly fees have reduced their service charges by 1.4% in 2016. Unfortunately, accounts with low minimum balance requirements tend not to accrue interest and do not have access to some of the perks that come with higher-yielding checking accounts with relatively large minimum-balance requirements. For instance, most banks waive their own portion of ATM fees for these wealthier customers and some even reimburse their clients for the fees charged by the bank that owns the ATM (though many online banks, and some traditional ones, do provide fee reimbursement services regardless of account size). Generally, however, depositors with smaller accounts do not receive this benefit and must bear the brunt of these higher fees.

The second reason for the higher fees is simple supply and demand. As innovation breeds digital payment services and cashless transactions, the demand for ATMs has fallen tremendously. A recent analysis by CommSec concluded that the number of ATM withdrawals has fallen by 7% per year since 2012. At the same time, the explosion of EMV technology in debit and credit cards in the United States has led to many banks taking on the expense of updating their ATM machines.

Fortunately, practically every bank still offers free withdrawal services from its own ATM network, regardless of the size of the customer’s account balance. Additionally, many stores now accept payment via Apple Pay, Venmo, and other digital payment services, and those that accept payment via debit and credit cards often offer no-fee cash back services. The bottom line: If you need to hit the ATM, either make sure your bank is one that offers fee reimbursement services or go out of your way to find a machine owned and operated by your own bank. Otherwise, you might pay for it.