In GTA 5, there's no legitimate way to transfer money from the story mode to the online one. Rockstar Games has strict measures in place to prevent this to ensure fair play for all online players.
You can't transfer money from GTA 5's story mode to online. This is because the two are separate entities with different economies and gameplay mechanics. Trying to do so would be considered cheating and could lead to account bans or other penalties.