Book ONCF tickets online, Al Boraq high-speed train, Moroccan railway, Casablanca to Tangier train, ONCF ticket prices, Train travel MoroccoGeneral9 min read

Book ONCF Morocco Train Tickets Online | Avoid Payment Errors

Book ONCF Morocco Train Tickets Online | Avoid Payment Errors

Key Takeaway: The high-speed Al Boraq from Tangier to Casablanca takes just 2 hours and 10 minutes, costing around 200 MAD ($20) in second class. But foreign credit cards are notoriously rejected by the official state railway website. Save yourself hours of bank-fraud-alert headaches and book ONCF tickets online directly through moroccotrain.com to guarantee your seat.

The ticket machine at Casa Voyageurs blinks a red "Transaction Declined" error for the fourth consecutive time. You are holding a premium travel credit card that works flawlessly in Tokyo, London, and New York. Yet Morocco's state railway system simply refuses to accept it. Figuring out how to book ONCF tickets online as a foreigner is a notoriously frustrating rite of passage. But it really doesn't have to be.

Morocco boasts the only high-speed rail network in Africa. The trains themselves are spectacular. You glide past olive groves at 320 km/h, the air-conditioning works beautifully, and the legroom puts most domestic airlines to shame. The sole bottleneck is the digital payment gateway. Once you bypass that hurdle, riding the rails here in 2026 and beyond is an absolute joy.

Quick Overview: How to Book ONCF Tickets Online

Photograph illustrating Quick Overview: What You Need to Know at
Photograph illustrating Quick Overview: What You Need to Know at
  • Advance booking window: ONCF releases tickets up to three months ahead of your travel date.
  • Dynamic pricing: Fares for the high-speed Al Boraq increase significantly as the departure date nears.
  • Payment issues: The official ONCF site requires strict 3D Secure authentication, which frequently blocks North American, UK, and Australian cards.
  • Ticket format: E-tickets with QR codes are standard across the network. You simply scan them from your smartphone screen.
  • Luggage: There are no strict weight limits enforced. You just need to be able to lift your own bags onto the overhead racks or into the end-of-carriage storage areas.

Why Foreign Cards Fail on the ONCF Website

Photograph illustrating Why Foreign Cards Fail on the ONCF Websi
Photograph illustrating Why Foreign Cards Fail on the ONCF Websi

Moroccan e-commerce security is incredibly strict. You type in your details, wait for the one-time password, and watch the screen endlessly load before timing out. It happens every single day. The official ONCF portal uses a local payment gateway that blocks roughly 80% of North American and Australian credit cards on the very first attempt. The system flags international IP addresses combined with foreign bank identification numbers as high-risk.

TripAdvisor's Morocco travel forums are littered with desperate pleas from travelers whose cards were declined at midnight. Bank fraud departments are useless here. The block happens on the Moroccan merchant's side, not your bank's side. If you want to know How to book tickets for Morocco's Trains without tearing your hair out, you need a reliable workaround.

Third-party booking platforms bridge this exact gap. They process your payment through a Western-friendly gateway (like Stripe or PayPal) and then interface with the ONCF ticketing system on the backend. As the country ramps up infrastructure for 2026 tourism goals, the rail network is getting busier. Showing up at the station hoping for a walk-up ticket is a massive gamble. Skip the payment errors entirely and book ONCF tickets online using our guaranteed international payment gateway.

Step-by-Step: How to Book ONCF Tickets Online Effectively

If you want to book ONCF tickets online without the usual payment headaches, following a proven process is essential. First, decide your exact travel dates and routes. Remember that schedules open up three months in advance, and booking early guarantees the best dynamic pricing rates.

Second, instead of battling the state railway portal, use a reliable third-party service like MoroccoTrain. When you book ONCF tickets online through our platform, you bypass the local 3D Secure blocks entirely. Simply select your departure time, choose between first or second class, and pay securely using your standard credit card. The digital QR code ticket is delivered straight to your inbox within minutes, ready to be scanned at the station.

Al Boraq vs. Al Atlas: Choosing Your Train

Photograph illustrating Al Boraq vs. Al Atlas: Choosing Your Tra
Photograph illustrating Al Boraq vs. Al Atlas: Choosing Your Tra

The Moroccan rail network is split into two distinct experiences. Al Boraq is the shiny, bullet-nosed pride of the fleet. Al Atlas is the reliable, older workhorse. If you are traveling the Tangier-Kenitra-Rabat-Casablanca corridor, the Al Boraq high-speed train cuts travel time by more than half compared to the traditional rail network.

The Al Boraq operates exclusively on the newly built high-speed lines hugging the Atlantic coast. It is fast, silent, and aggressively punctual. The Al Atlas trains, meanwhile, connect the rest of the country. They run south to Marrakech, east to Fes and Oujda, and handle all the commuter traffic in between. If you are looking at Major Train Routes in Morocco, you will likely ride both during a standard two-week itinerary.

Comparing Morocco's Two Main Train Types
Feature Al Boraq (High-Speed) Al Atlas (Standard)
Top Speed 320 km/h 160 km/h
Primary Route Tangier to Casablanca Casablanca to Marrakech / Fes
Seat Reservations Mandatory (Included) Mandatory (Included)
Food Service Café car on board Trolley cart service
Power Outlets At every seat First class only (mostly)

Schedules for both trains are strictly enforced. The doors lock exactly one minute before departure. Check actual timetables and book Al Boraq tickets early to lock in your preferred departure time, especially on Friday afternoons when locals travel for the weekend.

First Class vs. Second Class: Is the Upgrade Worth It?

Photograph illustrating First Class vs. Second Class: Is the Upg
Photograph illustrating First Class vs. Second Class: Is the Upg

Budget travelers often ask if first-class tickets are a waste of money. In Europe, the difference is negligible. In Morocco, the upgrade completely changes your travel experience. For journeys longer than three hours, upgrading to first class on Moroccan trains costs less than a decent lunch and guarantees you a functioning power outlet and a dedicated luggage rack.

First class features assigned seating in a spacious 2+1 configuration. You get a massive window, deep reclining seats, and heavy curtains to block the intense North African sun. Second class uses a 2+2 layout. It is perfectly comfortable for short hops, but the carriages get crowded. When boarding a train from Casablanca to Marrakech Train Tickets: Schedules & Booking, second-class luggage racks fill up instantly. If you board late, your suitcase sits in the aisle.

First Class vs. Second Class Features & Pricing (Tangier to Casa)
Class Seat Layout Luggage Space Est. Fare (Advance) Action
First Class 2 + 1 (Assigned) Dedicated racks at carriage ends $30 - $35 USD Book 1st Class Tickets
Second Class 2 + 2 (Assigned) Overhead only (fills fast) $18 - $22 USD Book 2nd Class Tickets

By 2026, ONCF plans to roll out enhanced Wi-Fi across all first-class cabins, though currently, cellular data remains your best bet for connectivity. Treat yourself to the extra legroom and book ONCF tickets online in first class before they sell out.

6 Pro Tips for Booking Morocco Train Tickets Like a Local

Navigating the stations and maximizing your comfort requires a bit of insider knowledge. Here is how you travel like a veteran.

  1. Book Al Boraq early to avoid dynamic pricing. Unlike the flat-rate Al Atlas trains, Al Boraq fares operate like airline tickets. Booking 30 days out saves you up to 40% compared to buying a ticket the day before travel.
  2. Know your Casablanca stations. Casablanca has two main stations. Casa Port is for local commuter trains. Casa Voyageurs is the hub for long-distance and high-speed routes. Do not show up at Casa Port expecting to catch the bullet train to Tangier.
  3. Beware the sun glare. When traveling south from Casablanca or Rabat to Marrakech, request a seat on the left side of the train (facing the direction of travel). The afternoon sun blasts the right side of the carriage, forcing you to pull the blinds down and miss the desert scenery. Read more about the Seats of Morocco Trains to pick the best spot.
  4. Arrive 30 minutes early for luggage dominance. Train doors open about 15-20 minutes before departure. If you have a large suitcase, you want to be the first person in your carriage to claim the bottom shelf of the luggage rack.
  5. Download your PDF ticket locally. Do not rely on station Wi-Fi to load your ticket from your email. Take a screenshot of the QR code or save the PDF directly to your files. The conductors use handheld scanners that read screens perfectly.
  6. Avoid the taxi gauntlet at the station. When you arrive, aggressively ignore the touts shouting "Taxi!" at the main doors. Walk 100 meters away from the station plaza and hail a passing "petit taxi" that uses a meter. If you are heading to the Market in Marrakesh: A Tapestry of Sights & Sounds, negotiate the fare before getting in.

For a seamless experience from start to finish, read our complete guide on How to Book & Ride Moroccan Trains on Our Website.

Frequently Asked Questions

Why is my credit card declined on the ONCF website?

The official ONCF portal uses a local payment gateway that frequently blocks international credit cards due to strict security protocols and IP address filtering. This often results in transaction timeouts or immediate declines for travelers from North America, the UK, and Australia.

How far in advance can I book ONCF tickets online?

You can book ONCF train tickets up to three months in advance of your scheduled travel date. Booking early is highly recommended for the Al Boraq high-speed line to secure the lowest dynamic pricing rates.

Do I need to print my ONCF e-ticket?

No, you do not need to print your e-ticket as digital QR codes displayed on your smartphone are standard and accepted by conductors across the network. Simply ensure your device is charged and the brightness is turned up for scanning.

What is the fastest train in Morocco?

The Al Boraq is the fastest train in Morocco, reaching speeds of 320 km/h and connecting Tangier to Casablanca in just 2 hours and 10 minutes. It is currently the only high-speed rail network operating on the African continent.

Is there a luggage limit on Moroccan trains?

There are no strictly enforced weight limits for luggage on ONCF trains, though passengers must be able to carry their own bags. Most carriages provide overhead racks and dedicated luggage areas at the ends of the cars for larger suitcases.

Are train tickets cheaper if bought in advance?

Yes, ONCF utilizes dynamic pricing for its high-speed services, meaning ticket prices increase as the departure date nears and seats fill up. Purchasing your tickets several weeks in advance can save you significant money compared to last-minute station purchases.

Tags:Book ONCF tickets onlineAl Boraq high-speed trainMoroccan railwayCasablanca to Tangier trainONCF ticket pricesTrain travel Morocco