In the 1830s, British merchants were smuggling opium into China against Chinese prohibitions, a trade The National Archives' own teaching resource describes as "Great Britain's opium smuggling" (https://www.nationalarchives.gov.uk/education/resources/hong-kong-and-the-opium-wars/). In March 1839, opium was delivered up to Chinese officials at Canton. Britain answered by sending an expedition, the First Opium War.
China lost, and the peace terms read like an invoice. The Treaty of Nanking, signed on board the British warship Cornwallis on 29 August 1842, made China pay:
- $6 million for the opium handed over at Canton, which the treaty calls a "ransom" for the lives of British officials and merchants.
- $3 million for debts owed to British merchants.
- $12 million for the cost of the British expedition sent against it.
That's $21 million in total, paid in instalments by 1845, with 5% interest on any late payment. British forces kept islands as collateral until the money was paid. China also had to cede Hong Kong island "in perpetuity", open five ports to British merchants and end the system that had controlled foreign trade at Canton.
In short, the country that tried to stop a drug trade was billed for the drugs, the traders' debts and the war fought against it. Those are the terms on the page.