The Create User integration allows you to automatically grant new users access to the membership area on your site. This is a built-in integration, you can set this up directly from the Integrations tab in the Product Settings.
How To Set Up A Create User Integration
Go to the Integrations tab in your Product Settings and select Create User from the Services menu. Then select the level of access you want to give your customer from the New User Role dropdown.
In the example below the following will occur from the settings chosen. When a product is purchased with any payment plan a new user is added as a subscriber to the website.
How To Add User Registration Fields To The Checkout Page