Plenty of dogs are toilet trained successfully in flats and houses without gardens. The method is the same; the logistics are harder.
What is the main difficulty?
Time. In a house with a garden, you open a door. In a flat on the third floor, every trip involves a lead, shoes, keys, a lift or stairs, and several minutes.
With a puppy needing out every hour, that becomes a substantial part of the day, and the temptation to stretch intervals is exactly what slows training.
Plan for it before the puppy arrives rather than discovering it afterwards.
How do you manage the vaccination period?
Carry the puppy down rather than letting it walk on communal ground, which may have been used by unvaccinated dogs.
Find a spot that is genuinely yours or unlikely to have been used by other dogs: a private balcony, a courtyard, or an area you can be confident about.
Ask your vet what they consider acceptable locally, since risk varies with how many dogs use the area.
Should you use pads or a grass tray?
A real or artificial grass tray on a balcony is generally better than pads, because it transfers to grass outside more easily and does not teach a preference for absorbent fabric.
Artificial grass patches need cleaning thoroughly and frequently, or the dog will stop using them.
If you use pads, keep them in one consistent place and plan the transition outdoors from the start rather than dealing with it later.
How do you choose an outdoor spot?
Somewhere consistent, close to the entrance, and away from where people walk or children play. Consistency helps the dog considerably, since the scent marks the spot.
Take the same route each time. A predictable journey helps the dog understand what is happening and reduces distraction.
Pick up immediately, every time, which matters more in shared spaces than anywhere else.
What about lifts and stairs?
Introduce a lift gradually, since the moving floor unsettles many dogs. Feed treats inside with the doors open before using it.
Carry very young puppies and long-backed breeds down stairs rather than letting them descend, which loads developing joints and spines.
Factor in the time. A puppy that needs to go urgently may not make it down three flights, so go earlier rather than waiting for a signal.
What if there is genuinely no outdoor access?
An indoor toileting area is a legitimate solution for some households, particularly where mobility limits how often you can get out.
Set it up in one consistent place away from food, water and bedding, use a proper tray, and reward using it exactly as you would outdoors.
Be aware that a dog trained indoors will need retraining if you later move somewhere with a garden.
Does it affect the timeline?
Usually a little, mainly because trips are less frequent than they would be with a garden. Being rigorous in the first fortnight compensates for a great deal.
What about communal areas?
Check your lease or tenancy for rules about dogs in shared spaces, and be scrupulous about picking up, since complaints from neighbours are the most common cause of problems.
Avoid letting a dog toilet immediately outside an entrance or on planted areas residents use, and rinse the spot occasionally if it is on paving.
Does it get easier?
Considerably, once the dog is adult and can hold on for several hours. The intensive phase is the first few months rather than the whole of ownership.
What about night trips?
Harder without a garden, and worth planning. Keep a coat, shoes and a torch by the door, and take the lead and keys out the night before.
A puppy that needs going out twice a night from a third-floor flat is a genuine commitment, and it is worth knowing that before choosing a young puppy over an adult dog.
Plenty of well-trained, entirely reliable dogs live in flats. It takes more organisation in the first months and stops being an issue once the dog is grown.