SpaceX also plans to repurchase up to $500 million (£411.79 million) in common stock as part of the deal.