Skip to main content

Interaction format

Feennex API comprises several main entities:

  • Payment is used to accept payment from the payer. Payment contains all payment information

  • Payout is used to transfer money from the shop's account to your customers

The payment process depends on the chosen integration scenario.

Basics

The Feennex API is built on REST principles.

Each API request is associated with a specific action related to payment, or payout, such as creation or status retrieval.

Feennex API uses HTTP making it compatible with any programming language that supports HTTP libraries (for example, Requests, Httpx, Axios, Guzzle).

API endpoint: https://core.feennex.com/<API endpoint>

The API supports POST and GET requests. POST requests use JSON for arguments, while GET requests use string queries. The API always returns a response in JSON format, regardless of the request type.

When sending a request to the Feennex API, you need to specify the header "Content-Type: application/json" and generate a signature using your secret key each time. You can get the secret key in your account.

If you fail to provide mandatory parameters, the response will include an error explaining which parameter is missing from the request.

To work with the Feennex API, you can use ready-made libraries for languages like Python and PHP.

Handle responses

The Feennex API processes requests immediately and returns the processing result. The response includes the HTTP response code, standard headers, and the response body in JSON format.

Feennex returns the following parameters in the response body:

  • data contains data specific to each request. Type: object
  • error_code contains the error code. Type: number. Example: 0 – no errors. More details on possible error codes
  • result indicates whether the request is successful or not. Type: boolean. Example: true
  • message contains the error description. Type: string. Example: Ok. This parameter's value can help identify what went wrong

Response format

Response body on success

The response body is returned in the JSON format. The parameters of the response body depend on the request.

Success response

{
"data": {
"data": {
"session_id": "3067894a580242dd86e03890506a88b"
},
"id": 499564464,
"method": "GET",
"url": "https://example.com"
},
"error_code": 0,
"message": "Ok",
"result": true
}
Error response

If there's an issue with the request, Feennex returns the response body in JSON format with the error code. More about error codes

Error response for incorrect signature

{
"data": null,
"error_code": 10,
"message": "Invalid sign, string_to_sign: 500:840:card_usd:6199:99991",
"result": false
}