It did not go well the last time Bernard C. Welch attempted to make crime pay.

Sale to Life magazine of photographs of the accused killer of Dr. Michael Halberstam was criticized as checkbook journalism, and some dealers refused to sell the magazine.

And the fee for the photos, $9,000, never did reach Welch: the Internal Revenue Service promptly put a lien on the money, and it, not Welch, got the check.

Now the Welch group is making a second try.

They're awarded the rights to Welch's story to Paul Sann, a tough-talking ("crime is my business") New York author/editor, who said he thinks Welch is perhaps the "greatest one-man crime wave" of the century.

And to circumvent the sort of problems they encountered with Life, they've devised an agreement under which Sann will share any profits from the book not with Welch, but with a trust "for the benefit of his three indigent infants."

"They couldn't sell it in Welch's name, or the IRS would take the money immediately," said Sann. "So [Martin] Firestone [one of Welch's two lawyers] acquired the rights to his story in return for setting up the trust for the benefit of his three infant sons . . . maybe two sons and a daughter. . . . They're all under 3 years old, anyway."

Attorney Firestone, of Washington, confirms this, sort of.

"What's gonna prevent the IRS from trying up this trust? Nothing. I'm sure they will try and tie up the trust, and all we can do is take whatever appropriate measures we can. . . . We're just trying to ensure that the children will be taken care of, so they don't become wards of the state. . . . It's sort of a Catch 22, society will pay for their care or well-being, one way or the other. . . ."

Due to stand trial Wednesday for the shooting of Halberstam, wanted by police in connection with 3,300 burglaries, Bernard Welch, the master burglar, had a story that was viewed as a hot literary property from the moment it broke.

Welch's two lawyers, Firestone for the literary arena, Sol Z. Rosen for the criminal part, claimed that 10 "very solid" offers had been reported. Rosen told the Washington magazine that Welch was "the coolest, most sophisticated individual I've ever met. Steve McQueen would have been perfect in the role."

Such remarks do not sit well with Sann, 67, one-time editor of The New York Post, who said, somewhat defensively, that he's "talking about a book here and not a movie. . . . A book in my mind that needs to be written."

"I don't plan to glamorize him," said Sann, in his Lee shirt and Frey boots, in the Greenwich Village brownstone he owns. "He ain't gonna see manuscript. It's gonna be my book and my copyright."

Nor does Sann see any ethical problems about doing a book on Welch, though Halberstam, as an author, was a man whose work he admired.

"I have no questions about the morality about doing the story of a Bernard Welch or any other criminal. I regard it as a story of some import to our society, an interesting crime riddle, an interesting look at law enforcement. . . .I don't want to sound like a preacher, but it raises some interesting questions about our society, like what the hell is wrong with our law enforcement . . .?"

He is less forthcoming on the specifics of his arrangement with Welch and the trust fund and the attorney. Sann will not discuss the terms of the split, and will say only that he and his agent have the rights to the story for a year.

And he also insists that no money has been paid to Welch for the story, though his research, in only the past few months, has already taken him around the country.

"The only money that's changed hands," he said, "has been between me and American Express."