Yes, you can pay the credit card bill immediately after purchase. But, this has both benefits and disadvantages. 

Advantages

You Don’t Have To Remember The Due Date: By paying off the credit card bill immediately after making the purchase, you do not have to remember the credit card due date. Sometimes when you have multiple credit cards, due dates will get missed for some credit cards and you may have to pay late penalty charges on these credit cards. So, when you pay your bills immediately after purchase, payments will get cleared on time. 

You Can Keep your CUR in Check: When you make a purchase, you are reducing the total available credit limit and increasing the total outstanding on all credit cards. This means that your credit utilization ratio increases. This in turn lowers your credit score since your CUR is one of the important parameters in computing your credit score. So, if you settle the credit card bill immediately after you spend, you will regain the credit limit and reduce the outstanding debt as well. So, your CUR is automatically kept in place. 

Disadvantages 

You may fall short of cash: Credit cards are specially designed to cater to cash crunches or to save up on cash for immediate expenses. In this way, you can use the money you have for immediate expenses. But, if you settle the bill immediately after purchase, you may have to shell out the saved money and you may then fall short of cash for your other instant expenditures. That is why credit cards come with an interest free period, so that the person who wants to settle the bill can find ample time to arrange for it. Also, when you pay just before the due date, you will know what all expenses you have made for the month using a credit card and then pay the bills in a single transaction. 

Will be unable to compute your credit score: For computing your credit score, you need credit utilization. When you pay your credit card bills immediately after purchase, the credit bureaus will not receive any information regarding your balance outstanding on your credit cards. This is because, whenever your statement is issued, your outstanding balance will show as zero. Bureaus will think that you are not utilizing your  credit card while you are actually using it and also paying the bills on time. 

Also Read: Credit Card Bill Payment