API keys
You can create API keys on behalf of your merchants. Store them securely to authenticate your merchants when using the FlexFactor APIs
API Keys Endpoints
| endpoint | link to documentation |
|---|---|
| POST /v1/merchants/{mid}/api-keys | Create an API key |
Creating a key is the only API key operation on the public APIGetting, listing, updating, and deleting API keys through the API are not currently available.
General Information
The API Key management API lets you create credentials for the merchants in your partner account. It is RESTful and uses the POST method.
The target merchant is specified in the URL path (mid), and the key details are sent in the message body.
Endpoints
| Sandbox testing | https://api-sandbox.flexfactor.io/v1/ |
| Production environment | https://api.flexfactor.io/v1/ |
The sandbox environment is completely isolated for testing purposes. Experiment freely without impacting production systems. When you’re ready for deployment, production credentials will provide access to the live system.
Do not upload sensitive or real-world financial data in the Sandbox environment.
Headers
To interact with the API Keys Management APIs, ensure the following headers are included in your requests:
| Name | Description | Request Type | Value |
|---|---|---|---|
| authorization | Every request must be authenticated. | POST | Bearer token |
| content-type | Specifies the media type of the resource. | POST | application/json |
Versioning
The API Keys Management APIs follows the versioning protocol outlined in the base API documentation.
For example, https://api.flexfactor.io/v1/merchants/{mid}/api-keys indicates version 1 of the API.
Backward-incompatible updates will increment the version number, while minor enhancements and fixes do not.
Ensure that your implementation can handle API revisions, including additional, unspecified response fields or variable response sizes.
Errors
The API Key Management API uses standard HTTP response codes to indicate success or failure. Below is a list of common response codes and their meanings:
| Response Code | Description |
|---|---|
| 201 Created | Resource created successfully. |
| 400 Bad Request | The request is malformed or missing required parameters. |
| 401 Unauthorized | Authentication failed. Provide valid credentials to proceed. |
| 403 Forbidden | Access to the resource is denied. |
| 404 Not Found | The path or HTTP method does not exist, or mid is not a GUID. |
| 500 Internal Server Error | An unexpected error occurred on the server. |
| 502 Bad Gateway | Received an invalid response from the upstream server. |
| 503 Service Unavailable | The server is temporarily unable to process the request. |
| 504 Gateway Timeout | The server timed out while attempting to process the request. |
Updated 2 days ago

