Thank you for posting on the PayPal Sandbox Community.
If you are using Partner's API, you need to make sure that your app has been granted permissions to process partner payments. If your app is not a Partner App, you cannot onboard sellers.
Here is the information on how to create a partner app:
After you have created an app with Partner Permissions, you can onboard sellers in Sandbox.
Here is a listing of sample code:
Here is PayPal's Demo Site with SDKS and demo working API (If you click API History as you go through the demo you can see the code):
Thank you ,