Site icon Hip-Hop Website Design and Development

Register a new user on wooCommerce using Rest API

So,

I am building a website in react using WordPress headless server with WooCommerce plugin.

I have found that to create a new customer, you have to use the WooCommerce API: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-customer

But this is only creating a new customer.

What I need is to let the user to be able to register its account through a signup to become a customer. So I was planning to use: https://wordpress.org/plugins/wp-rest-user/

So my use case is to have the signup pop-up coming up and entering the name, password and email and then it create an account on WordPress and the user become a customer for WooCommerce.

Do I have to do :

1- Create an account with WordPress API to register the new user.

2- Create a customer using the WooCommerce API

My concerns is that how do I make sure that the user newly created is also a new customer. I do not want to have 2 differents user.

Regards
Sebastien