כל הקהל לוקים מלקות ארבעים אחר תפלת המנחה
שמתוך כך יתן אל לבו לשוב מעבירות שבידו:
הגה ונהגו שהנלקה אומר וידוים בשעה שנלקה וכו'All of the congregation receives 40 lashes after minchah, for from this one places on his heart to repent for his sins.
RAMA: The custom is for the recipient of lashes to say confessions at the time he is lashed and the one who lashes says "and He who is merciful atones for sin", etc.
EDIT: while many Rabbis and even certain groups turned it into a Minhag, it clearly appears that it is not the Halacha that obligates all, as it was once (as Rem"A agrees), and I never saw it performed in [most] Israeli Haredi communities.
When and why did we stop following this Halachah?