Traditionally an oath is either a statement of fact or a promise with wording relating to something considered sacred as a sign of verity.
You need to :
1. Seek forgiveness for breaking your oath.
2. You need to pay the penalty of breaking the oath which is feeding or clothing ten poor believers or fasting three days.
3. You must refrain from committing that sinful act again.
It is disliked ( Makrouh) to say Wallah ( By Allah) or any word with the same meaning to prove a claim if you believe that the claim is genuine. The Hadeeth says: True oaths destroys the houses.
Obviously, false oath is a major sin and it is called the sinful immersing oath because it immerses the liar inside the hellfire.
If you thought that something happened and said Wallah, then discovered that you were not right, you did not commit a sinful act, but a disliked act. You need to inform every one who heard you that you have misunderstood.
The Qasam which is obligatory to fulfill is when you take the name of Allah in it. If you did not take the name of Allah, then such Qasam is not obligatory and no Kaffara on you if you do not fulfill it.
If he has made an oath to pay certain amount if he commits that sin, it becomes obligatory on him to fulfill his oath if he committed that sin, and pay that amount or what ever he can, then to pay the rest when ever he can in the future. It remains as a loan on him which must be paid as soon as he is able to pay it.
According to Ayatullah Sistani:
Question: If a person breaks his oath, what is he supposed to do?
Answer: If a person takes an oath that he will perform an act (e.g. that he will fast) or will refrain from doing an act (e.g. that he will not smoke), but does not intentionally act according to his oath, he should give Kaffarah for it, which means he should set a slave free, or should fully feed ten indigent persons, or should provide them with clothes. And if he is not able to perform these acts, he should fast for three consecutive days.
Verse number 89 of Sura al-M'idah has clearly legislated the compensation for a broken oath.
"The atonement for it is to feed ten needy persons with the average food you give to your families, or their clothing, or the freeing of a slave. He who cannot afford] any of these [shall fast for three days. That is the atonement for your oaths when you vow. But keep your oaths. Thus does Allah clarify His signs for you so that you may give thanks." (5: 89)
According o this verse, the compensation of an oath in our time would be to feed ten poor individuals or provide clothing for them. In case this is not affordable, he person must fast for three consecutive days.
The legal(Shar'ee) oath only and merely takes place by the name of Allah or His attributes like Al-Ali , Al-Azim , Ar-Rahman...
So if someone made an oath like: "I swear to Allah that I won't commit this sin" the legal oath takes place and he has to be committed to the consequences and that is the Kaffarah if he breaks his oath.