The integration of FedaPay’s payment solution relies on sending HTTPS requests to its servers. To ensure that your platform functions correctly in both test and production mode, it’s essential to understand how these requests should be structured, and what responses you can expect.
When you interact with the FedaPay API, your HTTPS requests must follow a specific structure to be processed correctly. FedaPay provides two environments: a test environment and a live environment. Each environment has its own set of API keys (test and live), and each API key must be used according to the environment in which you are operating.
The FedaPay API supports several HTTP methods, the main ones being :
POST : To send data and create new resources (e.g. a new transaction).
GET : To retrieve existing information or resources (e.g. transaction details).
PUT : Used to update an existing resource with new information (for example, to update transaction details).
DELETE : Used to delete an existing resource (e.g. cancel a transaction).
Used to perform tests with no real impact on your account.
Used to perform tests with no real impact on your account.
Used to process real transactions.
You must include your API key in the HTTP header of each request. Depending on whether you’re in test or live mode, you’ll use one of two keys:
Authorization: Bearer YOUR_API_KEY
Before switching to Live mode, we recommend that you test your integration in test mode. This mode allows you to simulate various payment operations without carrying out any real transactions. You need to create a test account, and use the test API keys to address your requests to the test environment.
Test API keys: These keys can only be used on the test server.
Test transactions: Simulate transactions with fictitious cards and phone numbers to see how your system reacts.
Once you’ve validated your tests, you can go live with your API keys. This mode enables you to carry out real transactions with your customers.
To test your integration, FedaPay provides you with card numbers and telephone numbers to simulate successful and failed payments. You should use these numbers in test mode only.
Numéro | Type de carte | Scénario |
---|---|---|
4111111111111111 | Visa | Succès |
4242424242424241 | Visa | Échecs |
5555555555554444 | Mastercard | Succès |
4242424242424242 | Visa | Echecs |
Numéro | Type de carte | Scénario |
---|---|---|
4111111111111111 | Visa | Succès |
4242424242424241 | Visa | Échecs |
5555555555554444 | Mastercard | Succès |
4242424242424242 | Visa | Echecs |
Numéro | Opérateur GSM | Scénario |
---|---|---|
64000001 | MOOV Bénin | Succès |
64000000 | MOOV Bénin | Échecs |
Every request you send to the FedaPay API receives a response, whether you’re in test or live mode. These responses are formatted in JSON and contain important information about the result of your request.
A successful response is usually an HTTP 200 code, and includes details of the resource created or consulted.
If an error occurs (wrong API key, ill-formed request, etc.), the API returns a specific error code (for example, 400, 401, 404, 500).
For optimum management of your transactions, here are a few recommended practices in the event of errors:
400 Bad Request: Check that your parameters are properly formatted and comply with API specifications.
401 Unauthorized: Make sure you’re using the correct API key (test or live) and that it’s valid.
404 Not Found: Check that the URL you are using is correct and that the resource exists.
500 Internal Server Error: These errors originate from the FedaPay API. If they persist, please contact support.
Rigorously testing your integration with FedaPay before going live is essential to ensure smooth operation. Use the appropriate API keys, follow the request structure and take into account API responses to ensure successful integration.
The integration of FedaPay’s payment solution relies on sending HTTPS requests to its servers. To ensure that your platform functions correctly in both test and production mode, it’s essential to understand how these requests should be structured, and what responses you can expect.
When you interact with the FedaPay API, your HTTPS requests must follow a specific structure to be processed correctly. FedaPay provides two environments: a test environment and a live environment. Each environment has its own set of API keys (test and live), and each API key must be used according to the environment in which you are operating.
The FedaPay API supports several HTTP methods, the main ones being :
POST : To send data and create new resources (e.g. a new transaction).
GET : To retrieve existing information or resources (e.g. transaction details).
PUT : Used to update an existing resource with new information (for example, to update transaction details).
DELETE : Used to delete an existing resource (e.g. cancel a transaction).
Used to perform tests with no real impact on your account.
Used to perform tests with no real impact on your account.
Used to process real transactions.
You must include your API key in the HTTP header of each request. Depending on whether you’re in test or live mode, you’ll use one of two keys:
Authorization: Bearer YOUR_API_KEY
Before switching to Live mode, we recommend that you test your integration in test mode. This mode allows you to simulate various payment operations without carrying out any real transactions. You need to create a test account, and use the test API keys to address your requests to the test environment.
Test API keys: These keys can only be used on the test server.
Test transactions: Simulate transactions with fictitious cards and phone numbers to see how your system reacts.
Once you’ve validated your tests, you can go live with your API keys. This mode enables you to carry out real transactions with your customers.
To test your integration, FedaPay provides you with card numbers and telephone numbers to simulate successful and failed payments. You should use these numbers in test mode only.
Numéro | Type de carte | Scénario |
---|---|---|
4111111111111111 | Visa | Succès |
4242424242424241 | Visa | Échecs |
5555555555554444 | Mastercard | Succès |
4242424242424242 | Visa | Echecs |
Numéro | Type de carte | Scénario |
---|---|---|
4111111111111111 | Visa | Succès |
4242424242424241 | Visa | Échecs |
5555555555554444 | Mastercard | Succès |
4242424242424242 | Visa | Echecs |
Numéro | Opérateur GSM | Scénario |
---|---|---|
64000001 | MOOV Bénin | Succès |
64000000 | MOOV Bénin | Échecs |
Every request you send to the FedaPay API receives a response, whether you’re in test or live mode. These responses are formatted in JSON and contain important information about the result of your request.
A successful response is usually an HTTP 200 code, and includes details of the resource created or consulted.
If an error occurs (wrong API key, ill-formed request, etc.), the API returns a specific error code (for example, 400, 401, 404, 500).
For optimum management of your transactions, here are a few recommended practices in the event of errors:
400 Bad Request: Check that your parameters are properly formatted and comply with API specifications.
401 Unauthorized: Make sure you’re using the correct API key (test or live) and that it’s valid.
404 Not Found: Check that the URL you are using is correct and that the resource exists.
500 Internal Server Error: These errors originate from the FedaPay API. If they persist, please contact support.
Rigorously testing your integration with FedaPay before going live is essential to ensure smooth operation. Use the appropriate API keys, follow the request structure and take into account API responses to ensure successful integration.