B2C does allow significant customization and there's possibility of downstream API integration.
That's B2C custom policies.
Right here I'm going to add a disclaimer; I'm not an expert on custom policies and they are a lot more complex than just setting up a regular out-of-the-box flow. So please keep that in mind.
That all said; the extended B2C team manage samples for customers to get going (here) and in that repo there's a sample that should be at least fairly close to what you're asking, see here