Skip to main content

Get started with API

Connection flow

Before integration, you need to complete several steps:

  1. Create a Feennex account and shop

  2. Verify your shop

  3. Get your secret key and configure allowed IP addresses

  4. Set up signature generation in your system

  5. Integrate with Feennex via API

Create Feennex account and shop

Feennex account

If you don't have a Feennex account, register and complete the verification process. Now you can proceed to create a shop.

Feennex shop

Create a new shop. You will send requests to Feennex on behalf of this shop. Specify the name of your shop and its URL. Click Create shop.

After creation, you will see the shop confirmation page.

Shop Confirmation

Please note! You can complete this step later. To do so, click Skip. You can confirm the shop later in the Shops section of your personal account.

To request activation of your shop and connect payment methods, verify your domain.

In your dashboard under Shops, click on Confirm shop. Download the special file and place it in the root directory of your website on your server or hosting. The file should be accessible for download. Example: http://yourwebsite.com/fnx_0123.txt. Click Confirm.

If everything goes well, your website will be sent for verification. You can contact support for more details.

If the file was added incorrectly, or server/hosting settings prevent the file from being downloaded via the provided link, you will see a notification Unfortunately, we wasn't able to verify your shop. Follow the recommendations in the notification or contact support.

If the verification is successful, the settings page for the created shop will open.

You will see the settings page for the created shop. On this page, you can manage the created shop:

  • Change parameters and settings necessary for payments and payouts
  • View available payment directions and payout ways
  • Manage security settings

Set up Feennex shop

On the settings page of your created shop, fill in the input fields:

  • Notification URL – the URL where Feennex sends notifications about successful payments

  • Rejected Notification URL – the URL where Feennex sends notifications about rejected payments

  • Success URL – the URL where Feennex redirects the payer after a successful payment

  • Failed URL – the URL where Feennex redirects the payer after a failed payment

Check the box next to Check uniqueness of payments during invoice creation. If checked, the order number on your side (parameter shop_order_id) must be unique for each payment.

Feennex assigns a unique identifier shop_id to your shop. It will be needed for making payouts.

Security settings

The Security section in your dashboard contains settings for your secret key and a list of allowed IP addresses.

Secret Key

You can generate a secret key in your dashboard or specify your own.

If you want to use your own secret key, make sure it meets the following criteria:

  • 8 characters long
  • At least one digit
  • Сontains, uppercase and lowercase letters

Don't share your shop's secret key with anyone. This key confirms that operations are made on your behalf.

Allowed IP Addresses

In the IP Addresses section in the input field, you need to enter the IP address from which you will send requests to Feennex. Then click on the + (plus) button.

If you have multiple IP addresses, you can add them all at once. Use ; (semicolon) as a separator.

Generate signature

For each request, you need to generate a signature using your secret key and send it in the sign parameter.

The secret key is responsible for the security of your data. Keep it in a secure place and don't publish it on third-party resources. You can obtain the secret key in your dashboard in the shop settings.

How to generate a signature

Step 1. Sort all the required parameters alphabetically, convert them to string data type, and concatenate them into one string. Use : (colon) as a delimiter. Append your secret key to the end of the string without the : sign.

Note: Some parameters require special attention:

  • The mandatory parameter email shouldn't be included in the string

  • When generating a signature for the amount parameter, send one decimal place for whole amounts or if the fractional part is a multiple of 10, for example 12.0. For other amounts, use two decimal places, for example 12.01

Example of combining parameters into one string for a request to create a payment:

{amount}:{currency}:{payway}:{shop_id}:{shop_order_id}{secret_key}

Replace the curly braces with the values of the parameters being passed. The number of parameters in your request may vary.

Example of the resulting string

12.34:840:bank_usd:5:4126SecretKey01

Step 2. Calculate the SHA256 hash of the concatenated string.

Example HEX representation of the signature

6e99ea937bea47c8a996b6462e04304925c82f205bad21bf44917d36fe016923

You can use an online service for online verification.

Example of generating a signature in Python:

# Required request parameters for generating a signature

secret = 'SecretKey01'
data_required = {
'amount': '12.34',
'currency': '840',
'payway': 'card_usd',
'shop_id': '5',
'shop_order_id': '4126',
}

# Additional request parameters. They aren't involved in generating the signature

data_add = {
'email': '[email protected]',
}

key = ':'.join([data_required[key] for key in sorted(data_required)]) + secret
sign = hashlib.sha256(key.encode()).hexdigest()

Step 3. Send the obtained value in the request in the sign parameter.

Example of generating a signature for the Create payment endpoint

{
"currency": "840",
"sign": "c438896efecd63",
"payway": "bank_usd",
"amount": "12.34",
"shop_id": "5",
"shop_order_id": 4126,
"description": "Payment for order #123"
}

Integration with Feennex via API

After completing the previous steps, you can proceed with the integration. It depends on the integration scenario you want to use.