Deleting a WIX CRM Member and a Custom Database Member

So I have created a custom registration/login light box. It registers each user into the WIX CRM and into my custom MemberDetails database. This is working correctly. The users are in sync.
Now I would like to code a Delete button that would allow either the user to delete their own account (deleting them from the WIX CRM and the MemberDetails databases at the same time. So the databases can keep in sync.
Does anyone have any suggestions?