The Battle of Fatehpur was fought in March 1799, in present-day Sikar district of India, fought between the Maratha Kingdom of Gwalior and the Rajput Kingdom of Jaipur under Sawai Pratap Singh which resulted in a decisive Jaipur victory

Background
In the year of 1799, Maharaja of Jaipur was in an arrears of paying his tribute to the Marathas. Vamana Rao was ordered to invade Jaipur kingdom and collect what sums he could. Of the amount collected by Vamana, he was authorised to keep 1/16th of it and the balance was to be remitted to Maratha treasury. Vamana Rao requested General George Thomas to help him in this invasion, who initially rejected the request but later accepted on payment of handsome amount of money by Vamana Rao.

Battle

Maharaja Sawai Pratap Singh upon this gathered an army of 12000 under Rora Ramji Khawas to fight these invaders. Maharaja bestowed Siropao on Thakur Ranjit Singh ji in 1799, asking him to join Rora Ramji Khawas at his juncture.
The Rajputs were consisting of Sardars of the state, the prominent in them were Rawat Megh Singhji Rajawat, Abhey Singhji Rajawat, Ranjeet Singhji Nathawat of Chomu, Duleh Singhji Ladkhani of Kachariyawas, Raja Bahadur Singhji Chundawat, Karan Singhji Chundawat, Nath Singhji Chauhan, Budh Singhji Jhala, Bahadur Singhji Nathawat, Pahar Singhji Khangarot and Bahadar Singhji Khangarot, who advanced towards Shekhawati in 1799. They reached Fatehpur to fight the Marathas.

Herbert Eastwick Compton in his book 'A particular account of the European military adventures of Hindustan, from 1784 to 1803' writes about the account in detail and is quoted below:
For the delicate detail of accounts, and especially for crediting himself with bigger ten sixteenths, than so exact a science as mathematics legitimately allows, Vaman Rao was most admirably qualified. But the coarse and brutal preliminary of invading Jaipur territory and by force of arms coercing nation of warriors into paying tribute was quiet out of his line. Pratap Singh's army consisted of 30,000 cavalry and 18000 infantry, with numerous and well-appointed artillery. The order to compel the lord of many legions to pay up tribute quiet staggered the little quill-driving, copper-counting chief, and he immediately wrote pressing letters of Thomas urging him to assist in the proposed expedition. Thomas, however possessed with the delirium of Punjab conquest, was unwilling to enter into a campaign which he knew must prove an extended one, preferring the small but quick profits of rapid raids, and partly from this reason, and partly from prudential motives, declined the invitation. He foresaw that to put into the field a body of troops sufficient for an invasion and like the one proposed could only be accomplished with a full treasury, whereas his was as dry as the sands of his own deserts. This he explained to Vaman Rao, but the chief had become fascinated with the commission and was not to be denied. It seemed to him that if Thomas could be prevailed upon to do the fighting, he himself could cope with the accounts, and as this promised substantial pecuniary results(Jaipur being rich in resources of every kind) he pressed his proposals home, and finally send a Vakil to Thomas with the offer of a sum of money down. This argument was irresistible, and Thomas consented to accompany the chief on his expedition.Thirty decisive battles of Jaipur - Rao Bahadur Thakur Narendra Singh, Mansabdar of Jobner, Education Minister, Jaipur State - Pg 279

There is also another version that Deenaram Bohra and Aasa Ram, the two officers of the Jaipur state, were collecting the tribute from Sadani Thikanas of Panchpana Jhunjhanu and were stationed at Paras Rampura, when Bagh Singh the brother of Rajaji Khandela sought the help of 500 men from Khetree and rebelled against the State and joined hands with Vaman Rao and George Thomas who had already entered within the boundary of Jaipur State

When Lichman Singh ji, the Rao-Raja of Sikar, heard about the Maratha invasion, he appointed Med Singh to get troops sent from Jaipur at once for his succour. 

Herbert Eastwick Compton again gives a vivid and graphic description of the battle which is thought an authentic account as the crushing defeat and precipitate flight of Thomas being pursued by the Jaipur army is written in a clever way in his book. He says that Thomas and Vamana Rao's combined forces were 4000 in number. The march on Jaipur commenced early in 1799. 

As the Marathas entered Jaipur, a detachment of the troops of Jaipur retreated who were stationed on the frontier to collect revenue, and the head man of the district sent a Vakil into Thomas's camp and agreed to pay two lakhs of rupees as tribute. The offer was accepted and the Marathas resumed their marched deeper into Jaipur territory uninterrupted. 

Sawai Pratap Singh collected his troops and marched to the relief of his northwestern districts, where Thomas and Vamana Rao were relaxed and enjoying their time in Jaipur undisturbed, with a resolution to punish the Marathas and give them a battle whenever he met them. According to Compton, Jaipur army had 40000 men in their army. This number is highly exaggerated as the Jaipur force was no more than just 12000 men.

Since the Marathas had been uninterrupted till now, they were buoyed by a false sense of security, and they pushed on too far, and suddenly discovered they were cut off in the middle of a hostile country without any source of supply or base of operations to fall back upon, a disregard of military caution which involved their small flying column in a very hazardous position. This created a dilemma in Vamana's mind and he considered retreating, thinking it impossible to encounter a large force consisting of Rajputs, whose bravery was traditional. Thomas strongly opposed the retreat, reminding Vamana Rao that he had insisted of invading Jaipur in the first place. Vamana Rao was finally convinced with the argument that if he retreated without a fight, he would never be employed by Daulat Rao Sindhia again, or any other chief under his authority. Vamana agreed to risk an engagement with the Rajputs, marching to Fatehpur with a prospect of finding a supply of grain sufficient for the troops, and securing a strong defensive position.

Information of Maratha's and Thomas's approach was conveyed early to the local inhabitants of Fatehpur, who, as a measure of resistance, filled up the wells in the surrounding country, and thus rendered it waterless in the direction from which the invaders were advancing. Unaware, Thomas and Vamana Rao pushed on, only to discover the serious danger to which his force was exposed when it was too late to rectify his mistake. On the last day, they were obliged to make a forced march of 25 miles over deep sand, through which, as the long, hot afternoon wore on, the jaded troops could scarcely plough their way, their feet sinking ankle-deep into the yielding surface. As the walls of Fatehpur loomed in sight, the Rajputs was fully prepared to resist, and the last well outside its gates was just being filled up by a body of 400 men, who had been detached for the task.

The Marathas attacked the defense line at the walls of Fatehpur. The skirmish was out of stubbornness of Marathas and out of their need for water and supplies after a difficult day long march. The Rajput defense line easily defended the walls killing two of enemy officers. The Marathas retreated quick realising the impossibility of breaching the walls of Fatehpur.

After the retreat, the troops got the much needed rest and were ready for the work again next morning. Thomas desired for the city full of people to surrender. Thomas and Vamana Rao,  demanded a ransom of 10 lakh rupees. The people of the city of Fatehpur, encouraged by the hope of receiving the assistance of Maharaja Sawai Pratap Singh, who was rapidly advancing to their relief, responded by offering to pay one lakh, but negotiation did not end when the night put a stop on the negotiations. Thomas formed his troops, and stormed and captured Fatehpur next morning. As the intelligence of Sawai Pratap Singh's approach, Thomas fortified his camp and the captured city of Fatehpur in the best possible way in limited time. The Jaipur army vanguard appeared as the fortification was done.

Jaipur army encamped 6 miles away and then pushed a strong detachment of cavalry and infantry to clear the wells in his front. Jaipur army was uninterrupted for 2 days as Thomas further secured his position; but on the 2nd night, he marched out to attack the enemy's main part of the artillery with 2 battalions of infantry each 400 strong, 8 guns and 90 regular cavalry, and detached his third battalion to disperse the advance party engaged in clearing out the wells. He had kept his intentions hidden from Vaman Rao, whose troops were, in point of fact, sleeping when Thomas left the camp. The reason for this secrecy was that if he acquainted the Marathas with his scheme, the enemy Rajputs would eventually hear of it as Vamana Rao's countrymen were quiet unable to hold their own counsel, and the gossip of their camps always reached the ears of the enemy. Thomas, instead, contented himself with a letter for Vamana Rao, explaining his plan of action and requesting Vamana Rao to join him with his cavalry, and leave the infantry to guard the camp.

But as Thomas started his march, one of his tumbrels faced an accident, and its repair caused the delay so much that dawn began to break. Thomas, hence, could not carry out his original plan of surprise attack. And Thomas arrived under the sight of Jaipur main camp, and Jaipur forces assembled under arms and were ready to meet Thomas. Thomas, hence, diverted his attack and advanced against a part at the wells, which numbered about 7000 men. The Rajput resistance was strong, but soon fell back upon their main body after sustaining a considerable loss. Thomas filled the captured wells again and also captured several horses and many heads of cattle and returned to his camp. 

Thomas was now determined for a general engagement with the Rajputs, but the Rajputs had already anticipated Thomas's intentions and at daybreak, sallied out in order of battle. Thomas made his way to the battlefield. Thomas was aware that the Marathas could not be relied upon and hence left a battalion of his infantry and 4 six-pounder guns to defend the camp and protect the rear, which would otherwise be open to attack by the Rajputs. The force of Thomas consisted of 800 regular infantry and 200 cavalry. But as soon as they saw the immense Rajput army, they gave themselves up for lost, and left Thomas to fight the battle alone, nor once during the whole day did they afford him any assistance.

Result
Rajput kingdom of Jaipur enjoyed a decisive victory and Maratha invasion was repulsed successfully.

James Todd in his book Annals and Antiquities of Rajast'han, Or, The Central and Western Rajpoot States of India says:
It is gratifying to note that the picked feudal cavalry led by Thakur Ranjeet Singh ji of Chomu, a young Sirdar of 26 years of age, so heroically advanced wave after wave on the withering grape fire that even the for had high admiration for their heroic charge.

References

1799 in India
Battles involving the Rajputs