Which of the following sentences uses the correct punctuation?

A.
Ted's bike had a flat tire so, he could not ride with his friends.

B.
Ted's bike had a flat tire so he could not ride with his friends.

C.
Ted's bike had a flat tire, so he could not ride with his friends.

D.
Ted's bike had a flat tire, so, he could not ride with his friends.

The correct sentence is option B:

Ted's bike had a flat tire so he could not ride with his friends.