A Wall Street banker and his Long Island father teamed up in a $1 million insider trading scheme where they used “golf-related code” to mask their illegal emails and even used their loot to pay for the son’s wedding photographer, prosecutors said Thursday.

Sean Stewart, 34 — who worked at JP Morgan Chase during the scheme — slipped secret information about upcoming health care mergers to his dad, Robert Stewart, 64, who would use the illegal tips to buy up stock and turn a healthy profit between 2011 and 2014, the Manhattan US attorney said.

“When they communicated over the telephone or by email about the trading, they were vague and sometimes even used ‘golf’-related code to mask their communication,” the criminal complaint states.

“Saw local story about high cost of golf reservations since a foreign company purchased all. Even more expensive than imagined,” the father emailed to his son in July 2012, referring to the higher-than-expected price of a stock they were illegally trading.

“Might have an opportunity to play golf but would need to book the reservation as soon as the office opens Tuesday morning,” Robert Stewart said in another email that government prosecutors claim was a coded message.

And two days before his son’s 2011 wedding to lawyer Elizabeth Johnson, Robert Stewart used his ill-gotten loot to pay a wedding photographer $10,055, according to the criminal complaint.

“The Stewarts — father and son alike — allegedly engaged in insider trading together to the tune of more than $1 million,” said Manhattan US Attorney Preet Bharara.

“The son’s tip to his father became a gift to himself when his father kicked back some of the proceeds of the insider trading to pay for his son’s wedding.”

Sean Stewart once even criticized his dad at a meeting for not using a tip he gave him, saying, “I can’t believe I handed you this on a silver platter and you didn’t invest in it,” according to a recording a confidential witness made of the meeting.

The son worked first at JP Morgan Chase and later at Perella Weinberg Partners during the scheme.

Robert Stewart was arrested at his Long Island home Thursday morning while Sean Stewart surrendered to FBI agents in Wisconsin.

A lawyer for Robert Stewart said “No comment” and a lawyer for Sean Stewart didn’t return a message seeking comment. ​