We do this with one of our apps (which provides ecommerce). Most customers just have a sub-domain specific account. For those, we have a wildcard certificate.
Some customers have, like you mentioned, custom domains. For those, we require that they purchase the certificate (we recommend GoDaddy because they are cheapest) for their domain. We then provision a new IP address and configure nginx accordingly.
You also have to make sure they are pointing their domain via an A RECORD and not a CNAME (otherwise, it won't hit the right IP).
We host are app on EngineYard so they help out quite a bit.
But, yes, if you're planning on having hundreds or thousands of users with custom domains, that could become a hassle. You may want to look into some type of hybrid setup where non-SSL pages are served via the custom domain but use a generic application domain (with subdomain) for SSL stuff. Like:
http://customdomain.com and http://customdomain.com/contact
and then
https://client.generic.com/purchase