Juul's 1,500 employees are getting a $2 billion bonus from Altria, averaging about $1.3 million each, as part of the tobacco giant's $12.8 billion investment in the e-cigarette maker, people familiar with the matter told CNBC.

The bonus is being paid out as a special dividend as part of the deal, which was announced Thursday.

How much employees get depends on a number of factors, including how long they've been with the company and how much stock they own, another person briefed on the terms said.

Juul is receiving the lump sum payout as part of the deal and has decided to share it with its staff, one of the people said.

Altria's 35 percent stake values Juul at $38 billion.

WATCH: How Juul made vaping cool and became a $15 billion e-cigarette giant