Generate Token
The Generate Token section allows you to create a token for secure transactions and API access in the ClaPay Back Office ๐.
This token is essential for authenticating your requests and ensuring the security of your operations ๐ก๏ธ.
๐งพ What is a payment token?
โA payment token is a secure API key ๐ that enables you to integrate payment functionalities into your applications or systems ๐ป.
It acts as a digital identity to authenticate your requests to our payment API ๐.
โ Advantages of payment tokens
โ- ๐ก๏ธ Enhanced security: Tokens enable you to carry out transactions without exposing your login details.
- ๐ฏ Access control: You can create tokens with specific permissions for different functionalities.
- ๐ Traceability: Each token can be individually tracked and revoked in the event of compromise.
- โ๏ธ Simplified integration: Easily integrate our payment services into your applications.
โ๏ธ How to generate a token
โ๐ Create a new token
โClick on the Create a new API token button above โ.

๐ฑ๏ธ Once you have clicked on this button, a new page will appear ๐ where you can enter the information relating to the token ๐. This includes the name ๐ท๏ธ of the token, the validation period โณ, and a description ๐ for the token that will be generated.
๐งพ Fill in the required fields
โ๐ต Step 1๏ธโฃ ( Token Infos )โ
When creating a new token, you will need to fill in the following fields:
- โ๏ธ Give your token a descriptive name for easy identification ๐ท๏ธ.
- โณ Set an token duration if you wish to limit the token's validity ๐.
- ๐ Add a description to document the intended use of the token ๐.

๐ต Step 2๏ธโฃ ( Token Composition )โ
๐ Learn how the token is structured ๐งฑ and what components define its behavior ๐ง and value ๐ฐ.
- Click on the โ add composition button.

- ๐ Next, select the country ๐ณ๏ธ that will be linked to the token ๐. For this example, we will select Ivory Coast ๐จ๐ฎ as the country.
๐ Note that you can select all available countries ๐ from the list by clicking on the corresponding checkbox โ๏ธ.


- โ Select the methods of your choice ๐ฏ for the different operators ๐ถ available.

- Next, click on the โ save button, and a page like this will appear.

๐ผ๏ธ The following image shows the case where we add a new composition for the country Mali ๐ฒ๐ฑ.
Now suppose we want to delete one or more methods linked to operators for a particular country ๐, an operator with its methods, or even the entire composition for that country. Simply hover over the corresponding card ๐, then use the delete buttons โ to remove what you want.

๐ต Step 3๏ธโฃ ( Associate numbers with the token ) : Optionalโ
You can associate one or more phone numbers ๐ฑ with a token ๐. This is optional, but it can be useful for testing payments when integrating the API, and help you better manage and track token usage ๐.
The phone number whitelisting feature allows you to restrict payments initiated via a token to a list of authorized numbers.
This adds an extra layer of security by ensuring that only transactions involving these specific numbers are processed when using the token ๐.
- To associate numbers with the token, select a country in the dropdown and enter the phone number, then click on the โ Add button.

Example: If you select Ivory Coast ๐จ๐ฎ as the country and enter the phone number +22507070707, only transactions involving this number will be processed when using the token.
- After clicking the โ Add button, the number will be added to the list of associated numbers for that country.

- You can add multiple numbers for the same country by repeating the process.
- Only countries that are part of the token composition will be available in the dropdown list for associating numbers.
- You can also add phone numbers to the token later, in case any were omitted during the initial token creation.
- One or more phone numbers associated with a token can be temporarily disabled without being deleted, allowing you to reactivate them later if needed.
- Additionally, a phone number can only be associated with one token at a time.
๐ Generate the token
โFinally, click on Generate button to generate your token ๐๏ธ.
๐ Copy the token
โCopy the generated token and store it securely ๐๏ธ. You will not be able to view it again after this step โ.

๐ Treat your tokens like passwords. Never share them or store them in publicly accessible files. Revoke any compromised token immediately โ ๏ธ.
๐ List of generated tokens
โThis table displays all the tokens you have generated, along with their details:
- ๐ท๏ธ Name: The name you assigned to the token.
- ๐ Created At: The date and time the token was created.
- ๐ Expiry Date: The expiration date of the token (if set).
- ๐ Status: The current status of the token (ACTIVE or EXPIRED).
- ๐งฉ Composition: The composition of the token ๐งฌ.
- ๐ข Associate numbers with the token (optional): The numbers linked to the token ๐ข.
- โฑ๏ธ Last Date Used: The last date and time the token was used.
- ๐ Description: A brief description of the token's intended use ๐๏ธ.

๐ View token details
โIn the table displaying the list of generated tokens ๐, you can view the details of each row ๐ by clicking on the View ๐ button in the corresponding Composition column.

๐ Manage token-associated numbers
โYou can manage the phone numbers associated with a token by clicking on the ๐ Manage button in the corresponding column of the table.

This will open a modal where you can view, add, disable, or remove phone numbers associated with the token for each country ๐.

โ Revoke a token
โIf you want to revoke a token, simply click on the Delete icon ๐๏ธ button in the corresponding row of the table.
This will open a confirmation modal to confirm the revocation of the token.
Once you confirm, the token will be revoked and can no longer be used for authentication or transactions ๐ซ.

Was this page helpful?