Register a user as part of a Commerce checkout?
Luke's answer above is absolutely right and the simplest approach, but as I commented above, I wrote a plugin for this:

https://github.com/bossanova808/CommerceRegisterOnCheckout

..the reason being that I wanted to integrate registration during the checkout, not after as Luke has done above.  And the motivation for this is that site registration rates plummet (like, by 80%+ in my totally anecdotal data/experience) - if the registration comes AFTER checkout.  We get a MUCH higher rate of people joining (which has all sorts of business benefits for us) - if we integrate it right IN to the checkout flow.  I can't say why that is precisely, but it seems like most folks mentally check out (excuse the pun) the moment they hit 'Submit Order'....

So I wrote the above to allow a more integrated approach, which does much as what you describe - there's an ajax POST but it's during the payment part of the process (i.e. the actual checkout but), and the user is then registered &amp; logged in (and can e.g. be taken then automatically to their orders summary page).  If there is any failure in registration (e.g. they've forgotten they registered before) - we handle that and present whatever we need to (including possibly a pre-filled registration form for them to have another go with).

(BTW I agree - this should definitely be supported by Commerce in core).