Persistent stomach pain since binging on onion dip. Had been in refrigerator and used as snack by others. Contaminated?

Gas or lactose. Probably gas or lactose intolerance if the dip had milk fortified sour cream. Food poisoning ("contamination") would cause profuse nausea, vomiting, and diarrhea. The others eating the dip would also be affected. The pain should improve with passage of gas or a bowel movement. Make sure the cream is not molded and check the lactose content.