Upvote:3
You can both buy the bus ticket online on Flybussen's home page (NOK 189) or buy a ticket from the bus driver, but you will then have to pay a surcharge. In both cases you can pay by credit card. The bus takes about 50 minutes to reach the bus terminal in the city centre close to the main railway station.
If you get through customs around midnight, you will however have plenty of time to reach one of the last trains, which are substantially faster. There is just a couple of minutes walk from the customs exit to the train platforms. The last regular suburban train departs 23:43, is a 23 minute trip to the main railway station and costs NOK 105. There are further departures with the airport express train 23:50, 0:10, 0:30 and 0:50, which take 22 minutes and cost NOK 196. You can buy train tickets at the ticket machines at the airport and pay with credit card. Be aware of different ticket machines for the regular train and for the express train.
If you want, you can also buy train tickets in advance. Tickets for the regular train are available on Vy's home page, while tickets for the express train can be bought on Flytoget's home page. On the regular train, you can also buy a ticket from the train conductor and pay by card, but you will also there have to pay a surcharge. On the airport express train, you can also travel ticket-less by swiping your credit card at the entrance barriers when entering and leaving the train.