It’s an Italian concept and was originally known as “caffè sospeso“. The idea is that when you buy a coffee you buy a second one for someone else, someone less fortunate who will come to the cafe later in the day. Snopes declares it true and has collected some stories of it in action.
In Dutch it’s known as “uitgestelde koffie”, which literally means “deferred coffee”. Here’s how to say it in Dutch, although in Amsterdam you can probably get away with saying it in English.
Obviously it only works if the cafe is ready to take part. There are cafes in Amsterdam that do take part;
Dragon’s Delight Tolstraat 200
Cafe Pollux Prins Hendrikkade 121
Koffiebar Maling (in the public library, on Roelof Hartplein)
Bagels & Beans De Clercqstraat 22hs
Mezzo IJssalon Dapperplein 36
Cafe Toussaint Bosboom Toussaintstraat 26
Eetlokaal LT Javastraat 116a (uitgestelde soep = deferred soep)
These are the ones I found via an internet search – if you know of others please let me know in the comments.