Be candid with them: you're sending them a gift. They need to know that to give you the information you need about how you should send them that gift.
You want to give them a nice surprise, but an out-of-the-blue present is for the times when you already understand how to handle sending them stuff. This isn't one of those times, so I don't think you should go for that. If you beat around the bush you might be left without important details you need to know if you're sending them a package.
I've been in that situation a few times in my life: I'm close friends with someone, they live somewhere else in the world entirely, and I want to get them a gift. So I've been up front with them like this:
Hey, it's your birthday in like a week or two. I've got a gift I'd like to send you, it's about this big. How can I send you that? Where should I send it to? Do I need to do anything with delivery times or signing or something to get it to you?
They'll still get a nice surprise: You telling them this at all! They'll almost certainly be surprised and appreciative to hear you're sending them something, and that's pretty great too! They can be pleasantly surprised again later by what it is, if that's still a secret, or happy to get it if the gift is known.
What this means is you get all the necessary information off them that your delivery can actually arrive safely at the right location with the right details so they can receive it properly. Sometimes they'll need you to send it to a relative or PO box depending on their mail situation at home, or there will be a specific spot it should be left to not get stolen, or an apartment complex access code the delivery company should use, etc. That's the kind of stuff you won't be told if you're not direct with them about what you're doing.
The times I've done this, I've even sent my friend a screenshot of the online delivery form (or photo if it's paper) to make sure everything looks right before I submit them to the delivery company.
They'll still be appreciative of your present (I hope). If & when you'd next like to send them an unannounced surprise present, you can do so then.
(Even when I bought a friend some notebooks, and even discussed with them the notebook they'd like, they were still delighted by the chocolate slab they didn't expect to be included in the package.)