Michael Restaino Jr. of Linden was arrested shortly afterward Monday when a Roselle police officer stopped the cab he was riding in several blocks from the Roselle Savings Bank.
Police say the taxi driver was apparently unaware of what his passenger had done.
Police say they found more than $2,400 in cash and a holdup note in Restaino's pockets. They say he was not armed.
He has been charged with second-degree robbery and is being held in the Union County Jail in lieu of $100,000 bail. Police did not know whether he had retained a lawyer.