You’ll be happy to know that foreigners have the same rights when buying a property or purchasing land in Costa Rica as the locals do. You can own the property outright in your own name or in the name of your corporation. The one exception that may apply is when the property is located in the Maritime Zone. Which may apply to the first 200 m from the high tide line. This is also called “Concession Land” where special rules apply.
If you decide to go ahead and purchase a concession property, consult with an attorney to make sure the seller has the rights to occupy the land and is in a position to offer you the rights to that land. The land use rights can range anywhere from 5 to 40 years although most concession properties offer 20-year occupancy rights. Be clear that you are essentially signing a long-term land lease not purchasing the property in fee simple. This structure is similar to the Native land leases that are available in Canada and the United States. This usually applies to land on the lake shores or protected areas.