Customer Management
Managing customers is an essential step when conducting transactions via the FedaPay platform. Each transaction is linked to a customer, so you must register and manage your customers in the system before initiating any transactions.
Creating Customers
Creating a customer in FedaPay is done via an API request, allowing you to add the necessary information about your customer. This data is used during transactions to clearly identify the user.
Required Parameters
When creating a customer, you need to provide the following information:
-
First Name (firstname): The customer’s first name.
-
Last Name (lastname): The customer’s last name.
-
Email (email): The customer’s email address, which will be used for all communications and confirmations.
-
Phone Number (phone_number): Optional, but helpful for certain transactions (must include the country code, e.g., +229 for Benin).
These details, except for the phone number, are mandatory. However, it is recommended to provide all information to enhance the tracking of customer interactions and payments.
Example API Request for Creating a Customer
To add a new customer, send a request to the FedaPay API. Below are examples in various programming languages:
Important Points
-
Be sure to replace YOUR_SECRET_API_KEY with your actual secret API key.
-
The API endpoint may vary depending on the environment. Use https://api.fedapay.com/v1/customers for the live environment.
Tracking Customer Transactions
Once your customers are created, you can monitor their information and make updates or deletions as needed.
Retrieve the List of Customers
To get a complete list of customers registered on your FedaPay account, send a simple request to the API. This allows you to view all available customers, review their details, and track their transactions.
Example request to retrieve customers
Updating Customer Information
Sometimes, you may need to update a customer’s information (e.g., an incorrect email address or phone number). To do this, provide the customer ID and the updated information.
Example of Updating a Customer
Deleting a Customer
If a customer is no longer active or you wish to remove their data from your FedaPay account, you can use an API request to delete their information.
Example of Deleting a Customer