A dispute arose after nearly a third of the country's welfare beneficiaries faced problems when a government agency failed to secure new terms before the contract expired this month.
Judge Johan Froneman of the Constitutional Court ordered the Social Security Agency (SASSA) and the company, Cash Paymaster Services, to "ensure payment of social grants to grant beneficiaries from 1 April 2017 for a period of 12 months."
Froneman also criticised Social Development Minister Bathabile Dlamini for not showing "interest" in making sure a new contract was negotiated to avoid a lapse in payments.
The court had ruled in 2014 that the government had not followed the proper procedures in awarding the lucrative contract.
Also Read
Dlamini has been facing fierce criticism for denying there was a looming crisis, with opposition lawmakers calling for her resignation.
On Wednesday, President Jacob Zuma came to her defence, telling lawmakers in parliament that "there is no crisis".
The payments are pivotal in South Africa, a country of 56 million people where poverty is widespread.
Analysts say the payouts, particularly in rural areas, help the governing African National Congress (ANC) maintain its support.
South Africa is scheduled to hold its next general election in 2019.
Disclaimer: No Business Standard Journalist was involved in creation of this content