Canadian Credit Cards Many fuel dispensers in the USA (for sure in Hawaii, apparently elsewhere in the USA as well) accept the numbers-only from the postal code of a Canadian billing address followed by two zeros.
So, if your Canadian billing address is right beside Schwartz's Deli in Montreal where the postal code is H2W 1L2, you would enter '21200'.
Where the '212' are the numbers from the postal code, and the '00' is padding to get to 5 digits.
Interestingly, if your billing address is in Head-Smashed-In Buffalo Jump, Alberta where the postal code is T0L 0Z0, you actually would enter '00000'.
Edit:
I just tested this on January 23rd, 2014.
It still works.
travel.stackexchange.com/users/3067/alx9r
UK Credit Cards
I have a UK credit card and have had mixed results using my card at the pump.
Sometimes no ZIP code is asked for and it works fine.
Also, sometimes entering 00000 does work (I'm guessing because it's not subsequently using the ZIP code entered).
In about 80% of cases, though (and it does seem to vary as to where in the US you are), I've had to go into the gas station - although they generally seem well equipped to handle the exception process (by which I mean, at that point it doesn't seem to matter that it's foreign - I just ask for X$ of gas and they charge it -
the difference being refunded if it's unused).
travel.stackexchange.com/users/2555/Andrew Ferrier
German Credit Cards
I've had mixed results with German credit cards.
Since we also have 5 digits ZIP codes, the match should be fairly easy.
However, on some occasions it worked perfectly, while on others it didn't and I had to see the cashier.
All in all, there doesn't seem to be any kind of rule or system - at least not to me.
travel.stackexchange.com/users/4742/perdian
Swedish Credit Cards Swedish credit cards work fine.
You can type in your Swedish zipcode (also 5 digit)
but I honestly doubt the system checks for foreign cards.
travel.stackexchange.com/users/4167/David Brossard
I have UK and Italian credit cards.
Italy also has 5 digit postal codes and I've sometimes been able to use the postal code at the pump with an Italian card.
I've also called my credit card company and asked if I could put a temporary address on a credit card so that I could have a zip code associated.
In my case they said I would have to have that as my only address but could change it back later.
In the end I decided not to do that, but might be worth asking if your credit card company can do it.
Perhaps just put the address of the hotel you're staying at.
As other people have said, I've also had luck using just the digits of my UK postal code padded with zeroes.
I've never been able to use all zeroes.
The mechanism that the gas station uses, is the credit card Address Verification Service .
It's worth noting that there seem to be restrictions on this in various US states as noted in this cpn site :
There are some controversies and legal issues when requesting AVS information.
For example, in California and Massachusetts it may be illegal to ask for ZIP code information, as this is seen as a privacy violation.
This may explain why all zeroes are accepted in some places and not others.
AVS works differently with different card suppliers, so it may be possible that a Mastercard works with a foreign 5 digit postal code, or zero-padded postal code, whereas an Amex doesn't, or vice versa.
travel.stackexchange.com/users/43570/Berwyn
Australian credit cards Australian credit cards don't seem to cause much of a problem here - I was able to use 90210 (which is always my go-to American zip code, probably like many!)
on gas stations in both Florida and New York.
This was with an Australian Mastercard.
travel.stackexchange.com/users/10264/Tim Malone
Swiss credit cards Not tried yet at the pump.
At a Long Island Railroad ticket machine in New York City, the code was asked.
I accidentally tapped the "Continue" button on the touchscreen witout typing any code, and it worked.
FYI
The zip codes in Switzerland have 4 digits.
travel.stackexchange.com/users/75/DavGin
In the USA, many  pay-at-the-pump  fuel dispensers that accept credit cards require a  5-digit numeric zip code  that corresponds to the billing address of the credit card.  In Canada, for instance, we have  6-digit alphanumeric postal codes , so it's not obvious what you're supposed to type in since the gas dispensers have only numeric keypads.  Entering '00000' or '90210' seems to always result in failed authorization.  Is there a zip code that works for credit cards with foreign billing addresses?
Is there a ZIP code I can enter when paying-at-the-pump in the USA with a foreign credit card?
travel.stackexchange.com
<usa><automobiles><payment-cards>
travel.stackexchange.com/questions/11594
travel.stackexchange.com/users/3067/alx9r
Swedish, Italian and Australian cards seem to work, either with a fake code or because their codes are also 5 digit. Canadian postal codes are often accepted if you enter the numbers only, followed by two zeros. UK and German cards have mixed results. Some credit cards work fine in US gas stations, probably because they are from countries that also have 5-digit post codes. Other cards do not work so well, however. These are usually from countries that do not have 5-digit post codes
There are problems using Canadian, UK and German credit cards at gas stations in the US. Swedish, Italian and Australian credit cards work fine in gas stations in the US, probably because their post codes are also 5 digits.