Lord Castlereagh, the British Foreign Secretary, did not agree to stop the attacks on American merchant vessels in June 1812. In fact, by that time, the United States had already declared war on Great Britain, primarily due to grievances over British impressment of American sailors and trade restrictions. The British government continued to seize American ships and engage in naval battles with the United States throughout the War of 1812, which lasted until 1815.
It is possible that you are referring to an earlier period in the diplomatic relations between the United States and Great Britain, which were strained in the years leading up to the war. In 1807, the British government had passed the Orders in Council, which were a series of trade restrictions that hurt American commerce. In response, the United States passed the Embargo Act of 1807, which banned American ships from trading with foreign ports. This hurt the American economy and was unpopular with many Americans.
In 1812, the British government partially repealed the Orders in Council, which helped to alleviate some of the tensions between the two countries. However, the United States still went ahead with its declaration of war, as other grievances remained unresolved, such as British impressment of American sailors and support for Native American tribes fighting against the United States.