Fakhar Zaman plays the ball during the 5th ODI match between South Africa and Pakistan. — AFP
The Proteas had won the toss and decided to bowl first in the decisive match with both teams having won twice in the first four games.
Medium-paced all-rounders Dwaine Pretorius and Phehlukwayo both took two wickets in a disciplined South African bowling performance.
The left-handed Zaman hit ten fours in making his first half-century after a sequence of low scores in both the Tests and the ODIs.
He was dropped on 20 when he slashed Rabada to Hashim Amla, who could not hold a sharp, chest-high chance.
Fellow left-hander De Kock went for his shots from the start of South Africa's innings and had a let-off in the third over with his score on 12 when a mis-hit against Usman Shinwari looped to cover.
But after asking for a replay, umpire Gregory Brathwaite no-balled Shinwari for overstepping.
De Kock went on to hit 11 fours and three sixes before he was again caught off Shinwari, this time off a legal delivery, with substitute Hasan Ali taking a good running catch at deep midwicket.
With the required rate reduced to less than three an over, Du Plessis and Rassie van der Dussen were untroubled in an unbeaten fourth-wicket partnership of 95, with both batsmen hitting half-centuries. Van der Dussen finished the match by hitting a straight six off leg-spinner Shadab Khan.
All five matches in the series were won by the side batting second.
South Africa made two changes from the side beaten by eight wickets in Johannesburg on Sunday, bringing in all-rounders Wiaan Mulder and Dwaine Pretorius for batsman David Miller and fast bowler Beuran Hendricks.
Mulder was a late addition to the squad after missing most of the season because of injury.
“We want to look at our all-rounders and see how they respond in this sort of situation,” Du Plessis had said.
Pakistan were unchanged.
Shoaib Malik had said he was happy to bat first in what was effectively a final. “It is a big game and if you put a score on the board it puts your opponents under pressure,” he said before the match.
Teams
South Africa: Faf du Plessis (captain), Hashim Amla, Quinton de Kock (wkt), Reeza Hendricks, Rassie van der Dussen, Wiaan Mulder, Dwaine Pretorius, Andile Phehlukwayo, Kagiso Rabada, Dale Steyn, Imran Tahir.
Pakistan: Shoaib Malik (captain), Imam-ul-Haq, Fakhar Zaman, Babar Azam, Mohammad Hafeez, Mohammad Rizwan (wkt), Shadab Khan, Imad Wasim, Mohammad Amir, Usman Shinwari, Shaheen Shah Afridi.
Umpires: Gregory Brathwaite (WIN), Adrian Holdstock (RSA); TV umpire: Paul Reiffel (AUS); Match referee: Ranjan Madugalle (SRI)