Enabling CRM
After installing CRM, open the.env file with any text editor and update the following variables before getting started:
LCRYPTO_HASH_SECRET_KEY: This is your hashing key. It checks data integrity and confirms that requests come from a trusted source.LCRYPTO_ENCRYPT_SECRET_KEY: This is your encryption key. It protects sensitive data by encrypting it and decrypts it when needed.
.env file. You can use the following command to generate the keys:
- Each key must be unique, so you will have to run the command twice, once for each key, to generate separate, secure values.
Generate a hashing key
Generate an encryption key
ImportantKeep your keys safe.Once generated, store your keys securely. We recommend using a Secret Manager to protect them from exposure.
Typical usage
Here’s how you can get started:Step 1 – Create the Holder
Start by creating a holder, which represents an individual or organization in the system.- To do so, use the Create a Holder endpoint.
- The API doesn’t validate the accuracy of the data.
- Supplying incorrect values (like mismatched
ledgerIdoraccountId) may result in integration failures, especially with external providers or the Ledger component.
Managing Holders
Managing Holders
You can also perform actions such as:
- List Holders – View all holders in your system.
- Retrieve a Holder – Get details of a specific holder.
- Update a Holder – Make changes to a holder’s data.
- Delete a Holder – Soft-delete or remove the user information permanently.
Step 2 – Connect the holder to Midaz using an Alias Account
Once the holder is created, use the Create an Alias Account endpoint to set up an Alias Account (a CRM-level account that represents the Midaz Account) and link the Holder to it in a single step. This link is key to:- Tracking transactions tied to the holder.
- Enabling fees, notifications, and other account-level features.
- Powering downstream flows like billing and identity verification.
Managing Alias Accounts
Managing Alias Accounts
You can also perform actions such as:
- List Alias Accounts for a Holder – View all Alias Accounts linked to a specific Holder.
- Retrieve Alias Account details – Get details of a specific Alias Account.
- Update an Alias Account – Make changes to the details of an Alias Account.
- Delete an Alias Account – Soft delete or remove the Alias Account permanently.
What happens next?
With holders properly created and linked, you can now:- Enrich CRM data with additional plugins (e.g., KYC, scoring, segmentation).
- Trigger workflows that depend on identity or organizational attributes.
- Validate or filter transactions based on person-level data.

