The letters are sent by the thousands to people across the country who have written bad checks, threatening them with jail if they do not pay up.

They bear the seal and signature of the local district attorney’s office. But there is a catch: the letters are from debt-collection companies, which the prosecutors allow to use their letterhead. In return, the companies try to collect not only the unpaid check, but also high fees from debtors for a class on budgeting and financial responsibility, some of which goes back to the district attorneys’ offices.

The practice, which has spread to more than 300 district attorneys’ offices in recent years, shocked Angela Yartz when she was threatened with conviction over a $47.95 check to Walmart. A single mother in San Mateo, Calif., Ms. Yartz said she learned the check had bounced only when she opened a letter in February, signed by the Alameda County district attorney, informing her that unless she paid $280.05 — including $180 for a “financial accountability” class — she could be jailed for up to one year.

“I was so worried driving my kid to and from school that if I failed to signal, they would cart me off to jail,” Ms. Yartz said.