When your startup is successful, and you are invited to speak in events, do you get paid generally?
Or, if you are invited to speak in a conference, do you ask for money?
If yes, how much on average?
It very much depends on the event.
Some don't offer any money. Many will cover attendance & travel costs. Others will offer some money on top of that. Keynote speakers may well be treated differently.
Everybody I know who speaks at events does it primarily to give back to the community, maybe with a secondary goal of marketing. Not as a money making exercise.
There are different types of speaking slots at events.
One group is keynote speakers, who are often paid (depending who the group is), because their name alone is a draw that will get people out to the conference. Most keynote speakers decide if they will ask for money or not based on how much money the conference organizer is making, and how much they want to support the group they are speaking to.
In an event with many speakers, most of the panelists and other speakers speak for free or a small honorarium/travel fees.
Typically, unless you are so special that people are coming to the conference just to hear you speak, you will at best get travel fees.