If you don't want to go with the Tica Bus, then your only option is to get your ticket the same day as the departure. For us was a bit inconvenient as we were just coming back from Islas San Blas the same day, but the guys from the transportation company told us they can have several buses per hour depending on the demand. We took the 11 PM bus and they were 3 from the same company leaving at that hour.
Cost of the bus was 20.25$ per person with arrival at 7AM. Taking time change into account.
For the bus trip, take something warm with you as it is cold inside, the seats are decently comfortable.