The Herald can reveal the corruption was discovered only when the couple asked for their money back when one of the visa applications was declined.
Immigration New Zealand did not answer questions before deadline about whether a wider audit of Lim's work history was conducted, or if any other questionable cases were found.
Court documents show Pan, 64, worked at an Auckland cafe with a Hong Kong national Yiu Sing Hang and his girlfriend Tansi Wang, who were living in New Zealand on student visas.
Hang was granted a work visa on completing his studies, but Wang's student visa was not renewed and she ended up an overstayer.
Pan told the couple she had a friend who worked for Immigration New Zealand and could "assist".
The trio met Lim for lunch at a restaurant in Auckland in February 2013, where they discussed the visa issue. They met a second time at Pan's Mt Roskill home 12 days later.
Hang and Wang handed $5000 in cash to Pan and Lim, who helped Hang complete his work visa application. He paid a further $500 and was granted a skilled migrant visa in March. The couple paid another $1000 at a second lunch with Lim, where they discussed a visa for Wang.
He later told them the cost for that visa would be $20,000, as her application was more difficult.
They paid - in instalments of $12,000 and $8000 - in April 2013, and again Lim helped fill out the application form and arrange supporting documents. However, Immigration New Zealand declined the application the following month.
She was told to leave New Zealand immediately and she had no right to appeal against deportation.
At this point, the bribes backfired.
The couple asked Lim to return the $20,000, but were told this was "not possible", according to the court documents.
They began chasing Lim to pay them back, even visiting him at Auckland International Airport where he worked. But nothing happened until they wrote a letter threatening to tell the police if Lim and Pan did not repay the money by a certain date.
The $20,000 was refunded after a series of negotiations, but the couple pursued Lim for more money.
Hang and Wang sent another letter in August 2013 addressed to Lim, which was opened by the branch manager at the Immigration New Zealand office where he worked.
They wanted another $29,000 - compensation for $23,400 in consultation fees they had paid someone else for Wang's failed visa application and a refund of the $6500 paid for Hang's visa.
The discovery sparked an internal investigation, which was then referred to the Serious Fraud Office. It has the jurisdiction to investigate corruption and bribery offences.
The SFO laid criminal charges against Lim and Pan in May this year and the pair will be sentenced in the Auckland District Court next month after entering prompt guilty pleas.
"The acceptance of bribes by a public official is a serious issue. New Zealand has very low levels of corruption and bribery by international standards and it is important that we maintain this good reputation by addressing those instances which do occur," SFO director Julie Read said about the case in an earlier statement.
"This is plain in the case where a bribe is paid to secure a contract - but a bribe paid to circumvent the rules also causes significant harm. The rules, whether they are about immigration or anything else, are intended to apply to everyone equally."
Lim is originally from Singapore but has lived in New Zealand for about 40 years. He has worked as a border immigration officer since 2008 and was based at Auckland International Airport, where his role included interviewing passengers and gathering information to verify or determine whether a person met the entry requirements for New Zealand.