Yes, the $5 pending charge you see after updating your API payment method is a temporary authorization hold on your credit card. This is part of the process of setting up a pay-as-you-go API plan. The pending charge will be reversed within 7 days.
Please rest assured that you will only be billed at the end of each month based on your actual API usage.