Associated Subaccounts
The generation of subaccounts associated with a main Uelz account allows this main account to have control over the information of the connected accounts.
Example of use: A gym management software (main account) connects the Uelz accounts of each of the gyms (associated accounts) to obtain information about the transactions that occur in each of these subaccounts.
Steps to associate accounts with a main Uelz account
Before starting, the main business must be registered on Uelz.
Step 1: Obtain API-key and organization-id from the main account
This step is necessary to authenticate calls to uelz's public API.
The API-key and organization-id data of the main account are found in the configuration/api section of the uelz dashboard.
Step 2: Creation of associated subaccounts
To create a uelz account associated with a main account, a post request must be sent through uelz's public api.
Url: https://papi.demo.uelzpay.com/organizations/platform-user
The header must include the api-key and the organization-id obtained in step 1.
The body must send the data of the company we want to create and associate with our account.
{
"name":"marta",
"surname":"fernandez",
"email":"[email protected]",
"prefix":"+34",
"phone_number":"644556776",
"company_name":"marta's company",
"domain":"www.martascompany.com"
}
Step 3: Send registration email to the associated account
Once we receive the data, we send an email to the provided address for the suborganization to complete los pasos de registro steps. ( link de registro para el cliente)
Step 4: Response with user-api-key and user_organization_id
In the response of the request, we will send the following information regarding the suborganization:
{
"user_api_key": "clqdo0v270026mm01uo4ej85r",
"user_organization_id": "clqdo0v26001zmm01mfr20dxf"
}
With the user_api_key, the integration of the suborganization's widget can be performed. to do this, the following script must be copied into the header of the domain where the widget will be integrated.
<aside>
<img src="/icons/window_lightgray.svg" alt="/icons/window_lightgray.svg" width="40px" /> <script defer src="https://uelzpay-widget-cdn-demo.vercel.app/v1.0.0/uelz-widget.js?*`<uelz-api-key>`*&uelz-api-url=https://widget.demo.uelzpay.com"></script>
</aside>
Updated 8 months ago