Skip to main content

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 โž•.

Generate Token

๐Ÿ–ฑ๏ธ 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:

  1. โœ๏ธ Give your token a descriptive name for easy identification ๐Ÿท๏ธ.
  2. โณ Set an token duration if you wish to limit the token's validity ๐Ÿ“†.
  3. ๐Ÿ“ Add a description to document the intended use of the token ๐Ÿ“„.

Generate Token 1

๐Ÿ”ต Step 2๏ธโƒฃ ( Token Composition )โ€‹

๐Ÿ” Learn how the token is structured ๐Ÿงฑ and what components define its behavior ๐Ÿง  and value ๐Ÿ’ฐ.

  1. Click on the โž• add composition button.

Generate Token 2

  1. ๐ŸŒ Next, select the country ๐Ÿณ๏ธ that will be linked to the token ๐Ÿ”—. For this example, we will select Ivory Coast ๐Ÿ‡จ๐Ÿ‡ฎ as the country.
info

๐Ÿ“Œ Note that you can select all available countries ๐ŸŒ from the list by clicking on the corresponding checkbox โ˜‘๏ธ.

Generate Token 3

Generate Token 4

  1. โœ… Select the methods of your choice ๐ŸŽฏ for the different operators ๐Ÿ“ถ available.

Generate Token 5

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

Generate Token 6

info

๐Ÿ–ผ๏ธ 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.

Generate Token 7

๐Ÿ”ต 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 ๐Ÿ”’.

  1. To associate numbers with the token, select a country in the dropdown and enter the phone number, then click on the โž• Add button.

Associate token 1

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.

  1. After clicking the โž• Add button, the number will be added to the list of associated numbers for that country.

Associate token 2

info
  • 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.
warning
  • 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 โ›”.

Generate Token 8

security tip

๐Ÿ” 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 ๐Ÿ—’๏ธ.

Generate Token 10

๐Ÿ” 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.

Generate Token 11

๐Ÿ“ž 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.

Manage Token Numbers

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

Manage Token Numbers 1

โŒ 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 ๐Ÿšซ.

Revoke Token

Was this page helpful?