These are the instruction that somebody from cruisemates posted last year (I believe it was Luanne). I followed the instructions and when I got onboard I had an on board credit for the amount I had ordered.
Go to the Carnival web site. Put in your pass word and go to Fun Ship Dollars. Click on there, and buy what you think you will spend on your cruise. If you don't have the money for all of what you think you will need, then buy a few at a time. They will ask for your booking # plus your address. In the box where it says address, put your booking # where it says city, state, put your cabin number and the words "On Board Credit" Within an hour I had an e-mail confirming the amount, plus that it was applied to my account. I printed it out, and will take it with me. I know it worked, because when I received my doc's it said the amount of on board credit. Now the reason the Carnival site doesn't say how to do it already, is because cruise web sites are faster than Carnival.
If you don't have a cabin assigned yet, you might be better off calling Carnival and purchasing them that way.