Getting Started with Finix Libraries and SDKs

A brief overview of the steps you take to initialize Finix's SDKs.


This quick start gets your environment set up quickly to start your integration into Finix. This entails:

  1. Generate an API key
  2. Install the relevant Finix library
  3. Initialize your dev environment
  4. Run your first API call.

Before you begin

You should have an account with Finix and can login to sandbox.

Step 1: Generate an API Key

Login to the dashboard and navigate to Developers > API Key.

api key page

This screen shows you your API Keys. Click on "Create an API Key" and follow the steps to create an API Key

api key create

Now copy the username and password and store them securely.

Step 2: Install Finix Library

Finix offers API Libraries for Java, Python, NodeJs, and PHP.

Initialize Java library

The Finix Library supports Java 1.8+.

If using maven, add the following to your project's pom.xml

Copy
Copied
<dependency>
  <groupId>com.finix</groupId>
  <artifactId>finix-java</artifactId>
  <version>0.0.1</version>
</dependency>

For Gradle, add the following to your project's build.gradle.

Copy
Copied
implementation 'com.finix:finix-java:0.0.1'
Initialize Python library

The Finix Library supports Python 3.6+.

Install the library using PyPi.

Copy
Copied
pip install --upgrade finix
Initialize TypeScript library

The Finix Library supports Node.js 16+r.

Install the library using NPM.

Copy
Copied
npm install --save @finix-payments/finix

Step 3: Initialize dev environment.

With an API key and installed library, you can start coding. To begin, initialize the client in your project

JavaPythonjs
Copy
Copied
import com.finix.finix-java.FinixClient;
import com.x.finix-java.model.*
finixClient= new FinixClient("USsRhsHYZGBPnQw8CByJyEQW","8a14c2f9-d94b-4c72-8f5c-a62908e5b30e", Environment.SANDBOX);
// For Java you need to set the API Version
finixClient.addDefaultHeader("Finix-Version","2022-02-01");
Copy
Copied
import finix
from finix.configuration import Environment, Configuration
from finix.models import *        
# finix.models is intended for wildcard import, feel safe to import all predefined models at once

config = Configuration(
    username = 'ENTER_YOUR_USERNAME',
    password = 'ENTER_YOUR_PASSWORD',
    environment = Environment.SANDBOX
)

client = finix.FinixClient(config)
Copy
Copied
import {Client, Environment, Models} from '@finix-payments/finix';

const userName = 'USsRhsHYZGBPnQw8CByJyEQW';
const password = '8a14c2f9-d94b-4c72-8f5c-a62908e5b30e';

const client = new Client(userName, password, Environment.Sandbox);

Step 4: Run your first API call.

With the library initialized, you can test it out with an initial API call. Let's create a simple Identity since it is the root of many flows in finix.

JavaPythonjs
Copy
Copied
CreateIdentityRequest createIdentityRequest = 

Identity identity = finixClient.Identities.create(CreateIdentityRequest
    .builder()
        .entity()
            .firstName("Jane")
            .lastName("Doe")
            .email("user@example.com")
        .build()
    .build()
);
Copy
Copied
identity = client.identities.create(create_identities_request = CreateIdentitiesRequest(
  first_name="Jane",
  last_name="Doe",
  email="user@example.com"
))
Copy
Copied
const createIdentityRequest: Models.CreateIdentityRequest = {
    entity: {
        phone: "7145677613",
        firstName: "Jane",
        lastName: "Doe",
        email: "user@example.com"
    }
}
const identity = await client.Identities.create(createIdentityRequest);

Next Steps

With your local environment set up, you can integration into Finix. Check out our integration overview for a wholistic view of the Finix integration.