docs
NAV
cURL Java PHP Python Ruby

Guides

Overview

These guides provide a collection of resources for utilizing the Finix API and its client libraries. We offer a number of client libraries for interfacing with the API, and you can view example code snippets for each in the dark area to the right.

  1. Authentication: A quick guide on how to properly authenticate and interface with the API.

  2. Getting Started: A step-by-step guide demonstrating the basic workflow of charging a card. This guide will walk you through provisioning merchant accounts, tokenizing cards, charging those cards, and finally settling (i.e. payout) those funds out to your merchants.

  3. Push-to-Card: This guide walks through using the Visa Direct API to push payments to debit cards. With push-to-card funds are disbursed to a debit card within 30 minutes or less.

  4. Embedded Tokenization: This guide explains how to properly tokenize cards in production via our embedded iframe.

Authentication

# With CURL, just supply your username as basic auth (-u) in the header of each request as follows:

curl https://api-staging.finix.io/ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

/*
Add the following to your pom.xml (Maven file):

<dependency>
  <groupId>io.finix.payments.processing.client</groupId>
  <artifactId>finix</artifactId>
  <version>${version}</version>
</dependency>

...

<repositories>
  <repository>
    <id>oss-snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

*/

import io.finix.payments.ApiClient;
import io.finix.payments.views.*;
import io.finix.payments.forms.*;

//...

public static void main(String[] args) {

  ApiClient api = ApiClient.builder()
                  .url("https://api-staging.finix.io")
                  .user("USoYjCdingudV9KwcB6MMXW2")
                  .password("89d4f64e-3069-40d6-b9da-2de01b476a56")
                  .build();
//...



<?php
// Download the PHP Client here: https://github.com/finix-payments/processing-php-client

require_once('vendor/autoload.php');
require(__DIR__ . '/src/Finix/Settings.php');

Finix\Settings::configure([
    "root_url" => 'https://api-staging.finix.io',
    "username" => 'USoYjCdingudV9KwcB6MMXW2',
    "password" => '89d4f64e-3069-40d6-b9da-2de01b476a56']
    );

require(__DIR__ . '/src/Finix/Bootstrap.php');
Finix\Bootstrap::init();



# To install the python client run the command below from your terminal:
# pip install finix

import finix

from finix.config import configure
configure(root_url="https://api-staging.finix.io", auth=("USoYjCdingudV9KwcB6MMXW2", "89d4f64e-3069-40d6-b9da-2de01b476a56"))

# To download the Ruby gem:
# gem install finix

require 'finix'

Finix.configure(
    :root_url => 'https://api-staging.finix.io',
    :user=>'USoYjCdingudV9KwcB6MMXW2',
    :password => '89d4f64e-3069-40d6-b9da-2de01b476a56'
)

To communicate with the Finix API you’ll need to authenticate your requests via http basic access authentication with a username and password, which you can locate in your dashboard. If you do not have a dashboard feel free to test the API with the credentials below:

Your Application is a resource that represents your web app. In other words, any web service that connects buyers (i.e. customers) and sellers (i.e. merchants).

API Endpoints

We provide two distinct base urls for making API requests depending on whether you would like to utilize the sandbox or production environments. These two environments are completely seperate and share no information, including API credentials. For testing please use the Staging API and when you are ready to process live transactions use the Production endpoint.

Getting Started

Step 1: Create an Identity for a Merchant

curl https://api-staging.finix.io/identities \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "tags": {
            "Studio Rating": "4.7"
        },
        "entity": {
            "last_name": "Sunkhronos",
            "max_transaction_amount": 12000000,
            "has_accepted_credit_cards_previously": true,
            "default_statement_descriptor": "Petes Coffee",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "incorporation_date": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "business_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 8",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "ownership_type": "PRIVATE",
            "first_name": "dwayne",
            "title": "CEO",
            "business_tax_id": "123456789",
            "doing_business_as": "Petes Coffee",
            "principal_percentage_ownership": 50,
            "email": "user@example.org",
            "mcc": "0742",
            "phone": "1234567890",
            "business_name": "Petes Coffee",
            "tax_id": "123456789",
            "business_type": "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone": "+1 (408) 756-4497",
            "dob": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "url": "www.PetesCoffee.com",
            "annual_card_volume": 12000000
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.enums.BusinessType;
import io.finix.payments.forms.Address;
import io.finix.payments.forms.Date;
import io.finix.payments.forms.IdentityEntityForm;
import io.finix.payments.forms.IdentityForm;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.Identity;


IdentityForm form = IdentityForm.builder()
  .entity(IdentityEntityForm.builder()
  .firstName("dwayne")
  .lastName("Sunkhronos")
  .email("user@example.org")
  .businessName("business inc")
  .businessType(BusinessType.LIMITED_LIABILITY_COMPANY)
  .doingBusinessAs("doingBusinessAs")
  .phone("1234567890")
  .businessPhone("+1 (408) 756-4497")
  .taxId("123456789")
  .businessTaxId("123456789")
  .personalAddress(Address.builder()
  .line1("741 Douglass St")
  .line2("Apartment 7")
  .city("San Mateo")
  .region("CA")
  .postalCode("94114")
  .country("USA")
  .build())
  .businessAddress(Address.builder()
  .line1("741 Douglass St")
  .line2("Apartment 7")
  .city("San Mateo")
  .region("CA")
  .postalCode("94114")
  .country("USA")
  .build())
  .dob(Date.builder().day(Integer.valueOf(27)).month(Integer.valueOf(5)).year(Integer.valueOf(1978)).build())
  .maxTransactionAmount(Long.valueOf(1000L))
  .mcc("7399").url("http://sample-entity.com")
  .annualCardVolume(Long.valueOf(100L))
  .defaultStatementDescriptor("Business Inc")
  .incorporationDate(Date.builder().day(Integer.valueOf(1)).month(Integer.valueOf(12)).year(Integer.valueOf(2012)).build())
  .principalPercentageOwnership(Integer.valueOf(51)).build()).build();

Maybe<Identity> response = api.identities.post(form);
if(! response.succeeded().booleanValue()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Identity");
}
    Identity identity = (Identity)response.view();
    identity.getId();

<?php
use Finix\Resources\Identity;

$identity = new Identity(
    array(
        "tags"=> array(
            "Studio Rating"=> "4.7"
        ),
        "entity"=> array(
            "last_name"=> "Sunkhronos",
            "max_transaction_amount"=> 12000000,
            "has_accepted_credit_cards_previously"=> true,
            "default_statement_descriptor"=> "Petes Coffee",
            "personal_address"=> array(
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            ),
            "incorporation_date"=> array(
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            ),
            "business_address"=> array(
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 8",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            ),
            "ownership_type"=> "PRIVATE",
            "first_name"=> "dwayne",
            "title"=> "CEO",
            "business_tax_id"=> "123456789",
            "doing_business_as"=> "Petes Coffee",
            "principal_percentage_ownership"=> 50,
            "email"=> "user@example.org",
            "mcc"=> "0742",
            "phone"=> "1234567890",
            "business_name"=> "Petes Coffee",
            "tax_id"=> "123456789",
            "business_type"=> "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone"=> "+1 (408) 756-4497",
            "dob"=> array(
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            ),
            "url"=> "www.PetesCoffee.com",
            "annual_card_volume"=> 12000000
        )
    )
);
$identity = $identity->save();



from finix.resources import Identity

identity = Identity(**
    {
        "tags": {
            "Studio Rating": "4.7"
        },
        "entity": {
            "last_name": "Sunkhronos",
            "max_transaction_amount": 12000000,
            "has_accepted_credit_cards_previously": True,
            "default_statement_descriptor": "Petes Coffee",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "incorporation_date": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "business_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 8",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "ownership_type": "PRIVATE",
            "first_name": "dwayne",
            "title": "CEO",
            "business_tax_id": "123456789",
            "doing_business_as": "Petes Coffee",
            "principal_percentage_ownership": 50,
            "email": "user@example.org",
            "mcc": "0742",
            "phone": "1234567890",
            "business_name": "Petes Coffee",
            "tax_id": "123456789",
            "business_type": "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone": "+1 (408) 756-4497",
            "dob": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "url": "www.PetesCoffee.com",
            "annual_card_volume": 12000000
        }
    }).save()

identity = Finix::Identity.new(
    {
        "tags"=> {
            "Studio Rating"=> "4.7"
        },
        "entity"=> {
            "last_name"=> "Sunkhronos",
            "max_transaction_amount"=> 12000000,
            "has_accepted_credit_cards_previously"=> true,
            "default_statement_descriptor"=> "Petes Coffee",
            "personal_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            },
            "incorporation_date"=> {
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            },
            "business_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 8",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            },
            "ownership_type"=> "PRIVATE",
            "first_name"=> "dwayne",
            "title"=> "CEO",
            "business_tax_id"=> "123456789",
            "doing_business_as"=> "Petes Coffee",
            "principal_percentage_ownership"=> 50,
            "email"=> "user@example.org",
            "mcc"=> "0742",
            "phone"=> "1234567890",
            "business_name"=> "Petes Coffee",
            "tax_id"=> "123456789",
            "business_type"=> "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone"=> "+1 (408) 756-4497",
            "dob"=> {
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            },
            "url"=> "www.PetesCoffee.com",
            "annual_card_volume"=> 12000000
        }
    }).save

Example Response:

{
  "id" : "IDgqagivtqV3BhPyBNGTucTu",
  "entity" : {
    "title" : "CEO",
    "first_name" : "dwayne",
    "last_name" : "Sunkhronos",
    "email" : "user@example.org",
    "business_name" : "Petes Coffee",
    "business_type" : "INDIVIDUAL_SOLE_PROPRIETORSHIP",
    "doing_business_as" : "Petes Coffee",
    "phone" : "1234567890",
    "business_phone" : "+1 (408) 756-4497",
    "personal_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 7",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "business_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 8",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "mcc" : "0742",
    "dob" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "max_transaction_amount" : 12000000,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : "www.PetesCoffee.com",
    "annual_card_volume" : 12000000,
    "has_accepted_credit_cards_previously" : true,
    "incorporation_date" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "principal_percentage_ownership" : 50,
    "short_business_name" : null,
    "ownership_type" : "PRIVATE",
    "tax_id_provided" : true,
    "business_tax_id_provided" : true,
    "default_statement_descriptor" : "Petes Coffee"
  },
  "tags" : {
    "Studio Rating" : "4.7"
  },
  "created_at" : "2017-08-15T02:03:32.73Z",
  "updated_at" : "2017-08-15T02:03:32.73Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Before we can begin charging cards we’ll need to provision a Merchant account for your seller. This requires 3-steps, which we’ll go into greater detail in the next few sections:

  1. First, create an Identity resource with the merchant’s underwriting and identity verification information

    POST https://api-staging.finix.io/identities/

  2. Second, create a Payment Instrument representing the merchant’s bank account where processed funds will be settled (i.e. deposited)

    POST https://api-staging.finix.io/payment_instruments/

  3. Finally, provision the Merchant account

    POST https://api-staging.finix.io/identities/:IDENTITY_ID/merchants

Let’s start with the first step by creating an Identity resource. Each Identity represents either a person or a business. We use this resource to associate cards and payouts. This structure makes it simple to manage and reconcile payment instruments and payout history. Accounting of funds is done using the Identity so it’s recommended to have an Identity per recipient of funds. Additionally, the Identity resource is optionally used to collect KYC information.

You’ll want to store the ID of the newly created Identity resource for reference later.

HTTP Request

POST https://api-staging.finix.io/identities

Business-specific Request Arguments

Field Type Description
business_name string, required Merchant’s full legal business name (If INDIVIDUAL_SOLE_PROPRIETORSHIP, please input first name, Full legal last name and middle initial; max 120 characters)
doing_business_as string, required Alternate name of the business. If no other name is used please use the same value for business_name (max 60 characters)
business_type string, required Please select one of the following values: INDIVIDUAL_SOLE_PROPRIETORSHIP, CORPORATION, LIMITED_LIABILITY_COMPANY, PARTNERSHIP, ASSOCIATION_ESTATE_TRUST, TAX_EXEMPT_ORGANIZATION, INTERNATIONAL_ORGANIZATION, GOVERNMENT_AGENCY
business_tax_id string, required Nine digit Tax Identification Number (TIN), Employer Identification Number (EIN) or if the business_type is INDIVIDUAL_SOLE_PROPRIETORSHIP and a Tax ID is not available, the principal’s Social Security Number (SSN)
url string, required Merchant’s publicly available website (max 100 characters)
business_phone string, required Customer service phone number where the merchant can be reached (max 10 characters)
incorporation_date object, required Date company was founded (See below for a full list of the child attributes)
business_address object, required Primary address for the legal entity (Full description of child attributes below)
ownership_type string, required Values can be either PUBLIC to indicate a publicly traded company or PRIVATE for privately held businesses

Principal-specific Request Arguments

(i.e. authorized representative or primary contact responsible for the account)

Field Type Description
first_name string, required Full legal first name of the merchant’s principal representative (max 20 characters)
last_name string, required Full legal last name of the merchant’s principal representative (max 20 characters)
title string, required Principal’s corporate title or role (i.e. Chief Executive Officer, CFO, etc.; max 60 characters)
principal_percentage_ownership integer, required Percentage of company owned by the principal (min 0; max 100)
tax_id string, required Nine digit Social Security Number (SSN) for the principal
dob object, required Principal’s date of birth (Full description of child attributes below)
phone string, required Principal’s phone number (max 10 characters)
email string, required Principal’s email address where they can be reached (max 100 characters)
personal_address object, required Principal’s personal home address. This field is used for identity verification purposes (Full description of child attributes below)

Processing-specific Request Arguments

Field Type Description
default_statement_descriptor string, required Billing descriptor displayed on the buyer’s bank or card statement (Length must be between 1 and 20 characters)
annual_card_volume integer, required Approximate annual credit card sales expected to be processed in cents by this merchant (max 23 characters)
max_transaction_amount integer, required Maximum amount that can be transacted for a single transaction in cents (max 12 characters)
mcc string, required Merchant Category Code (MCC) that this merchant will be classified under
has_accepted_credit_cards_previously boolean, optional Defaults to false if not passed

Address-object Request Arguments

Field Type Description
line1 string, required First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, required 2-letter State code
postal_code string, required Zip or Postal code (max 7 characters)
country string, required 3-Letter Country code

Incorporation Date-object Request Arguments

Field Type Description
day integer, required Day business was incorporated (between 1 and 31)
month integer, required Month business was incorporated (between 1 and 12)
year integer, required Year business was incorporated (4-digit)

DOB-object Request Arguments

Field Type Description
day integer, required Day of birth (between 1 and 31)
month integer, required Month of birth (between 1 and 12)
year integer, required Year of birth (4-digit)

Step 2: Tokenize a Bank Account for Funding your Merchant

curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "account_type": "SAVINGS",
        "name": "Fran Lemke",
        "tags": {
            "Bank Account": "Company Account"
        },
        "country": "USA",
        "bank_code": "123123123",
        "account_number": "123123123",
        "type": "BANK_ACCOUNT",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }'


import io.finix.payments.ApiClient;
import io.finix.payments.enums.BankAccountType;
import io.finix.payments.forms.BankAccountForm;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.BankAccount;
import io.finix.payments.views.Identity;
import java.util.Currency;

BankAccountForm form = BankAccountForm.builder()
        .name("Joe Doe")
        .identity("IDgqagivtqV3BhPyBNGTucTu")
        .accountNumber("84012312415")
        .bankCode("840123124")
        .accountType(BankAccountType.SAVINGS)
        .companyName("company name")
        .country("USA")
        .currency(Currency.getInstance("USD"))
        .build();

Maybe<BankAccount> request = api.instruments.post(form);

if (! request.succeeded()) {
    ApiError error = request.error();
    System.out.println(error);
    throw new RuntimeException("API error attempting to create bank account");
}
BankAccount bankAccount = request.view();

<?php
use Finix\Resources\Identity;
use Finix\Resources\BankAccount;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$bank_account = new BankAccount(
    array(
        "account_type"=> "SAVINGS",
        "name"=> "Fran Lemke",
        "tags"=> array(
            "Bank Account"=> "Company Account"
        ),
        "country"=> "USA",
        "bank_code"=> "123123123",
        "account_number"=> "123123123",
        "type"=> "BANK_ACCOUNT",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    ));
$bank_account = $identity->createBankAccount($bank_account);


from finix.resources import BankAccount

bank_account = BankAccount(**
    {
        "account_type": "SAVINGS",
        "name": "Fran Lemke",
        "tags": {
            "Bank Account": "Company Account"
        },
        "country": "USA",
        "bank_code": "123123123",
        "account_number": "123123123",
        "type": "BANK_ACCOUNT",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }).save()

bank_account = Finix::BankAccount.new(
    {
        "account_type"=> "SAVINGS",
        "name"=> "Fran Lemke",
        "tags"=> {
            "Bank Account"=> "Company Account"
        },
        "country"=> "USA",
        "bank_code"=> "123123123",
        "account_number"=> "123123123",
        "type"=> "BANK_ACCOUNT",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    }).save

Example Response:

{
  "id" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
  "fingerprint" : "FPR-1215770130",
  "tags" : {
    "Bank Account" : "Company Account"
  },
  "bank_code" : "123123123",
  "country" : "USA",
  "masked_account_number" : "XXXXX3123",
  "name" : "Fran Lemke",
  "account_type" : "SAVINGS",
  "created_at" : "2017-08-15T02:03:36.38Z",
  "updated_at" : "2017-08-15T02:03:36.38Z",
  "instrument_type" : "BANK_ACCOUNT",
  "type" : "BANK_ACCOUNT",
  "currency" : "USD",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Now that we’ve created an Identity for our merchant, we’ll need to add a bank account where funds will be disbursed (i.e. their funding account).

In the API, bank accounts – as well as credit cards – are represented by the Payment Instrument resource.

To classify the Payment Instrument as a bank account you’ll need to pass BANK_ACCOUNT in the type field of your request, and you’ll also want to pass the ID of the Identity that you created in the last step via the identity field to properly associate it with your merchant.

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
account_number string, required Bank account number
bank_code string, required Bank routing number
type string, required Type of Payment Instrument (for bank accounts use BANK_ACCOUNT)
identity string, required ID for the Identity resource which the account is associated
account_type string, required Either CHECKING or SAVINGS
name string, required Account owner’s full name (max 40 characters)

Step 3: Provision Merchant Account

curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "processor": null,
        "tags": {
            "key_2": "value_2"
        }
    }'
import io.finix.payments.processing.client.model.Merchant;

Merchant merchant = identity.provisionMerchantOn(Merchant.builder().build());

<?php
use Finix\Resources\Identity;
use Finix\Resources\Merchant;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$merchant = $identity->provisionMerchantOn(new Merchant());


from finix.resources import Identity
from finix.resources import Merchant

identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")
merchant = identity.provision_merchant_on(Merchant())
identity = Finix::Identity.retrieve(:id=>"IDgqagivtqV3BhPyBNGTucTu")

merchant = identity.provision_merchant

Example Response:

{
  "id" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "verification" : "VIhuyGtwfpZh43Adv4FTCtK7",
  "merchant_profile" : "MP9ymkxBn5F1tZ5c6ADhBEXP",
  "processor" : "DUMMY_V1",
  "processing_enabled" : false,
  "settlement_enabled" : false,
  "tags" : { },
  "created_at" : "2017-08-15T02:03:37.56Z",
  "updated_at" : "2017-08-15T02:03:37.56Z",
  "onboarding_state" : "PROVISIONING",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications"
    },
    "merchant_profile" : {
      "href" : "https://api-staging.finix.io/merchant_profiles/MP9ymkxBn5F1tZ5c6ADhBEXP"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "verification" : {
      "href" : "https://api-staging.finix.io/verifications/VIhuyGtwfpZh43Adv4FTCtK7"
    }
  }
}

Now that we’ve associated a Payment Instrument with our seller’s Identity we’re ready to provision a Merchant account. This is the last step before you can begin processing on their behalf. Luckily you’ve already done most of the heavy lifting. Just make one final POST request, and you’ll be returned a Merchant resource. Take a second to inspect this newly created resource, particularly the onboarding_state, which can have 3 potential states that indicate its ability to process and settle funds:

  1. PROVISIONING: Request is pending (state will typically change after two minutes)

    • processing_enabled: False
    • settlement_enabled: False
  2. APPROVED: Merchant has been approved and can begin processing

    • processing_enabled: True
    • settlement_enabled: True
  3. REJECTED: Merchant was rejected by the processor either because the collected information was invalid or it failed one of a number of regulatory and/or compliance checks (e.g. KYC, OFAC or MATCH)

    • processing_enabled: False
    • settlement_enabled: False

HTTP Request

POST https://api-staging.finix.io/identities/:IDENTITY_ID/merchants

URL Parameters

Parameter Description
:IDENTITY_ID ID of the Identity

Step 4: Create an Identity for a Buyer


curl https://api-staging.finix.io/identities \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "tags": {
            "key": "value"
        },
        "entity": {
            "phone": "7145677613",
            "first_name": "Laura",
            "last_name": "Sterling",
            "email": "therock@gmail.com",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            }
        }
    }'

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.forms.Address;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.forms.Date;


IdentityForm form = IdentityForm.builder()
    .entity(
    IdentityEntityForm.builder()
        .firstName("dwayne")
        .lastName("Sunkhronos")
        .email("user@example.org")
        .personalAddress(
            Address.builder()
                .line1("741 Douglass St")
                .line2("Apartment 7")
                .city("San Mateo")
                .region("CA")
                .postalCode("94114")
                .country("USA")
                .build()
        )
        .build())
      .build();

Maybe<Identity> response = api.identities.post(form);

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Identity");
}

Identity identity = response.view();

<?php
use Finix\Resources\Identity;

$identity = new Identity(
    array(
        "tags"=> array(
            "key"=> "value"
        ),
        "entity"=> array(
            "phone"=> "7145677613",
            "first_name"=> "Laura",
            "last_name"=> "Sterling",
            "email"=> "therock@gmail.com",
            "personal_address"=> array(
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            )
        )
    ));
$identity = $identity->save();



from finix.resources import Identity

identity = Identity(**
    {
        "tags": {
            "key": "value"
        },
        "entity": {
            "phone": "7145677613",
            "first_name": "Laura",
            "last_name": "Sterling",
            "email": "therock@gmail.com",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            }
        }
    }).save()

identity = Finix::Identity.new(
    {
        "tags"=> {
            "key"=> "value"
        },
        "entity"=> {
            "phone"=> "7145677613",
            "first_name"=> "Laura",
            "last_name"=> "Sterling",
            "email"=> "therock@gmail.com",
            "personal_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            }
        }
    }).save

Example Response:

{
  "id" : "ID3iy9oJJydKBPfyGjSoXGuz",
  "entity" : {
    "title" : null,
    "first_name" : "Laura",
    "last_name" : "Sterling",
    "email" : "therock@gmail.com",
    "business_name" : null,
    "business_type" : null,
    "doing_business_as" : null,
    "phone" : "7145677613",
    "business_phone" : null,
    "personal_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 7",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "business_address" : null,
    "mcc" : null,
    "dob" : null,
    "max_transaction_amount" : 0,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : null,
    "annual_card_volume" : 0,
    "has_accepted_credit_cards_previously" : false,
    "incorporation_date" : null,
    "principal_percentage_ownership" : null,
    "short_business_name" : null,
    "ownership_type" : null,
    "tax_id_provided" : false,
    "business_tax_id_provided" : false,
    "default_statement_descriptor" : null
  },
  "tags" : {
    "key" : "value"
  },
  "created_at" : "2017-08-15T02:03:38.99Z",
  "updated_at" : "2017-08-15T02:03:38.99Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Now that we have successfully provisioned a Merchant we’ll need to create an Identity that represents your buyer. Don’t worry though you won’t need to capture the same amount of information from your buyer. So long as you don’t pass a business_type field all the fields are optional.

Typically, we suggest at least collecting the buyer’s name and email to help with accounting, reconciliation, and chargebacks.

HTTP Request

POST https://api-staging.finix.io/identities

Request Arguments

Field Type Description
first_name string, optional First name
last_name string, optional Last name
email string, optional Email
phone string, optional Phone number
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)
personal_address object, optional Customers shipping address or billing address (Full description of child attributes below)

Address-object Request Arguments

Field Type Description
line1 string, required First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, required 2-letter State code
postal_code string, required Zip or Postal code (max 7 characters)
country string, required 3-Letter Country code

Step 5: Tokenize a Card



curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "name": "Walter James",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "ID3iy9oJJydKBPfyGjSoXGuz"
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.forms.Address;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;

PaymentCardForm form = PaymentCardForm.builder()
        .name("Joe Doe")
        .number("4957030420210454")
        .securityCode("112")
        .expirationYear(2020)
        .identity("IDgqagivtqV3BhPyBNGTucTu")
        .expirationMonth(12)
        .address(
                Address.builder()
                        .city("San Mateo")
                        .country("USA")
                        .region("CA")
                        .line1("123 Fake St")
                        .line2("#7")
                        .postalCode("90210")
                        .build()
        )
        .tags(ImmutableMap.of("card_name", "Business Card"))
        .build();

Maybe<PaymentCard> response = api.instruments.post(form);
        if (! response.succeeded()) {
            ApiError error = response .error();
            System.out.println(error.getCode());
            throw new RuntimeException("API error attempting to create Payment Card");
        }
PaymentCard card = response.view();

<?php
use Finix\Resources\PaymentCard;
use Finix\Resources\Identity;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$card = new PaymentCard(
    array(
        "name"=> "Walter James",
        "expiration_year"=> 2020,
        "tags"=> array(
            "card_name"=> "Business Card"
        ),
        "number"=> "4957030420210454",
        "expiration_month"=> 12,
        "address"=> array(
            "city"=> "San Mateo",
            "country"=> "USA",
            "region"=> "CA",
            "line2"=> "Apartment 7",
            "line1"=> "741 Douglass St",
            "postal_code"=> "94114"
        ),
        "security_code"=> "112",
        "type"=> "PAYMENT_CARD",
        "identity"=> "ID3iy9oJJydKBPfyGjSoXGuz"
    ));
$card = $identity->createPaymentCard($card);



from finix.resources import PaymentCard

card = PaymentCard(**
    {
        "name": "Walter James",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "ID3iy9oJJydKBPfyGjSoXGuz"
    }).save()
card = Finix::PaymentCard.new(
    {
        "name"=> "Walter James",
        "expiration_year"=> 2020,
        "tags"=> {
            "card_name"=> "Business Card"
        },
        "number"=> "4957030420210454",
        "expiration_month"=> 12,
        "address"=> {
            "city"=> "San Mateo",
            "country"=> "USA",
            "region"=> "CA",
            "line2"=> "Apartment 7",
            "line1"=> "741 Douglass St",
            "postal_code"=> "94114"
        },
        "security_code"=> "112",
        "type"=> "PAYMENT_CARD",
        "identity"=> "ID3iy9oJJydKBPfyGjSoXGuz"
    }).save

Example Response:

{
  "id" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "fingerprint" : "FPR1187401672",
  "tags" : {
    "card_name" : "Business Card"
  },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : "Walter James",
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2017-08-15T02:03:39.45Z",
  "updated_at" : "2017-08-15T02:03:39.45Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "ID3iy9oJJydKBPfyGjSoXGuz",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/updates"
    }
  }
}

Now that we have an Identity resource representing our buyer, we’ll need to create a Payment Instrument which represents the credit card you’ll be debiting (i.e. charging).

You’ll also need to interpolate your own buyer’s Identity ID from the previous request to properly associate it.

Please review our guide on how to tokenize cards via the embedded tokenization form

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
identity string, required ID of the Identity that the card should be associated
type string, required Type of Payment Instrument (for cards input PAYMENT_CARD)
number string, required Credit card account number
security_code string, optional The 3-4 digit security code for the card (i.e. CVV code)
expiration_month integer, required Expiration month (e.g. 12 for December)
expiration_year integer, required 4-digit expiration year
name string, optional Full name of the registered card holder
address object, optional Billing address (Full description of child attributes below)

Address-object Request Arguments

Field Type Description
line1 string, required First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, required 2-letter State code
postal_code string, required Zip or Postal code (max 7 characters)
country string, required 3-Letter Country code

Step 6: Create an Authorization

curl https://api-staging.finix.io/authorizations \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "merchant_identity": "IDgqagivtqV3BhPyBNGTucTu",
        "currency": "USD",
        "amount": 100,
        "source": "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags": {
            "order_number": "21DFASJSAKAS"
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

AuthorizationCreateForm formCreateAuthorization = AuthorizationCreateForm.builder()
    .amount(10000L)
    .merchantIdentity("IDgqagivtqV3BhPyBNGTucTu")
    .source("PIpgvYknCDRcdsQkDUu3XJxZ")
    .build();

Maybe<Authorization> response = api.authorizations.post(formCreateAuthorization);

if (! response.succeeded()) {
  ApiError error = response.error();
  System.out.println(error.getMessage());
  throw new RuntimeException("API error attempting to creating Authorization");
}

Authorization authorization = response.view();

<?php
use Finix\Resources\Authorization;

$authorization = new Authorization(
    array(
        "merchant_identity"=> "IDgqagivtqV3BhPyBNGTucTu",
        "currency"=> "USD",
        "amount"=> 100,
        "source"=> "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags"=> array(
            "order_number"=> "21DFASJSAKAS"
        )
    ));
$authorization = $authorization->save();



from finix.resources import Authorization
authorization = Authorization(**
    {
        "merchant_identity": "IDgqagivtqV3BhPyBNGTucTu",
        "currency": "USD",
        "amount": 100,
        "source": "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags": {
            "order_number": "21DFASJSAKAS"
        }
    }).save()

authorization = Finix::Authorization.new(
    {
        "merchant_identity"=> "IDgqagivtqV3BhPyBNGTucTu",
        "currency"=> "USD",
        "amount"=> 100,
        "source"=> "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags"=> {
            "order_number"=> "21DFASJSAKAS"
        }
    }).save

Example Response:

{
  "id" : "AUbrca8T1iPQnx4NeKCqBmtz",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : null,
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:03:44.88Z",
  "updated_at" : "2017-08-15T02:03:44.94Z",
  "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
  "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "is_void" : false,
  "expires_at" : "2017-08-22T02:03:44.88Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    }
  }
}

At this point we’ve created resources representing the merchant, the buyer, and the buyer’s card.

Next you’ll need to create an Authorization. What’s a Authorization? Glad you asked! An Authorization (also known as a card hold) reserves a specific amount on a card to be captured (i.e. debited) at a later point, usually within 7 days. When an Authorization is captured it produces a Transfer resource.

To create an Authorization we’ll supply the buyer’s Payment Instrument ID as the source field and the seller’s Identity ID in the merchant_identity field. Note that the amount field is in cents.

Simple enough, right? You’ll also want to store the ID from that Authorization for your records so that we can capture those funds in the next step.

Authorizations have two possible states SUCCEEDED and FAILED. If the Authorization has succeeded, it must be captured before the expires_at or the funds will be released.

HTTP Request

POST https://api-staging.finix.io/authorizations

Request Arguments

Field Type Description
source string, required The buyer’s Payment Instrument ID that you will be performing the authorization
merchant_identity string, required The ID of the Identity for the merchant that you are transacting on behalf of
amount integer, required The amount of the authorization in cents
currency string, required 3-letter ISO code designating the currency (e.g. USD)
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)

Step 7: Capture the Authorization

curl https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -X PUT \
    -d '
    {
        "fee": "10",
        "capture_amount": 100
    }'
import io.finix.payments.ApiClient;
import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

AuthorizationUpdateForm form = AuthorizationUpdateForm.builder()
    .captureAmount(100L)
    .fee(10L)
    .statementDescriptor("Order 123")
    .build();

Maybe<Authorization> response = api.authorizations.id("AUbrca8T1iPQnx4NeKCqBmtz").put(form);

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getMessage());
    throw new RuntimeException("API error attempting to capture authorization");
}
Authorization capturedAuthorization = response.view();

<?php
use Finix\Resources\Authorization;

$authorization = Authorization::retrieve('AUbrca8T1iPQnx4NeKCqBmtz');
$authorization = $authorization->capture(50, 10);



from finix.resources import Authorization

authorization = Authorization.get(id="AUbrca8T1iPQnx4NeKCqBmtz")
authorization.capture(**
    {
        "fee": "10",
        "capture_amount": 100
    })

authorization = Finix::Authorization.retrieve(:id=>"AUbrca8T1iPQnx4NeKCqBmtz")
authorization = authorization.capture(
    {
        "fee"=> "10",
        "capture_amount"=> 100
    })



Example Response:

{
  "id" : "AUbrca8T1iPQnx4NeKCqBmtz",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : "TRkKK4q1aHNdYSjzfbz3EF7D",
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:03:44.82Z",
  "updated_at" : "2017-08-15T02:03:45.68Z",
  "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
  "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "is_void" : false,
  "expires_at" : "2017-08-22T02:03:44.82Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "transfer" : {
      "href" : "https://api-staging.finix.io/transfers/TRkKK4q1aHNdYSjzfbz3EF7D"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    }
  }
}

Now that we have the funds held on a card, we’ll need to capture them. Failing to do so will result in the funds being released (i.e. returned) to the buyer.

Note you can capture any amount less than or equal to the amount of the original Authorization. You will also want to pass a fee. The fee field is the amount in cents you would like to keep before settling out to the merchant. For example, if you’re charging the buyer $100 on behalf of your merchant, and you’re taking a 10% service fee you’ll want to pass 1000 as the fee. This way when the funds are eventually settled out only $90 will be disbursed to your merchant.

Once successfully captured the transfer field of the Authorization will contain the ID for the corresponding Transfer resource. By default, Transfers will be in a PENDING state. PENDING means that the system hasn’t submitted the capture request as they are submitted via batch request. Once submited the state of the Transfer will update to SUCCEEDED.

Next we’re going to show you how to settle out the funds to your merchant.

HTTP Request

PUT https://api-staging.finix.io/authorizations/:AUTHORIZATION_ID

URL Parameters

Parameter Description
:AUTHORIZATION_ID ID of the Authorization

Request Arguments

Field Type Description
capture_amount integer, required The amount of the Authorization you would like to capture in cents. Must be less than or equal to the amount of the Authorization
fee integer, optional Amount of the captured Authorization you would like to collect as your fee. Must be less than or equal to the amount

Step 8: Create a Batch Settlement

curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "currency": "USD",
        "tags": {
            "Internal Daily Settlement ID": "21DFASJSAKAS"
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.forms.SettlementForm;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.*;
import java.util.Currency;


Settlement settlement = identity.createSettlement(
  Settlement.builder()
    .currency("USD")
    .build()
);

SettlementForm formSettlement = SettlementForm.builder()
    .currency(Currency.getInstance("USD"))
    .build();

Transfer transfer = api.transfers.id("AUbrca8T1iPQnx4NeKCqBmtz").get().view();

Maybe<Settlement> response = api.identities.id("IDgqagivtqV3BhPyBNGTucTu").settlements.post(formSettlement);

if (! response.succeeded()) {
    throw new RuntimeException("API error attempting to create batch settlement");
}

Settlement settlementBatch = response.view();

<?php
use Finix\Resources\Identity;
use Finix\Resources\Settlement;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$settlement = new Settlement(
    array(
        "currency"=> "USD",
        "tags"=> array(
            "Internal Daily Settlement ID"=> "21DFASJSAKAS"
        )
    ));
$settlement = $identity->createSettlement($settlement);



from finix.resources import Identity
from finix.resources import Settlement

identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")
settlement = Settlement(**
    {
        "currency": "USD",
        "tags": {
            "Internal Daily Settlement ID": "21DFASJSAKAS"
        }
    })
identity.create_settlement(settlement)
identity = Finix::Identity.retrieve(:id=>"IDgqagivtqV3BhPyBNGTucTu")
settlement = identity.create_settlement(
    {
        "currency"=> "USD",
        "tags"=> {
            "Internal Daily Settlement ID"=> "21DFASJSAKAS"
        }
    })

Example Response:

{
  "id" : "STdJ1KjyFPjbraG1RFNQXJgF",
  "tags" : {
    "Internal Daily Settlement ID" : "21DFASJSAKAS"
  },
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "currency" : "USD",
  "created_at" : "2017-08-15T02:05:35.79Z",
  "updated_at" : "2017-08-15T02:05:35.82Z",
  "processor" : "DUMMY_V1",
  "total_amount" : 1240949,
  "total_fees" : 124096,
  "total_fee" : 124096,
  "net_amount" : 1116853,
  "destination" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "funding_transfers" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/funding_transfers"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers"
    },
    "fees" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=fee"
    },
    "reversals" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=reverse"
    },
    "credits" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=credit"
    },
    "debits" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=debit"
    }
  }
}

Awesome! Now you know how to charge a card. Next you need to settle out the funds to your merchant’s bank account (i.e. issue an ACH Credit). To do so you will create a Settlement resource. A Settlement is a logical construct representing a collection (i.e. batch) of Transfers that are intended to be paid out to a specific Merchant.

Each settlement is comprised of all the Transfers that have a SUCCEEDED state and that have not yet been previously settled out. In other words, if a merchant has a Transfer in the PENDING state it will not be included in the batch settlement. In addition, Settlements will include any refunded Transfers as a deduction. The total_amount minus the total_fee equals the net_amount (the amount in cents that will be deposited into your merchant’s bank account).

Note that for reconciliation purposes each Settlement contains a transfers link which returns a list of all the Transfers that comprise the batch.

HTTP Request

POST https://api-staging.finix.io/identities/:IDENTITY_ID/settlements

Request Arguments

Field Type Description
currency integer, required 3-letter currency code that the funds should be deposited (e.g. USD)
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)

Push-to-Card

Step 1: Create a Recipient Identity

curl https://api-staging.finix.io/identities \
    -H "Content-Type: application/vnd.json+api" \
    -u USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "tags": {
            "key": "value"
        },
        "entity": {
            "phone": "7145677612",
            "first_name": "Ayisha",
            "last_name": "Kline",
            "email": "Ayisha@gmail.com",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            }
        }
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.forms.Address;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.forms.Date;


IdentityForm form = IdentityForm.builder()
    .entity(
    IdentityEntityForm.builder()
        .firstName("dwayne")
        .lastName("Sunkhronos")
        .email("user@example.org")
        .personalAddress(
            Address.builder()
                .line1("741 Douglass St")
                .line2("Apartment 7")
                .city("San Mateo")
                .region("CA")
                .postalCode("94114")
                .country("USA")
                .build()
        )
        .build())
      .build();

Maybe<Identity> response = api.identities.post(form);

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Identity");
}

Identity identity = response.view();

<?php
use Finix\Resources\Identity;

$identity = new Identity(IDryhpukKEwmBwhtQNyYpKgv);
$identity = $identity->save();





from finix.resources import Identity

identity = Identity(**
    {
        "tags": {
            "key": "value"
        },
        "entity": {
            "phone": "7145677612",
            "first_name": "Ayisha",
            "last_name": "Kline",
            "email": "Ayisha@gmail.com",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            }
        }
    }).save()
identity = Finix::Identity.new(
    {
        "tags"=> {
            "key"=> "value"
        },
        "entity"=> {
            "phone"=> "7145677612",
            "first_name"=> "Ayisha",
            "last_name"=> "Kline",
            "email"=> "Ayisha@gmail.com",
            "personal_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            }
        }
    }).save


Example Response:

{
  "id" : "IDryhpukKEwmBwhtQNyYpKgv",
  "entity" : {
    "title" : null,
    "first_name" : "Ayisha",
    "last_name" : "Kline",
    "email" : "Ayisha@gmail.com",
    "business_name" : null,
    "business_type" : null,
    "doing_business_as" : null,
    "phone" : "7145677612",
    "business_phone" : null,
    "personal_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 7",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "business_address" : null,
    "mcc" : null,
    "dob" : null,
    "max_transaction_amount" : 0,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : null,
    "annual_card_volume" : 0,
    "has_accepted_credit_cards_previously" : false,
    "incorporation_date" : null,
    "principal_percentage_ownership" : null,
    "short_business_name" : null,
    "ownership_type" : null,
    "tax_id_provided" : false,
    "business_tax_id_provided" : false,
    "default_statement_descriptor" : null
  },
  "tags" : {
    "key" : "value"
  },
  "created_at" : "2017-08-15T02:05:45.90Z",
  "updated_at" : "2017-08-15T02:05:45.90Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APgSoxGS3UycNYRPLjgAvmBX"
    }
  }
}

Let’s start with the first step by creating an Identity resource. Each Identity represents either a person or a business. We use this resource to associate cards and payouts. This structure makes it simple to manage and reconcile payment instruments and payout history. Accounting of funds is done using the Identity so it’s recommended to have an Identity per recipient of funds. Additionally, the Identity resource is optionally used to collect KYC information.

HTTP Request

POST https://api-staging.finix.io/identities

Request Arguments

Field Type Description
first_name string, optional First name
last_name string, optional Last name
email string, optional Email
phone string, optional Phone number
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)
personal_address object, optional Customers shipping address or billing address (Full description of child attributes below)

Address-object Request Arguments

Field Type Description
line1 string, required First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, required 2-letter State code
postal_code string, required Zip or Postal code (max 7 characters)
country string, required 3-Letter Country code

Step 2: Add a Payment Instrument for the Recipient

curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "name": "Laura Wade",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "IDryhpukKEwmBwhtQNyYpKgv"
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.forms.Address;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;

PaymentCardForm form = PaymentCardForm.builder()
        .name("Joe Doe")
        .number("4957030420210454")
        .securityCode("112")
        .expirationYear(2020)
        .identity("IDgqagivtqV3BhPyBNGTucTu")
        .expirationMonth(12)
        .address(
                Address.builder()
                        .city("San Mateo")
                        .country("USA")
                        .region("CA")
                        .line1("123 Fake St")
                        .line2("#7")
                        .postalCode("90210")
                        .build()
        )
        .tags(ImmutableMap.of("card_name", "Business Card"))
        .build();

Maybe<PaymentCard> response = api.instruments.post(form);
if (! response.succeeded()) {
    ApiError error = response .error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Payment Card");
}
PaymentCard card = response.view();

<?php
use Finix\Resources\PaymentCard;
use Finix\Resources\Identity;

$identity = Identity::retrieve('IDryhpukKEwmBwhtQNyYpKgv');
$card = new PaymentCard(
    array(
        "name"=> "Laura Wade",
        "expiration_year"=> 2020,
        "tags"=> array(
            "card_name"=> "Business Card"
        ),
        "number"=> "4957030420210454",
        "expiration_month"=> 12,
        "address"=> array(
            "city"=> "San Mateo",
            "country"=> "USA",
            "region"=> "CA",
            "line2"=> "Apartment 7",
            "line1"=> "741 Douglass St",
            "postal_code"=> "94114"
        ),
        "security_code"=> "112",
        "type"=> "PAYMENT_CARD",
        "identity"=> "IDryhpukKEwmBwhtQNyYpKgv"
    ));
$card = $identity->createPaymentCard($card);



from finix.resources import PaymentCard

card = PaymentCard(**
    {
        "name": "Walter James",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "ID3iy9oJJydKBPfyGjSoXGuz"
    }).save()

card = Finix::PaymentCard.new(
    {
        "name"=> "Laura Wade",
        "expiration_year"=> 2020,
        "tags"=> {
            "card_name"=> "Business Card"
        },
        "number"=> "4957030420210454",
        "expiration_month"=> 12,
        "address"=> {
            "city"=> "San Mateo",
            "country"=> "USA",
            "region"=> "CA",
            "line2"=> "Apartment 7",
            "line1"=> "741 Douglass St",
            "postal_code"=> "94114"
        },
        "security_code"=> "112",
        "type"=> "PAYMENT_CARD",
        "identity"=> "IDryhpukKEwmBwhtQNyYpKgv"
    }).save

Example Response:

{
  "id" : "PIaySfwbXCzwDMsFyiaeeqU8",
  "fingerprint" : "FPR-283424296",
  "tags" : {
    "card_name" : "Business Card"
  },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : "Laura Wade",
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2017-08-15T02:05:46.27Z",
  "updated_at" : "2017-08-15T02:05:46.27Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "IDryhpukKEwmBwhtQNyYpKgv",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APgSoxGS3UycNYRPLjgAvmBX"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8/updates"
    }
  }
}

Now that we’ve created an Identity for our recipient, we’ll need to tokenize a credit card where funds will be disbursed.

In the API, credit cards are represented by the Payment Instrument resource.

To classify the Payment Instrument as a credit card you’ll need to pass PAYMENT_CARD in the type field of your request, and you’ll also want to pass the ID of the Identity that you created in the last step via the identity field to properly associate it with your recipient.

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
identity string, required ID of the Identity that the card should be associated
type string, required Type of Payment Instrument (for cards input PAYMENT_CARD)
number string, required Credit card account number
security_code string, optional The 3-4 digit security code for the card (i.e. CVV code)
expiration_month integer, required Expiration month (e.g. 12 for December)
expiration_year integer, required 4-digit expiration year
name string, optional Full name of the registered card holder
address object, optional Billing address (Full description of child attributes below)

Address-object Request Arguments

Field Type Description
line1 string, required First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, required 2-letter State code
postal_code string, required Zip or Postal code (max 7 characters)
country string, required 3-Letter Country code

Step 3: Verify card is eligible to receive push-to-card disbursements

Now that we’ve associated a payment instrument to a recipient, we’ll need to verify whether or not the card is eligible to receive push-to-card disbursements. How? By making a request to the Verifications endpoint. The returned Verification resource returns a set of general attributes and details about the card in question (e.g. card type, issuer information). For example, the inquiry_details object will contain a push_funds_block_indicator attribute that indicates if it is eligible for push-to-card disbursements. Below you’ll see a number of fields and the potential responses.

curl https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8/verifications \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "processor": "VISA_V1"
    }'

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;


 VerificationForm verificationForm = VerificationForm.builder()
    .processor("VISA_V1")
    .build();

Maybe<Verification> verificationResponse = api.instruments.id("PIaySfwbXCzwDMsFyiaeeqU8").verifications.post(verificationForm);
if (! verificationResponse.succeeded()) {
    ApiError error = verificationResponse.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create a Verification");
}
Verification verification = verificationResponse.view();

<?php



from finix.resources import PaymentInstrument
from finix.resources import Verification


payment_card = PaymentInstrument.get(id="PIpgvYknCDRcdsQkDUu3XJxZ")

verify = payment_card.verify_on(Verification(**
    {
        "processor": "VISA_V1"
    }))


Example Response:

{
  "id" : "VIsEEaCzKKFKZYDPotQvoJjm",
  "tags" : { },
  "messages" : [ ],
  "raw" : {
    "validation_details" : {
      "systems_trace_audit_number" : "192047",
      "transaction_identifier" : "141890859001162",
      "action_code" : "N7",
      "response_code" : "5",
      "address_verification_results" : "N",
      "cvv2_result_code" : "N"
    },
    "inquiry_details" : {
      "systems_trace_audit_number" : "192047",
      "card_type_code" : "C",
      "billing_currency_code" : 986,
      "billing_currency_minor_digits" : 2,
      "issuer_name" : "Visa Test Bank",
      "card_issuer_country_code" : 76,
      "fast_funds_indicator" : "N",
      "push_funds_block_indicator" : "N",
      "online_gambing_block_indicator" : "Y"
    },
    "general_inquiry_details" : {
      "systems_trace_audit_number" : "192047",
      "status" : {
        "status_code" : "CDI000",
        "status_description" : "Success"
      }
    }
  },
  "processor" : "VISA_V1",
  "state" : "SUCCEEDED",
  "created_at" : "2017-08-15T02:05:50.79Z",
  "updated_at" : "2017-08-15T02:05:51.74Z",
  "trace_id" : "192047",
  "payment_instrument" : "PIaySfwbXCzwDMsFyiaeeqU8",
  "merchant" : null,
  "identity" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/verifications/VIsEEaCzKKFKZYDPotQvoJjm"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APgSoxGS3UycNYRPLjgAvmBX"
    },
    "payment_instrument" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8"
    }
  }
}

HTTP Request

POST https://api-staging.finix.io/payment_instruments/:PAYMENT_INSTRUMENT_ID/verifications

URL Parameters

Parameter Description
:PAYMENT_INSTRUMENT_ID ID of the Payment Instrument

Request Arguments

Field Type Description
processor string, required The name of the processor, which needs to be: VISA_V1

Address Verification Results (address_verification_results)

Letter Description
D, F, M, Y Address verified
A, B, C, G, I, N, P, R, S, U, W Address not verified

Card Verification 2 Results (cvv2_result_code)

Letter Description
M CVV verified
N, P, S CVV not verified
U Issuer does not participate in CVV2 service

Card Type (card_type_code)

This one-character code indicates whether the account is credit, debit, prepaid, deferred debit, or charge.

Letter Description
C Credit
D Debit
H Charge Card
P Prepaid
R Deferred Debit

Fasts Funds Indicator (fast_funds_indicator)

Indicates whether or not the card is Fast Funds eligible (i.e. if the funds will settle in 30 mins or less). If not eligible, typically funds will settle within 2 business days.

Letter Description
B, D Fast Funds eligible
N Not eligible for Fast Funds

Push Funds Indicator (push_funds_block_indicator)

This code indicates if the associated card can receive push-to-card disbursements.

Letter Description
A, B, C Accepts push-to-card payments
N Does not accept push-to-card payments

Online Gambling Block Indicator (online_gambing_block_indicator)

Indicates if the card can receive push-payments for online gambling payouts.

Letter Description
Y Blocked for online gambling payouts
N Not blocked for online gambling payouts

Card Product ID (card_product_id)

A combination of card brand, platform, class and scheme.

Letter Description
A Visa Traditional
AX American Express
B Visa Traditional Rewards
C Visa Signature
D Visa Signature Preferred
DI Discover
DN Diners
E Proprietary ATM
F Visa Classic
G Visa Business
G1 Visa Signature Business
G2 Visa Business Check Card
G3 Visa Business Enhanced
G4 Visa Infinite Business
G5 Visa Business Rewards
I Visa Infinite
I1 Visa Infinite Privilege
I2 Visa UHNW
J3 Visa Healthcare
JC JCB
K Visa Corporate T&E
K1 Visa Government Corporate T&E
L Visa Electron
M MasterCard
N Visa Platinum
N1 Visa Rewards
N2 Visa Select
P Visa Gold
Q Private Label
Q1 Private Label Prepaid
Q2 Private Label Basic
Q3 Private Label Standard
Q4 Private Label Enhanced
Q5 Private Label Specialized
Q6 Private Label Premium
R Proprietary
S Visa Purchasing
S1 Visa Purchasing with Fleet
S2 Visa Government Purchasing
S3 Visa Government Purchasing with Fleet
S4 Visa Commercial Agriculture
S5 Visa Commercial Transport
S6 Visa Commercial Marketplace
U Visa Travel Money
V Visa V PAY

Product Sub-Type (card_product_subtype)

Description of product subtype.

Letter Description
AC Agriculture Maintenance Account
AE Agriculture Debit Account/Electron
AG Agriculture
AI Agriculture Investment Loan
CG Brazil Cargo
CS Construction
DS Distribution
HC Healthcare
LP Visa Large Purchase Advantage
MA Visa Mobile Agent
MB Interoperable Mobile Branchless Banking
MG Visa Mobile General
VA Visa Vale - Supermarket
VF Visa Vale - Fuel
VR Visa Vale - Restaurant

Card Sub-Type (card_subtype_code)

The code for account funding source subtype, such as reloadable and non-reloadable.

Letter Description
N Non-Reloadable
R Reloadable

Step 4: Provision Recipient Account

curl https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv/merchants \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "processor": "VISA_V1",
        "tags": {
            "key_2": "value_2"
        }
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;

Maybe<Identity> response = api.identities.id("IDryhpukKEwmBwhtQNyYpKgv").get();
if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to fetch Identity");
}
Identity identity = response.view();

MerchantUnderwritingForm form = MerchantUnderwritingForm.builder()
    .tags(ImmutableMap.of("key", "value"))
    .build();

Maybe<Merchant> merchantResponse = api.identities.id(identity.id).merchants.post(form);

if (! merchantResponse.succeeded()) {
            ApiError error = merchantResponse.error();
            System.out.println(error.getCode());
            throw new RuntimeException("API error attempting to provision Merchant");
        }
Merchant merchant = merchantResponse.view();
<?php
use Finix\Resources\Identity;
use Finix\Resources\Merchant;

$identity = Identity::retrieve('IDryhpukKEwmBwhtQNyYpKgv');

$merchant = $identity->provisionMerchantOn(new Merchant());



from finix.resources import Identity
from finix.resources import Merchant

identity = Identity.get(id="PIaySfwbXCzwDMsFyiaeeqU8")
merchant = identity.provision_merchant_on(Merchant())

identity = Finix::Identity.retrieve(:id=>"IDryhpukKEwmBwhtQNyYpKgv")

merchant = identity.provision_merchant

Example Response:

{
  "id" : "MUoV6KkLqTXRq6qtuzJUpBB6",
  "identity" : "IDryhpukKEwmBwhtQNyYpKgv",
  "verification" : "VI9S9HyyGFkUD4Wb7XF36tNM",
  "merchant_profile" : "MPvPAB1i4jPrCTjD3A2xiboj",
  "processor" : "VISA_V1",
  "processing_enabled" : false,
  "settlement_enabled" : false,
  "tags" : { },
  "created_at" : "2017-08-15T02:05:47.28Z",
  "updated_at" : "2017-08-15T02:05:47.28Z",
  "onboarding_state" : "PROVISIONING",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants/MUoV6KkLqTXRq6qtuzJUpBB6"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/merchants/MUoV6KkLqTXRq6qtuzJUpBB6/verifications"
    },
    "merchant_profile" : {
      "href" : "https://api-staging.finix.io/merchant_profiles/MPvPAB1i4jPrCTjD3A2xiboj"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APgSoxGS3UycNYRPLjgAvmBX"
    },
    "verification" : {
      "href" : "https://api-staging.finix.io/verifications/VI9S9HyyGFkUD4Wb7XF36tNM"
    }
  }
}

Now that we’ve associated a Payment Instrument with our recipient’s Identity we’re ready to provision a Recipient account. This is the last step before you can begin paying out an Identity. Luckily you’ve already done most of the heavy lifting. Just make one final POST request, and you’ll be returned a Merchant resource.

HTTP Request

POST https://api-staging.finix.io/identities/identityID/merchants

Request Arguments

Field Type Description
processor string, optional Name of Processor

Step 5: Send Payout

curl https://api-staging.finix.io/transfers \
    -H "Content-Type: application/vnd.json+api" \
    -u USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "currency": "USD",
        "amount": 10000,
        "destination": "PIaySfwbXCzwDMsFyiaeeqU8",
        "tags": {
            "order_number": "21DFASJSAKAS"
        }
    }'

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;
import java.util.Currency;

TransferForm form = TransferForm.builder()
        .amount(100L)
        .currency(Currency.getInstance("USD"))
        .idempotencyId("Idsfk23jnasdfkjf")
        .destination("PIaySfwbXCzwDMsFyiaeeqU8")
        .tags(ImmutableMap.of("order_number", "21DFASJSAKAS"))
        .build();

Maybe<Transfer> response = api.transfers.post(form);
if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Transfer");
}
Transfer transfer = response.view();

<?php
use Finix\Resources\Transfer;

$transfer = new Transfer(
    array(
        "currency"=> "USD",
        "amount"=> 10000,
        "destination"=> "PIaySfwbXCzwDMsFyiaeeqU8",
        "tags"=> array(
            "order_number"=> "21DFASJSAKAS"
        )
    ));
$transfer = $transfer->save();


from finix.resources import Transfer

payout = Transfer(**
    {
        "name": "Laura Wade",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "IDryhpukKEwmBwhtQNyYpKgv"
    }).save()

transfer = Finix::Transfer.new(
    {
        "currency"=> "USD",
        "amount"=> 10000,
        "destination"=> "PIaySfwbXCzwDMsFyiaeeqU8",
        "tags"=> {
            "order_number"=> "21DFASJSAKAS"
        }
    }).save

Example Response:

{
  "id" : "TRpHgJnALdjnAmnARjJCmbLw",
  "amount" : 10000,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "trace_id" : "192046",
  "currency" : "USD",
  "application" : "APgSoxGS3UycNYRPLjgAvmBX",
  "source" : "PIopoaKNQrCjn6seXaEZJknw",
  "destination" : "PIaySfwbXCzwDMsFyiaeeqU8",
  "ready_to_settle_at" : null,
  "fee" : 0,
  "statement_descriptor" : "FIN*FINIXPAYMENTS",
  "type" : "CREDIT",
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:05:48.57Z",
  "updated_at" : "2017-08-15T02:05:49.56Z",
  "idempotency_id" : null,
  "merchant_identity" : "IDryhpukKEwmBwhtQNyYpKgv",
  "subtype" : "API",
  "_links" : {
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APgSoxGS3UycNYRPLjgAvmBX"
    },
    "self" : {
      "href" : "https://api-staging.finix.io/transfers/TRpHgJnALdjnAmnARjJCmbLw"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/transfers/TRpHgJnALdjnAmnARjJCmbLw/payment_instruments"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDryhpukKEwmBwhtQNyYpKgv"
    },
    "reversals" : {
      "href" : "https://api-staging.finix.io/transfers/TRpHgJnALdjnAmnARjJCmbLw/reversals"
    },
    "fees" : {
      "href" : "https://api-staging.finix.io/transfers/TRpHgJnALdjnAmnARjJCmbLw/fees"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/transfers/TRpHgJnALdjnAmnARjJCmbLw/disputes"
    },
    "source" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIopoaKNQrCjn6seXaEZJknw"
    },
    "destination" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8"
    }
  }
}

Now the final step - time to payout the recipient!

Next you’ll need to create a Transfer. What’s a Transfer? Glad you asked! A Transfer represents any flow of funds either to or from a Payment Instrument. In this case a Payout to a card.

To create a Transfer we’ll simply supply the Payment Instrument ID of the previously tokenized card as the destination field. Also, be sure to note that the amount field is in cents.

Simple enough, right? You’ll also want to store the ID from that Transfer for your records. Transfers can have two possible states SUCCEEDED and FAILED.

HTTP Request

POST https://api-staging.finix.io/transfers

Request Arguments

Field Type Description
destination string, required ID of the Payment Instrument where funds will be sent
amount integer, required The total amount that will be charged in cents (e.g. 100 cents to charge $1.00)
currency string, required 3-letter ISO code designating the currency of the Transfers (e.g. USD)
statement_descriptor string, required Description that will show up on card statement
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)

Embedded Tokenization

Our embedded tokenization form ensures you remain out of PCI scope, while providing your end-users with a sleek, and seamless checkout experience.

With our form, sensitive card data never touches your servers and keeps you out of PCI scope by sending this info over SSL directly to Finix. For your convenience we’ve provided a jsfiddle as a live example.

Step 1: Create a Button

<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <body>
        <button id="show-form">Add Your Card</button>
    </body>
</html>

Before collecting the sensitive payment information, we will need to add a button to the HTML where we’ll be hosting the iframe so that end-users can input their details.

We have provided a simple example to the right.

Step 2: Include library

To use the iframe you will need to include the library on the webpage where you’re hosting the aforementioned button. Please include the script as demonstrated to the right. Please refrain from hosting the iframe library locally as doing so prevents important updates.

<script type="text/javascript" src="https://vgs-assets.s3.amazonaws.com/payline-1.latest.js"></script>

Step 3: Configure the client

<script type="text/javascript">
    document.addEventListener("DOMContentLoaded", function(event) {
      document.getElementById('show-form').addEventListener('click', function() {
        Payline.openTokenizeCardForm({
          applicationName: 'Business Name',
          applicationId: 'APwBFNui4QkYRWyVmnr78s2e',
        }, function (tokenizedResponse) {
          // Define a callback to send your token to your back-end server
        });
      });
    });
 </script>

Next we need to configure the client so that it associates the card with your Application. We will also need to register a click event that fires when our users click on the button, thereby rendering the iframe on the page. Then when the form is submitted you’ll be returned a unique Token resource representing the submitted card details. We will also need to define a callback for handling that response.

In the next step we’ll show you how to claim the instrument via an authenticated HTTPS request on your back-end for future use.

Example Response:

{
  "id" : "TKr643v58k9eGhcR1VDByWn7",
  "fingerprint" : "FPR405642276",
  "created_at" : "2017-08-15T02:03:46.79Z",
  "updated_at" : "2017-08-15T02:03:46.79Z",
  "instrument_type" : "PAYMENT_CARD",
  "expires_at" : "2017-08-16T02:03:46.79Z",
  "currency" : "USD",
  "_links" : {
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Step 4: Associate the Token

curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "token": "TKr643v58k9eGhcR1VDByWn7",
        "type": "TOKEN",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

TokenAssociationForm tokenForm =  TokenAssociationForm.builder()
    .token("TKr643v58k9eGhcR1VDByWn7")
    .identity("IDgqagivtqV3BhPyBNGTucTu")
    .build();

Maybe<PaymentCard> cardResponse = api.instruments.post(tokenForm);
if (! cardResponse.succeeded()) {
    ApiError error = cardResponse.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Payment Card");
}
PaymentCard paymentCard = cardResponse.view();

<?php
use Finix\Resources\PaymentInstrument;

$card = new PaymentInstrument(
    array(
        "token"=> "TKr643v58k9eGhcR1VDByWn7",
        "type"=> "TOKEN",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    ));
$card = $card->save();



from finix.resources import PaymentInstrument

payment_instrument = PaymentInstrument(**
    {
        "token": "TKr643v58k9eGhcR1VDByWn7",
        "type": "TOKEN",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }).save()

card = Finix::PaymentInstrument.new(
    {
        "token"=> "TKr643v58k9eGhcR1VDByWn7",
        "type"=> "TOKEN",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    }).save

Example Response:

{
  "id" : "PIr643v58k9eGhcR1VDByWn7",
  "fingerprint" : "FPR405642276",
  "tags" : { },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : null,
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2017-08-15T02:03:47.19Z",
  "updated_at" : "2017-08-15T02:03:47.19Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/updates"
    }
  }
}

Associate the newly tokenized card or bank with the instrument owner’s Identity.

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
token string, required ID for the Token that was returned via the tokenization client or hosted iframe
type string, required Must pass TOKEN as the value
identity string, required ID for the Identity resource which the account is to be associated

Tokenization with Hosted Fields

Library summary

The SecureForm library is a javascript library that allows you to integrate secure fields with non-secure fields in your page. The secure fields behave like traditional input fields while preventing access to the unsecured data.

Once the fields are initialized the library communicates the state of the fields through a JavaScript callback. The state object includes information about the validity, focused value and if the user has entered information in the field.

For a complete example of how to use the library please refer to this jsFiddle example.

Step 1: Include library

 <script type="text/javascript" src="https://js.verygoodvault.com/js-vgfield-2/finix.js"></script>

First we’ll need to include the library on the webpage where you’re hosting your form. Please include the script as demonstrated to the right.

Step 2: Initialize the secure form

SecureForm.create(environment, onUpdateCallback)-> Form


/*
SecureForm.create(environment, onUpdateCallback)-> Form
*/

const secureForm = SecureForm.create('sandbox', function(state) {
   // Logic for interacting with form's potential states
 });

The next step is to configure the library. This method is the single entry point into the library. It initializes and returns a Form object representing the secured form.

Arguments

Field Type Description
environment string, required sandbox for testing and live for production
onUpdateCallback function, required Callback that will be called whenever the form state changes. It receives the state object representing the current state.

Step 3: Configure the form fields

Form#field(selector, properties)-> Field


/*
Form#field(selector, properties)-> Field
*/

secureForm.field('#my-cool-parent', {
    'successColor': '#3c763d',
    'errorColor': '#a94442',
    'lineHeight': '1.5rem',
    'fontSize': '24px',
    'fontFamily': 'Comic Sans',
    'color': '#31708f',
    'placeholder': 'Card number',
    'name': 'cc-number',
    'type': 'card-number',
    'validations': [],
});

Now that we have a Form object we’ll want to style it and add any validations.

Arguments

Field Type Description
selector string, required CSS Selector that points to the element where the field will be added

Properties Object

Field Type Description
name string, required Name of the input field. Will be used when submitting the data.
type string, required Type of the input field (card-number, card-security-code, card-expiration-date, text, password, number, zip-code)
validations array, optional Array of validations that will be used to calculate the isValid state (required, validCardExpirationDate, validCardNumber, validCardSecurityCode)
placeholder string, optional Text displayed when the field is empty
successColor string, optional Text color when the field is valid
errorColor string, optional Text color when the field is invalid
color string, optional Text color
lineHeight string, optional Line height value
fontSize string, optional Size of text
fontFamily string, optional Font family used in the text.

Example Response:

{
  "number": {
    "isDirty": false,
    "isFocused": false,
    "errorMessages": [
      "is required",
      "is not a valid card number"
    ],
    "isValid": false,
    "name": "number"
  },
  "security_code": {
    "isDirty": false,
    "isFocused": false,
    "errorMessages": [
      "is required",
      "is not a valid security code"
    ],
    "isValid": false,
    "name": "security_code"
  },
  "expiration_month": {
    "isDirty": false,
    "isFocused": false,
    "errorMessages": [
      "is required"
    ],
    "isValid": false,
    "name": "expiration_month"
  },
  "expiration_year": {
    "isDirty": false,
    "isFocused": false,
    "errorMessages": [
      "is required"
    ],
    "isValid": false,
    "name": "expiration_year"
  }
}

Step 4: Submit payload and handle response

Form#submit(path, options, callback) -> Form


/*
Form#submit(path, options, callback)-> Form
*/

document.getElementById('cc-form')
  .addEventListener('submit', function(e) {
    e.preventDefault();
    secureForm.submit('/applications/APwBFNui4QkYRWyVmnr78s2e/tokens', {
        data: {
            type: 'PAYMENT_CARD',
        },
    }, function(status, response) {
        // callback for handling response and sending token to back-end server
        console.log("Response has been received", status, response);
    });
}, false);

Example Response:

{
  "id" : "TKr643v58k9eGhcR1VDByWn7",
  "fingerprint" : "FPR405642276",
  "created_at" : "2017-08-15T02:03:46.79Z",
  "updated_at" : "2017-08-15T02:03:46.79Z",
  "instrument_type" : "PAYMENT_CARD",
  "expires_at" : "2017-08-16T02:03:46.79Z",
  "currency" : "USD",
  "_links" : {
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Finally we will need to register a click event that fires when our users submit the form and define a callback for handling the response.

Next, configure the library to your specific Application where all of the form fields will be submitted during the executed POST request. We’ll also want to register a click event that fires when our users submit the form and define a callback for handling the response.

Once you’ve handled the response you will want to store that ID to utilize the token in the future. To do this you will need to send the ID from your front-end client to your back-end server.

Arguments

Field Type Description
path string, required Path to your Application's tokens endpoint
options object, required Options object that can include additional data, such as the type of Payment Instrument
callback function, required Callback that will be executed when the HTTPRequest is finished. The callback receives the HTTP status code and the data as two arguments.

Step 5: Associate to an Identity

curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "token": "TKr643v58k9eGhcR1VDByWn7",
        "type": "TOKEN",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }'

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

TokenAssociationForm tokenForm =  TokenAssociationForm.builder()
    .token("TKr643v58k9eGhcR1VDByWn7")
    .identity("IDgqagivtqV3BhPyBNGTucTu")
    .build();

Maybe<PaymentCard> cardResponse = api.instruments.post(tokenForm);
if (! cardResponse.succeeded()) {
    ApiError error = cardResponse.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Payment Card");
}
PaymentCard paymentCard = cardResponse.view();

<?php
use Finix\Resources\PaymentInstrument;

$card = new PaymentInstrument(
    array(
        "token"=> "TKr643v58k9eGhcR1VDByWn7",
        "type"=> "TOKEN",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    ));
$card = $card->save();



from finix.resources import PaymentInstrument

payment_instrument = PaymentInstrument(**
    {
        "token": "TKr643v58k9eGhcR1VDByWn7",
        "type": "TOKEN",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }).save()

card = Finix::PaymentInstrument.new(
    {
        "token"=> "TKr643v58k9eGhcR1VDByWn7",
        "type"=> "TOKEN",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    }).save

Example Response:

{
  "id" : "PIr643v58k9eGhcR1VDByWn7",
  "fingerprint" : "FPR405642276",
  "tags" : { },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : null,
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2017-08-15T02:03:47.19Z",
  "updated_at" : "2017-08-15T02:03:47.19Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/updates"
    }
  }
}

Before you can use the newly tokenized card or bank account you will need to associate it with an Identity. To do this you must make an authenticated POST request to the /payment_instruments endpoint with the relevant token and Identity information.

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
token string, required ID for the Token that was returned via the tokenization client
type string, required Must pass TOKEN as the value
identity string, required ID for the Identity resource which the account is to be associated

Testing for specific responses and errors

Before taking your integration to production, use the information below to test it thoroughly.

Amount Description
100 Success amount
102 Failed amount
103 Canceled amount
104 Exception amount
888888 Disputed amount
193 Insufficient funds amount
194 Invalid card number amount
889986 AVS total failure amount
889987 CVC failure amount
889988 Risk amount canceled amount
Card Description
4000000000000036 Payment card AVS total failure
4000000000000127 Payment card CVC failure

Authorizations

An Authorization (also known as a card hold) reserves a specific amount on a card to be captured (i.e. debited) at a later date, usually within 7 days. When an Authorization is captured it produces a Transfer resource.

Create an Authorization

curl https://api-staging.finix.io/authorizations \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "merchant_identity": "IDgqagivtqV3BhPyBNGTucTu",
        "currency": "USD",
        "amount": 100,
        "source": "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags": {
            "order_number": "21DFASJSAKAS"
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

AuthorizationCreateForm formCreateAuthorization = AuthorizationCreateForm.builder()
                .amount(10000L)
                .merchantIdentity("IDgqagivtqV3BhPyBNGTucTu")
                .source("PIpgvYknCDRcdsQkDUu3XJxZ")
                .build();

Maybe<Authorization> response = api.authorizations.post(formCreateAuthorization);

if (! response.succeeded()) {
  ApiError error = response.error();
  System.out.println(error.getMessage());
  throw new RuntimeException("API error attempting to creating Authorization");
}

Authorization authorization = response.view();

<?php
use Finix\Resources\Authorization;

$authorization = new Authorization(
    array(
        "merchant_identity"=> "IDgqagivtqV3BhPyBNGTucTu",
        "currency"=> "USD",
        "amount"=> 100,
        "source"=> "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags"=> array(
            "order_number"=> "21DFASJSAKAS"
        )
    ));
$authorization = $authorization->save();




from finix.resources import Authorization

authorization = Authorization(**
    {
        "merchant_identity": "IDgqagivtqV3BhPyBNGTucTu",
        "currency": "USD",
        "amount": 100,
        "source": "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags": {
            "order_number": "21DFASJSAKAS"
        }
    }).save()
authorization = Finix::Authorization.new(
    {
        "merchant_identity"=> "IDgqagivtqV3BhPyBNGTucTu",
        "currency"=> "USD",
        "amount"=> 100,
        "source"=> "PIpgvYknCDRcdsQkDUu3XJxZ",
        "tags"=> {
            "order_number"=> "21DFASJSAKAS"
        }
    }).save

Example Response:

{
  "id" : "AUbrca8T1iPQnx4NeKCqBmtz",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : null,
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:03:44.88Z",
  "updated_at" : "2017-08-15T02:03:44.94Z",
  "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
  "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "is_void" : false,
  "expires_at" : "2017-08-22T02:03:44.88Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    }
  }
}

Authorizations have two possible states SUCCEEDED and FAILED. If the Authorization has succeeded, it must be captured before the expires_at or the funds will be released.

HTTP Request

POST https://api-staging.finix.io/authorizations

Request Arguments

Field Type Description
source string, required The Payment Instrument that you will be performing the authorization
merchant_identity string, required The ID of the Identity for the merchant that you are transacting on behalf of
amount integer, required The amount of the authorization in cents
currency string, required 3-letter ISO code designating the currency (e.g. USD)
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)

Capture an Authorization

curl https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -X PUT \
    -d '
    {
        "fee": "10",
        "capture_amount": 100
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

AuthorizationUpdateForm form = AuthorizationUpdateForm.builder()
        .captureAmount(100L)
        .fee(10L)
        .statementDescriptor("Order 123")
        .build();

Maybe<Authorization> responseAuthorization = api.authorizations.id("AUbrca8T1iPQnx4NeKCqBmtz").put(form);

if (! responseAuthorization.succeeded()) {
    ApiError error = responseAuthorization.error();
    System.out.println(error.getMessage());
    throw new RuntimeException("API error attempting to capture authorization");
}
Authorization capturedAuth = responseAuthorization.view();

<?php
use Finix\Resources\Authorization;

$authorization = Authorization::retrieve('AUbrca8T1iPQnx4NeKCqBmtz');
$authorization = $authorization->capture(50, 10);



from finix.resources import Authorization

authorization = Authorization.get(id="AUbrca8T1iPQnx4NeKCqBmtz")
authorization.capture(**
    {
        "fee": "10",
        "capture_amount": 100
    })

authorization = Finix::Authorization.retrieve(:id=>"AUbrca8T1iPQnx4NeKCqBmtz")
authorization = authorization.capture(
    {
        "fee"=> "10",
        "capture_amount"=> 100
    })



Example Response:

{
  "id" : "AUbrca8T1iPQnx4NeKCqBmtz",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : "TRkKK4q1aHNdYSjzfbz3EF7D",
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:03:44.82Z",
  "updated_at" : "2017-08-15T02:03:45.68Z",
  "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
  "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "is_void" : false,
  "expires_at" : "2017-08-22T02:03:44.82Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "transfer" : {
      "href" : "https://api-staging.finix.io/transfers/TRkKK4q1aHNdYSjzfbz3EF7D"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    }
  }
}

Once successfully captured the transfer field of the Authorization will contain the ID for the corresponding Transfer resource. By default, Transfers will be in a PENDING state. PENDING means that the system hasn’t submitted the capture request as they are submitted via batch request. Once submited the state of the Transfer will update to SUCCEEDED.

HTTP Request

PUT https://api-staging.finix.io/authorizations/:AUTHORIZATION_ID

URL Parameters

Parameter Description
:AUTHORIZATION_ID ID of the Authorization

Request Arguments

Field Type Description
capture_amount integer, required The amount of the Authorization you would like to capture in cents. Must be less than or equal to the amount of the Authorization
fee integer, optional Amount of the captured Authorization you would like to collect as your fee. Must be less than or equal to the amount

Void an Authorization


curl https://api-staging.finix.io/authorizations/AUvX1ncv5revuCXjV7wjygSc \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -X PUT \
    -d '
    {
        "void_me": true
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.forms.AuthorizationUpdateForm;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.*;

AuthorizationUpdateForm formVoid = AuthorizationUpdateForm.builder()
        .voidMe(true)
        .build();

Maybe<Authorization> response = api.authorizations.id("AUbrca8T1iPQnx4NeKCqBmtz").put(formVoid);

if (! response.succeeded()) {
    System.out.println(response.error());
    throw new RuntimeException("API error attempting to void authorization");
}
Authorization voidAuthorization = response.view();

<?php
use Finix\Resources\Authorization;

$authorization = Authorization::retrieve('AUbrca8T1iPQnx4NeKCqBmtz');
$authorization->void(true);
$authorization = $authorization->save();




from finix.resources import Authorization

authorization = Authorization.get(id="AUbrca8T1iPQnx4NeKCqBmtz")
authorization.void()

authorization = Finix::Authorization.retrieve(:id=>"AUbrca8T1iPQnx4NeKCqBmtz")
authorization = authorization.void

Example Response:

{
  "id" : "AUvX1ncv5revuCXjV7wjygSc",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : null,
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:03:47.70Z",
  "updated_at" : "2017-08-15T02:03:48.28Z",
  "trace_id" : "8446d187-1180-448f-b56d-bc4441fba968",
  "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "is_void" : true,
  "expires_at" : "2017-08-22T02:03:47.70Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations/AUvX1ncv5revuCXjV7wjygSc"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    }
  }
}

Cancels the Authorization thereby releasing the funds. After voiding an Authorization it can no longer be captured.

HTTP Request

PUT https://api-staging.finix.io/authorizations/:AUTHORIZATION_ID

URL Parameters

Parameter Description
:AUTHORIZATION_ID ID of the Authorization

Request Arguments

Field Type Description
void_me boolean, required Set to True to void the Authorization

Fetch an Authorization


curl https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

import io.finix.ApiClient;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.Authorization;

Maybe <Authorization> response =  api.authorizations
    .id("AUbrca8T1iPQnx4NeKCqBmtz")
    .get();

if(! response.succeeded()){
    System.out.println(response.error());
    throw new RuntimeException("API error in attempting to fetch Authorization");
}

Authorization authorization = response.view();

<?php
use Finix\Resources\Authorization;

$authorization = Authorization::retrieve('AUbrca8T1iPQnx4NeKCqBmtz');



from finix.resources import Authorization

authorization = Authorization.get(id="AUbrca8T1iPQnx4NeKCqBmtz")
authorization = Finix::Authorization.retrieve(:id=>"AUbrca8T1iPQnx4NeKCqBmtz")


Example Response:

{
  "id" : "AUbrca8T1iPQnx4NeKCqBmtz",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : "TRkKK4q1aHNdYSjzfbz3EF7D",
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2017-08-15T02:03:44.82Z",
  "updated_at" : "2017-08-15T02:03:45.68Z",
  "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
  "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "is_void" : false,
  "expires_at" : "2017-08-22T02:03:44.82Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "transfer" : {
      "href" : "https://api-staging.finix.io/transfers/TRkKK4q1aHNdYSjzfbz3EF7D"
    },
    "merchant_identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    }
  }
}

HTTP Request

GET https://api-staging.finix.io/authorizations/:AUTHORIZATION_ID

URL Parameters

Parameter Description
:AUTHORIZATION_ID ID of the Authorization

List all Authorizations

curl https://api-staging.finix.io/authorizations/ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.lib.Page;
import io.finix.payments.views.*;

Maybe<Page<Authorization>> response = api.authorizations.get();

if (! response.succeeded()) {
   ApiError error = response.error();
   System.out.println(error.getCode());
   System.out.println(error.getMessage());
   System.out.println(error.getDetails());
   throw new RuntimeException("API error attempting to list all Authorizations");
}

 Page<Authorization> page = response.view();
 Page<Authorization> page2 = page.getNext();

<?php
use Finix\Resources\Authorization;

$authorizations = Authorization::getPagination("/authorizations");




from finix.resources import Authorization

authorization = Authorization.get()
authorizations = Finix::Authorization.retrieve

Example Response:

{
  "_embedded" : {
    "authorizations" : [ {
      "id" : "AUvX1ncv5revuCXjV7wjygSc",
      "amount" : 100,
      "tags" : {
        "order_number" : "21DFASJSAKAS"
      },
      "state" : "SUCCEEDED",
      "currency" : "USD",
      "transfer" : null,
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:03:47.70Z",
      "updated_at" : "2017-08-15T02:03:48.28Z",
      "trace_id" : "8446d187-1180-448f-b56d-bc4441fba968",
      "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
      "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "is_void" : true,
      "expires_at" : "2017-08-22T02:03:47.70Z",
      "idempotency_id" : null,
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/authorizations/AUvX1ncv5revuCXjV7wjygSc"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        }
      }
    }, {
      "id" : "AUbrca8T1iPQnx4NeKCqBmtz",
      "amount" : 100,
      "tags" : {
        "order_number" : "21DFASJSAKAS"
      },
      "state" : "SUCCEEDED",
      "currency" : "USD",
      "transfer" : "TRkKK4q1aHNdYSjzfbz3EF7D",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:03:44.82Z",
      "updated_at" : "2017-08-15T02:03:45.68Z",
      "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
      "source" : "PIpgvYknCDRcdsQkDUu3XJxZ",
      "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "is_void" : false,
      "expires_at" : "2017-08-22T02:03:44.82Z",
      "idempotency_id" : null,
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/authorizations/AUbrca8T1iPQnx4NeKCqBmtz"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "transfer" : {
          "href" : "https://api-staging.finix.io/transfers/TRkKK4q1aHNdYSjzfbz3EF7D"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/authorizations?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 2
  }
}

HTTP Request

GET https://api-staging.finix.io/authorizations/

Identities

An Identity resource represents either a buyer or a merchant and is in a many ways the centerpiece of the payment API’s architecture. Transfers and Payment Instruments must be associated with an Identity. For both buyers ans merchants this structure makes it easy to manage and reconcile their associated banks accounts, transaction history, and payouts.

Create an Identity for a Buyer



curl https://api-staging.finix.io/identities \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "tags": {
            "key": "value"
        },
        "entity": {
            "phone": "7145677613",
            "first_name": "Laura",
            "last_name": "Sterling",
            "email": "therock@gmail.com",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            }
        }
    }'

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.forms.Address;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.forms.Date;


IdentityForm form = IdentityForm.builder()
    .entity(
    IdentityEntityForm.builder()
        .firstName("dwayne")
        .lastName("Sunkhronos")
        .email("user@example.org")
        .personalAddress(
            Address.builder()
                .line1("741 Douglass St")
                .line2("Apartment 7")
                .city("San Mateo")
                .region("CA")
                .postalCode("94114")
                .country("USA")
                .build()
        )
        .build())
    .build();

Maybe<Identity> response = api.identities.post(form);

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Identity");
}

Identity identity = response.view();
<?php
use Finix\Resources\Identity;

$identity = new Identity(
    array(
        "tags"=> array(
            "key"=> "value"
        ),
        "entity"=> array(
            "phone"=> "7145677613",
            "first_name"=> "Laura",
            "last_name"=> "Sterling",
            "email"=> "therock@gmail.com",
            "personal_address"=> array(
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            )
        )
    ));
$identity = $identity->save();



from finix.resources import Identity

identity = Identity(**
    {
        "tags": {
            "key": "value"
        },
        "entity": {
            "phone": "7145677613",
            "first_name": "Laura",
            "last_name": "Sterling",
            "email": "therock@gmail.com",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            }
        }
    }).save()
identity = Finix::Identity.new(
    {
        "tags"=> {
            "key"=> "value"
        },
        "entity"=> {
            "phone"=> "7145677613",
            "first_name"=> "Laura",
            "last_name"=> "Sterling",
            "email"=> "therock@gmail.com",
            "personal_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            }
        }
    }).save

Example Response:

{
  "id" : "ID3iy9oJJydKBPfyGjSoXGuz",
  "entity" : {
    "title" : null,
    "first_name" : "Laura",
    "last_name" : "Sterling",
    "email" : "therock@gmail.com",
    "business_name" : null,
    "business_type" : null,
    "doing_business_as" : null,
    "phone" : "7145677613",
    "business_phone" : null,
    "personal_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 7",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "business_address" : null,
    "mcc" : null,
    "dob" : null,
    "max_transaction_amount" : 0,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : null,
    "annual_card_volume" : 0,
    "has_accepted_credit_cards_previously" : false,
    "incorporation_date" : null,
    "principal_percentage_ownership" : null,
    "short_business_name" : null,
    "ownership_type" : null,
    "tax_id_provided" : false,
    "business_tax_id_provided" : false,
    "default_statement_descriptor" : null
  },
  "tags" : {
    "key" : "value"
  },
  "created_at" : "2017-08-15T02:03:38.99Z",
  "updated_at" : "2017-08-15T02:03:38.99Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

All fields for a buyer’s Identity are optional. However, a business_type field should not be passed. Passing a business_type indicates that the Identity should be treated as a merchant.

HTTP Request

POST https://api-staging.finix.io/identities

Request Arguments

Field Type Description
first_name string, optional First name
last_name string, optional Last name
phone string, optional Phone number
email string, optional Email address
line1 string, optional First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, optional City (max 20 characters)
region string, optional 2-letter State code
postal_code string, optional Zip or Postal code (max 7 characters)
country string, optional 3-Letter Country code
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)

Create an Identity for a Merchant



curl https://api-staging.finix.io/identities \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "tags": {
            "Studio Rating": "4.7"
        },
        "entity": {
            "last_name": "Sunkhronos",
            "max_transaction_amount": 12000000,
            "has_accepted_credit_cards_previously": true,
            "default_statement_descriptor": "Petes Coffee",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "incorporation_date": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "business_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 8",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "ownership_type": "PRIVATE",
            "first_name": "dwayne",
            "title": "CEO",
            "business_tax_id": "123456789",
            "doing_business_as": "Petes Coffee",
            "principal_percentage_ownership": 50,
            "email": "user@example.org",
            "mcc": "0742",
            "phone": "1234567890",
            "business_name": "Petes Coffee",
            "tax_id": "123456789",
            "business_type": "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone": "+1 (408) 756-4497",
            "dob": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "url": "www.PetesCoffee.com",
            "annual_card_volume": 12000000
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.enums.BusinessType;
import io.finix.payments.forms.Address;
import io.finix.payments.forms.Date;
import io.finix.payments.forms.IdentityEntityForm;
import io.finix.payments.forms.IdentityForm;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.Identity;


IdentityForm form = IdentityForm.builder()
  .entity(IdentityEntityForm.builder()
  .firstName("dwayne")
  .lastName("Sunkhronos")
  .email("user@example.org")
  .businessName("business inc")
  .businessType(BusinessType.LIMITED_LIABILITY_COMPANY)
  .doingBusinessAs("doingBusinessAs")
  .phone("1234567890")
  .businessPhone("+1 (408) 756-4497")
  .taxId("123456789")
  .businessTaxId("123456789")
  .personalAddress(Address.builder()
  .line1("741 Douglass St")
  .line2("Apartment 7")
  .city("San Mateo")
  .region("CA")
  .postalCode("94114")
  .country("USA")
  .build())
  .businessAddress(Address.builder()
  .line1("741 Douglass St")
  .line2("Apartment 7")
  .city("San Mateo")
  .region("CA")
  .postalCode("94114")
  .country("USA")
  .build())
  .dob(Date.builder().day(Integer.valueOf(27)).month(Integer.valueOf(5)).year(Integer.valueOf(1978)).build())
  .maxTransactionAmount(Long.valueOf(1000L))
  .mcc("7399").url("http://sample-entity.com")
  .annualCardVolume(Long.valueOf(100L))
  .defaultStatementDescriptor("Business Inc")
  .incorporationDate(Date.builder().day(Integer.valueOf(1)).month(Integer.valueOf(12)).year(Integer.valueOf(2012)).build())
  .principalPercentageOwnership(Integer.valueOf(51)).build()).build();

Maybe<Identity> response = api.identities.post(form);
if(! response.succeeded().booleanValue()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Identity");
}
    Identity identity = (Identity)response.view();


<?php
use Finix\Resources\Identity;

$identity = new Identity(
    array(
        "tags"=> array(
            "Studio Rating"=> "4.7"
        ),
        "entity"=> array(
            "last_name"=> "Sunkhronos",
            "max_transaction_amount"=> 12000000,
            "has_accepted_credit_cards_previously"=> true,
            "default_statement_descriptor"=> "Petes Coffee",
            "personal_address"=> array(
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            ),
            "incorporation_date"=> array(
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            ),
            "business_address"=> array(
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 8",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            ),
            "ownership_type"=> "PRIVATE",
            "first_name"=> "dwayne",
            "title"=> "CEO",
            "business_tax_id"=> "123456789",
            "doing_business_as"=> "Petes Coffee",
            "principal_percentage_ownership"=> 50,
            "email"=> "user@example.org",
            "mcc"=> "0742",
            "phone"=> "1234567890",
            "business_name"=> "Petes Coffee",
            "tax_id"=> "123456789",
            "business_type"=> "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone"=> "+1 (408) 756-4497",
            "dob"=> array(
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            ),
            "url"=> "www.PetesCoffee.com",
            "annual_card_volume"=> 12000000
        )
    )
);
$identity = $identity->save();



from finix.resources import Identity

identity = Identity(**
    {
        "tags": {
            "Studio Rating": "4.7"
        },
        "entity": {
            "last_name": "Sunkhronos",
            "max_transaction_amount": 12000000,
            "has_accepted_credit_cards_previously": True,
            "default_statement_descriptor": "Petes Coffee",
            "personal_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 7",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "incorporation_date": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "business_address": {
                "city": "San Mateo",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 8",
                "line1": "741 Douglass St",
                "postal_code": "94114"
            },
            "ownership_type": "PRIVATE",
            "first_name": "dwayne",
            "title": "CEO",
            "business_tax_id": "123456789",
            "doing_business_as": "Petes Coffee",
            "principal_percentage_ownership": 50,
            "email": "user@example.org",
            "mcc": "0742",
            "phone": "1234567890",
            "business_name": "Petes Coffee",
            "tax_id": "123456789",
            "business_type": "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone": "+1 (408) 756-4497",
            "dob": {
                "year": 1978,
                "day": 27,
                "month": 6
            },
            "url": "www.PetesCoffee.com",
            "annual_card_volume": 12000000
        }
    }).save()
identity = Finix::Identity.new(
    {
        "tags"=> {
            "Studio Rating"=> "4.7"
        },
        "entity"=> {
            "last_name"=> "Sunkhronos",
            "max_transaction_amount"=> 12000000,
            "has_accepted_credit_cards_previously"=> true,
            "default_statement_descriptor"=> "Petes Coffee",
            "personal_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 7",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            },
            "incorporation_date"=> {
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            },
            "business_address"=> {
                "city"=> "San Mateo",
                "country"=> "USA",
                "region"=> "CA",
                "line2"=> "Apartment 8",
                "line1"=> "741 Douglass St",
                "postal_code"=> "94114"
            },
            "ownership_type"=> "PRIVATE",
            "first_name"=> "dwayne",
            "title"=> "CEO",
            "business_tax_id"=> "123456789",
            "doing_business_as"=> "Petes Coffee",
            "principal_percentage_ownership"=> 50,
            "email"=> "user@example.org",
            "mcc"=> "0742",
            "phone"=> "1234567890",
            "business_name"=> "Petes Coffee",
            "tax_id"=> "123456789",
            "business_type"=> "INDIVIDUAL_SOLE_PROPRIETORSHIP",
            "business_phone"=> "+1 (408) 756-4497",
            "dob"=> {
                "year"=> 1978,
                "day"=> 27,
                "month"=> 6
            },
            "url"=> "www.PetesCoffee.com",
            "annual_card_volume"=> 12000000
        }
    }).save

Example Response:

{
  "id" : "IDgqagivtqV3BhPyBNGTucTu",
  "entity" : {
    "title" : "CEO",
    "first_name" : "dwayne",
    "last_name" : "Sunkhronos",
    "email" : "user@example.org",
    "business_name" : "Petes Coffee",
    "business_type" : "INDIVIDUAL_SOLE_PROPRIETORSHIP",
    "doing_business_as" : "Petes Coffee",
    "phone" : "1234567890",
    "business_phone" : "+1 (408) 756-4497",
    "personal_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 7",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "business_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 8",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "mcc" : "0742",
    "dob" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "max_transaction_amount" : 12000000,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : "www.PetesCoffee.com",
    "annual_card_volume" : 12000000,
    "has_accepted_credit_cards_previously" : true,
    "incorporation_date" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "principal_percentage_ownership" : 50,
    "short_business_name" : null,
    "ownership_type" : "PRIVATE",
    "tax_id_provided" : true,
    "business_tax_id_provided" : true,
    "default_statement_descriptor" : "Petes Coffee"
  },
  "tags" : {
    "Studio Rating" : "4.7"
  },
  "created_at" : "2017-08-15T02:03:32.73Z",
  "updated_at" : "2017-08-15T02:03:32.73Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Create an Identity resource with the merchant’s underwriting information.

HTTP Request

POST https://api-staging.finix.io/identities

Business-specific Request Arguments

Field Type Description
business_name string, required Merchant’s full legal business name (If INDIVIDUAL_SOLE_PROPRIETORSHIP, please input first name, Full legal last name and middle initial; max 120 characters)
doing_business_as string, required Alternate name of the business. If no other name is used please use the same value for business_name (max 60 characters)
business_type string, required Please select one of the following values: INDIVIDUAL_SOLE_PROPRIETORSHIP, CORPORATION, LIMITED_LIABILITY_COMPANY, PARTNERSHIP, ASSOCIATION_ESTATE_TRUST, TAX_EXEMPT_ORGANIZATION, INTERNATIONAL_ORGANIZATION, GOVERNMENT_AGENCY
business_tax_id string, required Nine digit Tax Identification Number (TIN), Employer Identification Number (EIN) or if the business_type is INDIVIDUAL_SOLE_PROPRIETORSHIP and a Tax ID is not available, the principal’s Social Security Number (SSN)
url string, required Merchant’s publicly available website (max 100 characters)
business_phone string, required Customer service phone number where the merchant can be reached (max 10 characters)
incorporation_date object, required Date company was founded (See below for a full list of the child attributes)
business_address object, required Primary address for the legal entity (Full description of child attributes below)
ownership_type string, required Values can be either PUBLIC to indicate a publicly traded company or PRIVATE for privately held businesses

Principal-specific Request Arguments

(i.e. authorized representative or primary contact responsible for the account)

Field Type Description
first_name string, required Full legal first name of the merchant’s principal representative (max 20 characters)
last_name string, required Full legal last name of the merchant’s principal representative (max 20 characters)
title string, required Principal’s corporate title or role (i.e. Chief Executive Officer, CFO, etc.; max 60 characters)
principal_percentage_ownership integer, required Percentage of company owned by the principal (min 0; max 100)
tax_id string, required Nine digit Social Security Number (SSN) for the principal
dob object, required Principal’s date of birth (Full description of child attributes below)
phone string, required Principal’s phone number (max 10 characters)
email string, required Principal’s email address where they can be reached (max 100 characters)
personal_address object, required Principal’s personal home address. This field is used for identity verification purposes (Full description of child attributes below)

Processing-specific Request Arguments

Field Type Description
default_statement_descriptor string, required Billing descriptor displayed on the buyer’s bank or card statement (Length must be between 1 and 20 characters)
annual_card_volume integer, required Approximate annual credit card sales expected to be processed in cents by this merchant (max 23 characters)
max_transaction_amount integer, required Maximum amount that can be transacted for a single transaction in cents (max 12 characters)
mcc string, required Merchant Category Code (MCC) that this merchant will be classified under
has_accepted_credit_cards_previously boolean, optional Defaults to false if not passed

Address-object Request Arguments

Field Type Description
line1 string, required First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, required 2-letter State code
postal_code string, required Zip or Postal code (max 7 characters)
country string, required 3-Letter Country code

Incorporation Date-object Request Arguments

Field Type Description
day integer, required Day business was incorporated (between 1 and 31)
month integer, required Month business was incorporated (between 1 and 12)
year integer, required Year business was incorporated (4-digit)

DOB-object Request Arguments

Field Type Description
day integer, required Day of birth (between 1 and 31)
month integer, required Month of birth (between 1 and 12)
year integer, required Year of birth (4-digit)

Fetch a Identity


curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;

Maybe<Identity> response = api.identities.id("IDgqagivtqV3BhPyBNGTucTu").get();
if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to fetch Identity");
}
Identity identity = response.view();

<?php
use Finix\Resources\Identity;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');


from finix.resources import Identity
identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")

identity = Finix::Identity.retrieve(:id=>"IDgqagivtqV3BhPyBNGTucTu")


Example Response:

{
  "id" : "IDgqagivtqV3BhPyBNGTucTu",
  "entity" : {
    "title" : "CEO",
    "first_name" : "dwayne",
    "last_name" : "Sunkhronos",
    "email" : "user@example.org",
    "business_name" : "Petes Coffee",
    "business_type" : "INDIVIDUAL_SOLE_PROPRIETORSHIP",
    "doing_business_as" : "Petes Coffee",
    "phone" : "1234567890",
    "business_phone" : "+1 (408) 756-4497",
    "personal_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 7",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "business_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 8",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "mcc" : "0742",
    "dob" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "max_transaction_amount" : 12000000,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : "www.PetesCoffee.com",
    "annual_card_volume" : 12000000,
    "has_accepted_credit_cards_previously" : true,
    "incorporation_date" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "principal_percentage_ownership" : 50,
    "short_business_name" : null,
    "ownership_type" : "PRIVATE",
    "tax_id_provided" : true,
    "business_tax_id_provided" : true,
    "default_statement_descriptor" : "Petes Coffee"
  },
  "tags" : {
    "Studio Rating" : "4.7"
  },
  "created_at" : "2017-08-15T02:03:32.71Z",
  "updated_at" : "2017-08-15T02:03:32.71Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

HTTP Request

GET https://api-staging.finix.io/identities/:IDENTITY_ID

URL Parameters

Parameter Description
:IDENTITY_ID ID of the Identity

List all Identities

curl https://api-staging.finix.io/identities/ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56


import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.lib.Page;

Maybe<Page<Identity>> response = api.identities.get();

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    System.out.println(error.getMessage());
    System.out.println(error.getDetails());
    throw new RuntimeException("API error attempting to list all Identities");
}

Page<Identity> page = response.view();

<?php
use Finix\Resources\Identity;

$identities= Identity::getPagination("/identities");




from finix.resources import Identity
identity = Identity.get()

identities = Finix::Identity.retrieve


Example Response:

{
  "_embedded" : {
    "identities" : [ {
      "id" : "ID3iy9oJJydKBPfyGjSoXGuz",
      "entity" : {
        "title" : null,
        "first_name" : "Laura",
        "last_name" : "Sterling",
        "email" : "therock@gmail.com",
        "business_name" : null,
        "business_type" : null,
        "doing_business_as" : null,
        "phone" : "7145677613",
        "business_phone" : null,
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : null,
        "mcc" : null,
        "dob" : null,
        "max_transaction_amount" : 0,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : null,
        "annual_card_volume" : 0,
        "has_accepted_credit_cards_previously" : false,
        "incorporation_date" : null,
        "principal_percentage_ownership" : null,
        "short_business_name" : null,
        "ownership_type" : null,
        "tax_id_provided" : false,
        "business_tax_id_provided" : false,
        "default_statement_descriptor" : null
      },
      "tags" : {
        "key" : "value"
      },
      "created_at" : "2017-08-15T02:03:38.97Z",
      "updated_at" : "2017-08-15T02:03:38.97Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDqHr2iFt2VUqgB6eGZh9oGK",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Prestige World Wide",
        "business_type" : "GOVERNMENT_AGENCY",
        "doing_business_as" : "Prestige World Wide",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.PrestigeWorldWide.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PUBLIC",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Prestige World Wide"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:35.89Z",
      "updated_at" : "2017-08-15T02:03:35.89Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDqHr2iFt2VUqgB6eGZh9oGK/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDpu4nzhpvCmaXY7XMyj1n9P",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Bobs Burgers",
        "business_type" : "INTERNATIONAL_ORGANIZATION",
        "doing_business_as" : "Bobs Burgers",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.BobsBurgers.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PRIVATE",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Bobs Burgers"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:35.50Z",
      "updated_at" : "2017-08-15T02:03:35.50Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDpu4nzhpvCmaXY7XMyj1n9P/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDvo2ADAc2RrgUWKoFhdhuNw",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Lees Sandwiches",
        "business_type" : "TAX_EXEMPT_ORGANIZATION",
        "doing_business_as" : "Lees Sandwiches",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.LeesSandwiches.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PUBLIC",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Lees Sandwiches"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:35.06Z",
      "updated_at" : "2017-08-15T02:03:35.06Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDvo2ADAc2RrgUWKoFhdhuNw/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDjtAWkqxURj76yvxcuamXoS",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Pollos Hermanos",
        "business_type" : "ASSOCIATION_ESTATE_TRUST",
        "doing_business_as" : "Pollos Hermanos",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.PollosHermanos.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PRIVATE",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Pollos Hermanos"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:34.66Z",
      "updated_at" : "2017-08-15T02:03:34.66Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDjtAWkqxURj76yvxcuamXoS/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDdeQEtYduDgrUtzNS369JLN",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Bobs Burgers",
        "business_type" : "PARTNERSHIP",
        "doing_business_as" : "Bobs Burgers",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.BobsBurgers.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PRIVATE",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Bobs Burgers"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:34.05Z",
      "updated_at" : "2017-08-15T02:03:34.05Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDdeQEtYduDgrUtzNS369JLN/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDjFkw1vynPTzhiXxX45SuZg",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Lees Sandwiches",
        "business_type" : "LIMITED_LIABILITY_COMPANY",
        "doing_business_as" : "Lees Sandwiches",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.LeesSandwiches.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PRIVATE",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Lees Sandwiches"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:33.55Z",
      "updated_at" : "2017-08-15T02:03:33.55Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDjFkw1vynPTzhiXxX45SuZg/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDuJdx35RSHqE6qUMFxZqj8b",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Golds Gym",
        "business_type" : "CORPORATION",
        "doing_business_as" : "Golds Gym",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.GoldsGym.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PRIVATE",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Golds Gym"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:33.15Z",
      "updated_at" : "2017-08-15T02:03:33.15Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDuJdx35RSHqE6qUMFxZqj8b/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDgqagivtqV3BhPyBNGTucTu",
      "entity" : {
        "title" : "CEO",
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Petes Coffee",
        "business_type" : "INDIVIDUAL_SOLE_PROPRIETORSHIP",
        "doing_business_as" : "Petes Coffee",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : "0742",
        "dob" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "max_transaction_amount" : 12000000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : "www.PetesCoffee.com",
        "annual_card_volume" : 12000000,
        "has_accepted_credit_cards_previously" : true,
        "incorporation_date" : {
          "day" : 27,
          "month" : 6,
          "year" : 1978
        },
        "principal_percentage_ownership" : 50,
        "short_business_name" : null,
        "ownership_type" : "PRIVATE",
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : "Petes Coffee"
      },
      "tags" : {
        "Studio Rating" : "4.7"
      },
      "created_at" : "2017-08-15T02:03:32.71Z",
      "updated_at" : "2017-08-15T02:03:32.71Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "IDmSEAfzR5Mm9oKRzrVC8viG",
      "entity" : {
        "title" : null,
        "first_name" : "dwayne",
        "last_name" : "Sunkhronos",
        "email" : "user@example.org",
        "business_name" : "Square",
        "business_type" : "LIMITED_LIABILITY_COMPANY",
        "doing_business_as" : "Square",
        "phone" : "1234567890",
        "business_phone" : "+1 (408) 756-4497",
        "personal_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 7",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "business_address" : {
          "line1" : "741 Douglass St",
          "line2" : "Apartment 8",
          "city" : "San Mateo",
          "region" : "CA",
          "postal_code" : "94114",
          "country" : "USA"
        },
        "mcc" : null,
        "dob" : {
          "day" : 27,
          "month" : 5,
          "year" : 1978
        },
        "max_transaction_amount" : 1200000,
        "amex_mid" : null,
        "discover_mid" : null,
        "url" : null,
        "annual_card_volume" : 0,
        "has_accepted_credit_cards_previously" : false,
        "incorporation_date" : null,
        "principal_percentage_ownership" : null,
        "short_business_name" : null,
        "ownership_type" : null,
        "tax_id_provided" : true,
        "business_tax_id_provided" : true,
        "default_statement_descriptor" : null
      },
      "tags" : {
        "application_name" : "Square"
      },
      "created_at" : "2017-08-15T02:03:29.71Z",
      "updated_at" : "2017-08-15T02:03:29.73Z",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/verifications"
        },
        "merchants" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/merchants"
        },
        "settlements" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/settlements"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/authorizations"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/transfers"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/payment_instruments"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG/disputes"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 10
  }
}

HTTP Request

GET https://api-staging.finix.io/identities/

Update an Identity

curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -X PUT \
    -d '
    {
        "tags": {
            "key": "value_2"
        },
        "entity": {
            "business_phone": "+1 (408) 756-4497",
            "first_name": "Bernard",
            "last_name": "James",
            "title": "CTO",
            "dob": {
                "year": 1988,
                "day": 2,
                "month": 5
            },
            "ownership_type": "PRIVATE",
            "has_accepted_credit_cards_previously": true,
            "mcc": "0742",
            "phone": "7144177878",
            "business_tax_id": "123456789",
            "max_transaction_amount": 1200000,
            "principal_percentage_ownership": 50,
            "doing_business_as": "Pawny City Hall",
            "annual_card_volume": 12000000,
            "default_statement_descriptor": "Pawny City Hall",
            "url": "www.PawnyCityHall.com",
            "business_name": "Pawny City Hall",
            "personal_address": {
                "city": "San Diego",
                "country": "USA",
                "region": "CA",
                "line2": "Apartment 2",
                "line1": "712 Douglass St",
                "postal_code": "94194"
            },
            "email": "user@example.org",
            "tax_id": "999999999"
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.enums.BusinessType;
import io.finix.payments.forms.*;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.Identity;

IdentityForm form = IdentityForm.builder()
                .entity(
                  IdentityEntityForm.builder()
                      .firstName("dwayne")
                      .email("self@newdomain.com")
                      .businessPhone("+1 (408) 756-4497")
                      .build())
                .build();

Maybe<Identity> response = api.identities.id("IDgqagivtqV3BhPyBNGTucTu").put(form);

if (! response.succeeded()) {
    System.out.println(response.error());
    throw new RuntimeException("API error attempting to update identity");
}

Identity updatedIdentity = response.view();

<?php



from finix.resources import Identity

identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")
identity.entity["first_name"] = "Bernard"
identity.save()

identity = Finix::Identity.retrieve(:id=>"IDgqagivtqV3BhPyBNGTucTu")

identity.entity["first_name"] = "Bernard"
identity.save

Example Response:

{
  "id" : "IDgqagivtqV3BhPyBNGTucTu",
  "entity" : {
    "title" : "CTO",
    "first_name" : "Bernard",
    "last_name" : "James",
    "email" : "user@example.org",
    "business_name" : "Pawny City Hall",
    "business_type" : "INDIVIDUAL_SOLE_PROPRIETORSHIP",
    "doing_business_as" : "Pawny City Hall",
    "phone" : "7144177878",
    "business_phone" : "+1 (408) 756-4497",
    "personal_address" : {
      "line1" : "712 Douglass St",
      "line2" : "Apartment 2",
      "city" : "San Diego",
      "region" : "CA",
      "postal_code" : "94194",
      "country" : "USA"
    },
    "business_address" : {
      "line1" : "741 Douglass St",
      "line2" : "Apartment 8",
      "city" : "San Mateo",
      "region" : "CA",
      "postal_code" : "94114",
      "country" : "USA"
    },
    "mcc" : "0742",
    "dob" : {
      "day" : 2,
      "month" : 5,
      "year" : 1988
    },
    "max_transaction_amount" : 1200000,
    "amex_mid" : null,
    "discover_mid" : null,
    "url" : "www.PawnyCityHall.com",
    "annual_card_volume" : 12000000,
    "has_accepted_credit_cards_previously" : true,
    "incorporation_date" : {
      "day" : 27,
      "month" : 6,
      "year" : 1978
    },
    "principal_percentage_ownership" : 50,
    "short_business_name" : null,
    "ownership_type" : "PRIVATE",
    "tax_id_provided" : true,
    "business_tax_id_provided" : true,
    "default_statement_descriptor" : "Pawny City Hall"
  },
  "tags" : {
    "key" : "value_2"
  },
  "created_at" : "2017-08-15T02:03:32.71Z",
  "updated_at" : "2017-08-15T02:03:56.58Z",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/verifications"
    },
    "merchants" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants"
    },
    "settlements" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/authorizations"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/transfers"
    },
    "payment_instruments" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/payment_instruments"
    },
    "disputes" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/disputes"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Update the information of a previously created Identity. Please note that in the case of merchant accounts this API request alone does not update this information on the underlying processor. To update the merchant’s information on the underlying processor you must update the merchant on the processor.

HTTP Request

POST https://api-staging.finix.io/identities

Business-specific Request Arguments

Field Type Description
business_name string, required Merchant’s full legal business name (If INDIVIDUAL_SOLE_PROPRIETORSHIP, please input first name, Full legal last name and middle initial; max 120 characters)
doing_business_as string, required Alternate name of the business. If no other name is used please use the same value for business_name (max 60 characters)
business_type string, required Please select one of the following values: INDIVIDUAL_SOLE_PROPRIETORSHIP, CORPORATION, LIMITED_LIABILITY_COMPANY, PARTNERSHIP, ASSOCIATION_ESTATE_TRUST, TAX_EXEMPT_ORGANIZATION, INTERNATIONAL_ORGANIZATION, GOVERNMENT_AGENCY
business_tax_id string, required Nine digit Tax Identification Number (TIN), Employer Identification Number (EIN) or if the business_type is INDIVIDUAL_SOLE_PROPRIETORSHIP and a Tax ID is not available, the principal’s Social Security Number (SSN)
url string, required Merchant’s publicly available website (max 100 characters)
business_phone string, required Customer service phone number where the merchant can be reached (max 10 characters)
incorporation_date object, required Date company was founded (See below for a full list of the child attributes)
business_address object, required Primary address for the legal entity (Full description of child attributes below)
ownership_type string, required Values can be either PUBLIC to indicate a publicly traded company or PRIVATE for privately held businesses

Principal-specific Request Arguments

(i.e. authorized representative or primary contact responsible for the account)

Field Type Description
first_name string, required Full legal first name of the merchant’s principal representative (max 20 characters)
last_name string, required Full legal last name of the merchant’s principal representative (max 20 characters)
title string, required Principal’s corporate title or role (i.e. Chief Executive Officer, CFO, etc.; max 60 characters)
principal_percentage_ownership integer, required Percentage of company owned by the principal (min 0; max 100)
tax_id string, required Nine digit Social Security Number (SSN) for the principal
dob object, required Principal’s date of birth (Full description of child attributes below)
phone string, required Principal’s phone number (max 10 characters)
email string, required Principal’s email address where they can be reached (max 100 characters)
personal_address object, required Principal’s personal home address. This field is used for identity verification purposes (Full description of child attributes below)

Processing-specific Request Arguments

Field Type Description
default_statement_descriptor string, required Billing descriptor displayed on the buyer’s bank or card statement (Length must be between 1 and 20 characters)
annual_card_volume integer, required Approximate annual credit card sales expected to be processed in cents by this merchant (max 23 characters)
max_transaction_amount integer, required Maximum amount that can be transacted for a single transaction in cents (max 12 characters)
mcc string, required Merchant Category Code (MCC) that this merchant will be classified under
has_accepted_credit_cards_previously boolean, optional Defaults to false if not passed

Address-object Request Arguments

Field Type Description
line1 string, optional First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, required City (max 20 characters)
region string, optional 2-letter State code
postal_code string, optional Zip or Postal code (max 7 characters)
country string, optional 3-Letter Country code

Incorporation Date-object Request Arguments

Field Type Description
day integer, required Day business was incorporated (between 1 and 31)
month integer, required Month business was incorporated (between 1 and 12)
year integer, required Year business was incorporated (4-digit)

DOB-object Request Arguments

Field Type Description
day integer, required Day of birth (between 1 and 31)
month integer, required Month of birth (between 1 and 12)
year integer, required Year of birth (4-digit)

Provision a Merchant


curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "processor": null,
        "tags": {
            "key_2": "value_2"
        }
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;

Maybe<Identity> response = api.identities.id("IDgqagivtqV3BhPyBNGTucTu").get();
if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to fetch Identity");
}
Identity identity = response.view();

MerchantUnderwritingForm form = MerchantUnderwritingForm.builder()
    .tags(ImmutableMap.of("key", "value"))
    .build();

Maybe<Merchant> merchantResponse = api.identities.id(identity.id).merchants.post(form);

if (! merchantResponse.succeeded()) {
            ApiError error = merchantResponse.error();
            System.out.println(error.getCode());
            throw new RuntimeException("API error attempting to provision Merchant");
        }
Merchant merchant = merchantResponse.view();

<?php
use Finix\Resources\Identity;
use Finix\Resources\Merchant;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');

$merchant = $identity->provisionMerchantOn(new Merchant());



from finix.resources import Identity
from finix.resources import Merchant

identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")
merchant = identity.provision_merchant_on(Merchant())

identity = Finix::Identity.retrieve(:id=>"IDgqagivtqV3BhPyBNGTucTu")

merchant = identity.provision_merchant

Example Response:

{
  "id" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "verification" : "VIhuyGtwfpZh43Adv4FTCtK7",
  "merchant_profile" : "MP9ymkxBn5F1tZ5c6ADhBEXP",
  "processor" : "DUMMY_V1",
  "processing_enabled" : false,
  "settlement_enabled" : false,
  "tags" : { },
  "created_at" : "2017-08-15T02:03:37.56Z",
  "updated_at" : "2017-08-15T02:03:37.56Z",
  "onboarding_state" : "PROVISIONING",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications"
    },
    "merchant_profile" : {
      "href" : "https://api-staging.finix.io/merchant_profiles/MP9ymkxBn5F1tZ5c6ADhBEXP"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "verification" : {
      "href" : "https://api-staging.finix.io/verifications/VIhuyGtwfpZh43Adv4FTCtK7"
    }
  }
}

Provision a Merchant for a previously created Identity resource to begin transacting on their behalf.

Merchant resources can have 3 potential states:

  1. PROVISIONING: Request is pending (state will typically change after two minutes)

  2. APPROVED: Merchant has been approved and can begin processing

  3. REJECTED: Merchant was rejected by the processor either because the collected underwriting information was invalid or it failed one a number of regulatory and compliance checks (e.g. KYC, OFAC or MATCH)

HTTP Request

POST https://api-staging.finix.io/identities/identity_id/merchants

URL Parameters

Parameter Description
identity_id ID of the Identity

Merchants

A Merchant resource represents a business’s merchant account on a processor. In other words, any web service that connects buyers (i.e. customers) and sellers (i.e. merchants).

Provision a Merchant

curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/merchants \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "processor": null,
        "tags": {
            "key_2": "value_2"
        }
    }'

import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.*;
import io.finix.payments.forms.*;

MerchantUnderwritingForm form = MerchantUnderwritingForm.builder()
    .processor(null)
    .tags(ImmutableMap.of("key", "value"))
    .build();

Maybe<Merchant> underwriteMerchant = api.identities.id("IDgqagivtqV3BhPyBNGTucTu").merchants.post(form);

if(! underwriteMerchant.succeeded()){
   System.out.println(underwriteMerchant.error());
}

Merchant provisionMerchant = underwriteMerchant.view();

<?php
use Finix\Resources\Identity;
use Finix\Resources\Merchant;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');

$merchant = $identity->provisionMerchantOn(new Merchant());



from finix.resources import Identity
from finix.resources import Merchant

identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")
merchant = identity.provision_merchant_on(Merchant())

identity = Finix::Identity.retrieve(:id => "MUwoSMzoUiAXsY6ydFhjFp6t")

merchant = identity.provision_merchant

Example Response:

{
  "id" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "verification" : "VIhuyGtwfpZh43Adv4FTCtK7",
  "merchant_profile" : "MP9ymkxBn5F1tZ5c6ADhBEXP",
  "processor" : "DUMMY_V1",
  "processing_enabled" : false,
  "settlement_enabled" : false,
  "tags" : { },
  "created_at" : "2017-08-15T02:03:37.56Z",
  "updated_at" : "2017-08-15T02:03:37.56Z",
  "onboarding_state" : "PROVISIONING",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications"
    },
    "merchant_profile" : {
      "href" : "https://api-staging.finix.io/merchant_profiles/MP9ymkxBn5F1tZ5c6ADhBEXP"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "verification" : {
      "href" : "https://api-staging.finix.io/verifications/VIhuyGtwfpZh43Adv4FTCtK7"
    }
  }
}

Provision a Merchant for a previously created Identity resource to begin transacting on their behalf.

Merchant resources can have 3 potential onboarding_states:

  1. PROVISIONING: Request is pending (state will typically change after two minutes)

    • processing_enabled: False
    • settlement_enabled: False
  2. APPROVED: Merchant has been approved and can begin processing

    • processing_enabled: True
    • settlement_enabled: True
  3. REJECTED: Merchant was rejected by the processor either because the collected information was invalid or it failed one of a number of regulatory and/or compliance checks (e.g. KYC, OFAC or MATCH)

    • processing_enabled: False
    • settlement_enabled: False

HTTP Request

POST https://api-staging.finix.io/identities/:IDENTITY_ID/merchants

URL Parameters

Parameter Description
:IDENTITY_ID ID of the Identity

Fetch a Merchant

curl https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.Merchant;

Maybe<Merchant> response = api.merchants
    .id(merchant.id)
    .get();

if(! response.succeeded()){
    System.out.println(response.error());
    System.out.println(response.error().getDetails());
    throw new RuntimeException("API error attempting to fetch Merchant");
}

Merchant merchantView = response.view();

<?php
use Finix\Resources\Merchant;

$merchant = Merchant::retrieve('MUwoSMzoUiAXsY6ydFhjFp6t');



from finix.resources import Merchant
merchant = Merchant.get(id="MUwoSMzoUiAXsY6ydFhjFp6t")

merchant = Finix::Merchant.retrieve(:id => "MUwoSMzoUiAXsY6ydFhjFp6t")

Example Response:

{
  "id" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "verification" : null,
  "merchant_profile" : "MP5KYoDz5h3K8RptphPNa8qg",
  "processor" : "DUMMY_V1",
  "processing_enabled" : true,
  "settlement_enabled" : true,
  "tags" : { },
  "created_at" : "2017-08-15T02:03:37.52Z",
  "updated_at" : "2017-08-15T02:03:37.68Z",
  "onboarding_state" : "APPROVED",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications"
    },
    "merchant_profile" : {
      "href" : "https://api-staging.finix.io/merchant_profiles/MP5KYoDz5h3K8RptphPNa8qg"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

HTTP Request

GET https://api-staging.finix.io/merchants/:MERCHANT_ID

URL Parameters

Parameter Description
:MERCHANT_ID ID of the Merchant

Reattempt Merchant Provisioning

curl https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '{}'
Merchant merchant = client.merchantsClient().fetch("MUwoSMzoUiAXsY6ydFhjFp6t");
Verification verification = merchant.verify(
  Verification.builder().build()
);
<?php
use Finix\Resources\Merchant;
use Finix\Resources\Verification;

$merchant = Merchant::retrieve('MUwoSMzoUiAXsY6ydFhjFp6t');
$verification = new Verification();
$verification = $merchant->verifyOn($verification);


from finix.resources import Merchant
from finix.resources import Verification

merchant = Merchant.get(id="MUwoSMzoUiAXsY6ydFhjFp6t")

verification = merchant.verify_on(Verification())

merchant = Finix::Merchant.retrieve(:id => "MUwoSMzoUiAXsY6ydFhjFp6t")

verification = merchant.verify

Example Response:

{
  "id" : "VI5Td2B5q5XzYohqSyjvY6yA",
  "tags" : { },
  "messages" : [ ],
  "raw" : null,
  "processor" : "DUMMY_V1",
  "state" : "PENDING",
  "created_at" : "2017-08-15T02:03:57.83Z",
  "updated_at" : "2017-08-15T02:03:57.85Z",
  "trace_id" : "8b4c3e18-5f30-4c1f-b79f-50f444777692",
  "payment_instrument" : null,
  "merchant" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "identity" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/verifications/VI5Td2B5q5XzYohqSyjvY6yA"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "merchant" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
    }
  }
}

Re-attempt provisioning a Merchant account on a processor if the previous attempt returned a FAILED onboarding_state.

HTTP Request

POST https://api-staging.finix.io/merchants/:MERCHANT_ID/verifications

URL Parameters

Parameter Description
:MERCHANT_ID ID of the Merchant

Update Info on Processor

curl https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '{}'


<?php
use Finix\Resources\Merchant;
use Finix\Resources\Verification;

$merchant = Merchant::retrieve('MUwoSMzoUiAXsY6ydFhjFp6t');
$verification = new Verification();
$verification = $merchant->verifyOn($verification);


from finix.resources import Merchant
merchant = Merchant.get(id="MUwoSMzoUiAXsY6ydFhjFp6t")

merchant.entity["first_name"] = "Michael"
merchant.save()

merchant = Finix::Merchant.retrieve(:id => "MUwoSMzoUiAXsY6ydFhjFp6t")

verification = merchant.entity["default_statement_descriptor"] = "Prestige World Wide"

Example Response:

{
  "id" : "VI5Td2B5q5XzYohqSyjvY6yA",
  "tags" : { },
  "messages" : [ ],
  "raw" : null,
  "processor" : "DUMMY_V1",
  "state" : "PENDING",
  "created_at" : "2017-08-15T02:03:57.83Z",
  "updated_at" : "2017-08-15T02:03:57.85Z",
  "trace_id" : "8b4c3e18-5f30-4c1f-b79f-50f444777692",
  "payment_instrument" : null,
  "merchant" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "identity" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/verifications/VI5Td2B5q5XzYohqSyjvY6yA"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "merchant" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
    }
  }
}

Update Identity information (e.g. default_statement_descriptor, KYC info, etc.) on the underlying processor.

HTTP Request

POST https://api-staging.finix.io/merchants/:MERCHANT_ID/verifications

URL Parameters

Parameter Description
:MERCHANT_ID ID of the Merchant

List all Merchants

curl https://api-staging.finix.io/merchants/ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.lib.Page;
import io.finix.payments.views.Merchant;

Maybe<Page<Merchant>> response = api.merchants.get();

if (! response.succeeded()) {
  ApiError error = response.error();
  System.out.println(error.getCode());
  System.out.println(error.getMessage());
  System.out.println(error.getDetails());
  throw new RuntimeException("API error attempting to list all Merchants");
}

Page<Merchant> page = response.view();

<?php
use Finix\Resources\Merchant;

$merchants = Merchant::getPagination("/merchants");




from finix.resources import Merchant
merchant = Merchant.get()

merchants = Finix::Merchant.retrieve

Example Response:

{
  "_embedded" : {
    "merchants" : [ {
      "id" : "MUwoSMzoUiAXsY6ydFhjFp6t",
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "verification" : null,
      "merchant_profile" : "MP5KYoDz5h3K8RptphPNa8qg",
      "processor" : "DUMMY_V1",
      "processing_enabled" : true,
      "settlement_enabled" : true,
      "tags" : { },
      "created_at" : "2017-08-15T02:03:37.52Z",
      "updated_at" : "2017-08-15T02:03:37.68Z",
      "onboarding_state" : "APPROVED",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications"
        },
        "merchant_profile" : {
          "href" : "https://api-staging.finix.io/merchant_profiles/MP5KYoDz5h3K8RptphPNa8qg"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 1
  }
}

HTTP Request

GET https://api-staging.finix.io/merchants/

List Merchant Verifications

curl https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56


<?php
use Finix\Resources\Merchant;
use Finix\Resources\Verification;

$merchant = Merchant::retrieve('MUwoSMzoUiAXsY6ydFhjFp6t');
$verifications = Verification::getPagination($merchant->getHref("verifications"));




from finix.resources import Merchant
merchant = Merchant.get(id="MUwoSMzoUiAXsY6ydFhjFp6t")
verifications = merchant.verifications

merchant = Finix::Merchant.retrieve(:id => "MUwoSMzoUiAXsY6ydFhjFp6t")
verifications = merchant.verifications

Example Response:

{
  "_embedded" : {
    "verifications" : [ {
      "id" : "VIhuyGtwfpZh43Adv4FTCtK7",
      "tags" : {
        "key_2" : "value_2"
      },
      "messages" : [ ],
      "raw" : "RawDummyMerchantUnderwriteResult",
      "processor" : "DUMMY_V1",
      "state" : "SUCCEEDED",
      "created_at" : "2017-08-15T02:03:37.52Z",
      "updated_at" : "2017-08-15T02:03:37.81Z",
      "trace_id" : "e7065766-ac4c-4f64-9911-28d94b4b15ae",
      "payment_instrument" : null,
      "merchant" : "MUwoSMzoUiAXsY6ydFhjFp6t",
      "identity" : null,
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/verifications/VIhuyGtwfpZh43Adv4FTCtK7"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "merchant" : {
          "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/merchants/MUwoSMzoUiAXsY6ydFhjFp6t/verifications?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 1
  }
}

Retrieve all attempts to onboard (i.e. provision) a merchant onto a processor.

HTTP Request

GET https://api-staging.finix.io/merchants/:MERCHANT_ID/verifications

URL Parameters

Parameter Description
:MERCHANT_ID ID of the Merchant

Payment Instruments

A Payment Instrument resource represents either a credit card or bank account. A Payment Instrument may be tokenized multiple times and each tokenization produces a unique ID. Each ID may only be associated one time and to only one Identity. Once associated, a Payment Instrument may not be disassociated from an Identity.

Create a Card



curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "name": "Walter James",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "ID3iy9oJJydKBPfyGjSoXGuz"
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.forms.Address;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import com.google.common.collect.ImmutableMap;

PaymentCardForm form = PaymentCardForm.builder()
        .name("Joe Doe")
        .number("4957030420210454")
        .securityCode("112")
        .expirationYear(2020)
        .identity("IDgqagivtqV3BhPyBNGTucTu")
        .expirationMonth(12)
        .address(
                Address.builder()
                        .city("San Mateo")
                        .country("USA")
                        .region("CA")
                        .line1("123 Fake St")
                        .line2("#7")
                        .postalCode("90210")
                        .build()
        )
        .tags(ImmutableMap.of("card_name", "Business Card"))
        .build();

Maybe<PaymentCard> response = api.instruments.post(form);
        if (! response.succeeded()) {
            ApiError error = response .error();
            System.out.println(error.getCode());
            throw new RuntimeException("API error attempting to create Payment Card");
        }
PaymentCard card = response.view();

<?php
use Finix\Resources\PaymentCard;
use Finix\Resources\Identity;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$card = new PaymentCard(
    array(
        "name"=> "Walter James",
        "expiration_year"=> 2020,
        "tags"=> array(
            "card_name"=> "Business Card"
        ),
        "number"=> "4957030420210454",
        "expiration_month"=> 12,
        "address"=> array(
            "city"=> "San Mateo",
            "country"=> "USA",
            "region"=> "CA",
            "line2"=> "Apartment 7",
            "line1"=> "741 Douglass St",
            "postal_code"=> "94114"
        ),
        "security_code"=> "112",
        "type"=> "PAYMENT_CARD",
        "identity"=> "ID3iy9oJJydKBPfyGjSoXGuz"
    ));
$card = $identity->createPaymentCard($card);



from finix.resources import PaymentCard

card = PaymentCard(**
    {
        "name": "Walter James",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "ID3iy9oJJydKBPfyGjSoXGuz"
    }).save()
card = Finix::PaymentCard.new(
    {
        "name"=> "Walter James",
        "expiration_year"=> 2020,
        "tags"=> {
            "card_name"=> "Business Card"
        },
        "number"=> "4957030420210454",
        "expiration_month"=> 12,
        "address"=> {
            "city"=> "San Mateo",
            "country"=> "USA",
            "region"=> "CA",
            "line2"=> "Apartment 7",
            "line1"=> "741 Douglass St",
            "postal_code"=> "94114"
        },
        "security_code"=> "112",
        "type"=> "PAYMENT_CARD",
        "identity"=> "ID3iy9oJJydKBPfyGjSoXGuz"
    }).save

Example Response:

{
  "id" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "fingerprint" : "FPR1187401672",
  "tags" : {
    "card_name" : "Business Card"
  },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : "Walter James",
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2017-08-15T02:03:39.45Z",
  "updated_at" : "2017-08-15T02:03:39.45Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "ID3iy9oJJydKBPfyGjSoXGuz",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/updates"
    }
  }
}

Please review our guide on how to tokenize cards via the embedded tokenization form

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
identity string, required ID of the Identity that the card should be associated
type string, required Type of Payment Instrument (for cards input PAYMENT_CARD)
number string, required Credit card account number
security_code string, optional The 3-4 digit security code for the card (i.e. CVV code)
expiration_month integer, required Expiration month (e.g. 12 for December)
expiration_year integer, required 4-digit expiration year
name string, optional Full name of the registered card holder
address object, optional Billing address (Full description of child attributes below)

Address-object Request Arguments

Field Type Description
line1 string, optional First line of the address (max 60 characters)
line2 string, optional Second line of the address (max 60 characters)
city string, optional City (max 20 characters)
region string, optional 2-letter State code
postal_code string, optional Zip or Postal code (max 7 characters)
country string, optional 3-Letter Country code

Create a Bank Account


curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "account_type": "SAVINGS",
        "name": "Fran Lemke",
        "tags": {
            "Bank Account": "Company Account"
        },
        "country": "USA",
        "bank_code": "123123123",
        "account_number": "123123123",
        "type": "BANK_ACCOUNT",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }'


import io.finix.payments.ApiClient;
import io.finix.payments.enums.BankAccountType;
import io.finix.payments.forms.BankAccountForm;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.BankAccount;
import io.finix.payments.views.Identity;
import java.util.Currency;

BankAccountForm form = BankAccountForm.builder()
        .name("Joe Doe")
        .identity("IDgqagivtqV3BhPyBNGTucTu")
        .accountNumber("84012312415")
        .bankCode("840123124")
        .accountType(BankAccountType.SAVINGS)
        .companyName("company name")
        .country("USA")
        .currency(Currency.getInstance("USD"))
        .build();

Maybe<BankAccount> request = api.instruments.post(form);

if (! request.succeeded()) {
    ApiError error = request.error();
    System.out.println(error);
    throw new RuntimeException("API error attempting to create bank account");
}
BankAccount bankAccount = request.view();

<?php
use Finix\Resources\Identity;
use Finix\Resources\BankAccount;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$bank_account = new BankAccount(
    array(
        "account_type"=> "SAVINGS",
        "name"=> "Fran Lemke",
        "tags"=> array(
            "Bank Account"=> "Company Account"
        ),
        "country"=> "USA",
        "bank_code"=> "123123123",
        "account_number"=> "123123123",
        "type"=> "BANK_ACCOUNT",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    ));
$bank_account = $identity->createBankAccount($bank_account);


from finix.resources import BankAccount

bank_account = BankAccount(**
    {
        "account_type": "SAVINGS",
        "name": "Fran Lemke",
        "tags": {
            "Bank Account": "Company Account"
        },
        "country": "USA",
        "bank_code": "123123123",
        "account_number": "123123123",
        "type": "BANK_ACCOUNT",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }).save()
bank_account = Finix::BankAccount.new(
    {
        "account_type"=> "SAVINGS",
        "name"=> "Fran Lemke",
        "tags"=> {
            "Bank Account"=> "Company Account"
        },
        "country"=> "USA",
        "bank_code"=> "123123123",
        "account_number"=> "123123123",
        "type"=> "BANK_ACCOUNT",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    }).save

Example Response:

{
  "id" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
  "fingerprint" : "FPR-1215770130",
  "tags" : {
    "Bank Account" : "Company Account"
  },
  "bank_code" : "123123123",
  "country" : "USA",
  "masked_account_number" : "XXXXX3123",
  "name" : "Fran Lemke",
  "account_type" : "SAVINGS",
  "created_at" : "2017-08-15T02:03:36.38Z",
  "updated_at" : "2017-08-15T02:03:36.38Z",
  "instrument_type" : "BANK_ACCOUNT",
  "type" : "BANK_ACCOUNT",
  "currency" : "USD",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
account_number string, required Bank account number
bank_code string, required Bank routing number
type string, required Type of Payment Instrument (for bank accounts use BANK_ACCOUNT)
identity string, required ID for the Identity resource which the account is associated
account_type string, required Either CHECKING or SAVINGS
name string, required Account owner’s full name (max 40 characters)

Associate a Token

curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "token": "TKr643v58k9eGhcR1VDByWn7",
        "type": "TOKEN",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }'


import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

TokenAssociationForm tokenForm =  TokenAssociationForm.builder()
    .token("TKr643v58k9eGhcR1VDByWn7")
    .identity("IDgqagivtqV3BhPyBNGTucTu")
    .build();

Maybe<PaymentCard> cardResponse = api.instruments.post(tokenForm);
if (! cardResponse.succeeded()) {
    ApiError error = cardResponse.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create Payment Card");
}
PaymentCard paymentCard = cardResponse.view();

<?php
use Finix\Resources\PaymentInstrument;

$card = new PaymentInstrument(
    array(
        "token"=> "TKr643v58k9eGhcR1VDByWn7",
        "type"=> "TOKEN",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    ));
$card = $card->save();



from finix.resources import PaymentInstrument

payment_instrument = PaymentInstrument(**
    {
        "token": "TKr643v58k9eGhcR1VDByWn7",
        "type": "TOKEN",
        "identity": "IDgqagivtqV3BhPyBNGTucTu"
    }).save()
card = Finix::PaymentInstrument.new(
    {
        "token"=> "TKr643v58k9eGhcR1VDByWn7",
        "type"=> "TOKEN",
        "identity"=> "IDgqagivtqV3BhPyBNGTucTu"
    }).save

Example Response:

{
  "id" : "PIr643v58k9eGhcR1VDByWn7",
  "fingerprint" : "FPR405642276",
  "tags" : { },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : null,
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "UNKNOWN",
  "security_code_verification" : "UNKNOWN",
  "created_at" : "2017-08-15T02:03:47.19Z",
  "updated_at" : "2017-08-15T02:03:47.19Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/updates"
    }
  }
}

Associate the newly tokenized card or bank with the instrument owner’s Identity.

HTTP Request

POST https://api-staging.finix.io/payment_instruments

Request Arguments

Field Type Description
token string, required ID for the Token that was returned via the tokenization client or hosted iframe
type string, required Must pass TOKEN as the value
identity string, required ID for the Identity resource which the account is to be associated

Fetch a Bank Account

curl https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \

import io.finix.payments.ApiClient;
import io.finix.payments.views.Instrument;
import io.finix.payments.interfaces.Maybe;

Maybe<Instrument> response = api.paymentInstruments
    .id("PIpSF1wdC9j2rDdPs8yyyUTJ")
    .get();

if(! response.succeeded()){
    System.out.println(response.error());
    System.out.println(response.error().getDetails());
    throw new RuntimeException("API error attempting to fetch Bank Account");
}

Instrument bankAccountView = response.view();

<?php
use Finix\Resources\PaymentInstrument;

$bank_account = PaymentInstrument::retrieve('PIpSF1wdC9j2rDdPs8yyyUTJ');



from finix.resources import PaymentInstrument
bank_account = PaymentInstrument.get(id="PIpSF1wdC9j2rDdPs8yyyUTJ")

bank_account = Finix::BankAccount.retrieve(:id=> "PIpSF1wdC9j2rDdPs8yyyUTJ")

Example Response:

{
  "id" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
  "fingerprint" : "FPR-1215770130",
  "tags" : {
    "Display Name" : "Updated Field"
  },
  "bank_code" : "123123123",
  "country" : "USA",
  "masked_account_number" : "XXXXX3123",
  "name" : "Fran Lemke",
  "account_type" : "SAVINGS",
  "created_at" : "2017-08-15T02:03:36.35Z",
  "updated_at" : "2017-08-15T02:03:36.96Z",
  "instrument_type" : "BANK_ACCOUNT",
  "type" : "BANK_ACCOUNT",
  "currency" : "USD",
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Fetch a previously created Payment Instrument that is of type BANK_ACCOUNT

HTTP Request

GET https://api-staging.finix.io/payment_instruments/:PAYMENT_INSTRUMENT_ID

URL Parameters

Parameter Description
:PAYMENT_INSTRUMENT_ID ID of the Payment Instrument

Fetch a Credit Card

curl https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;

Maybe<PaymentCard> response = api.instruments
  .id("PIpgvYknCDRcdsQkDUu3XJxZ")
  .get();

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to fetch Payment Card");
}
PaymentCard card = response.view();

<?php
use Finix\Resources\PaymentInstrument;

$card = PaymentInstrument::retrieve('PIpgvYknCDRcdsQkDUu3XJxZ');



from finix.resources import PaymentInstrument
credit_card = PaymentInstrument.get(id="PIpgvYknCDRcdsQkDUu3XJxZ")

card = Finix::PaymentCard.retrieve(:id=> "PIpgvYknCDRcdsQkDUu3XJxZ")


Example Response:

{
  "id" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "fingerprint" : "FPR1187401672",
  "tags" : {
    "card_name" : "Business Card"
  },
  "expiration_month" : 12,
  "expiration_year" : 2020,
  "last_four" : "0454",
  "brand" : "VISA",
  "card_type" : "UNKNOWN",
  "name" : "Walter James",
  "address" : {
    "line1" : "741 Douglass St",
    "line2" : "Apartment 7",
    "city" : "San Mateo",
    "region" : "CA",
    "postal_code" : "94114",
    "country" : "USA"
  },
  "address_verification" : "POSTAL_CODE_AND_STREET_MATCH",
  "security_code_verification" : "MATCHED",
  "created_at" : "2017-08-15T02:03:39.40Z",
  "updated_at" : "2017-08-15T02:03:44.91Z",
  "instrument_type" : "PAYMENT_CARD",
  "type" : "PAYMENT_CARD",
  "currency" : "USD",
  "identity" : "ID3iy9oJJydKBPfyGjSoXGuz",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ"
    },
    "authorizations" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/authorizations"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/transfers"
    },
    "verifications" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/verifications"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "updates" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/updates"
    }
  }
}

Fetch a previously created Payment Instrument that is of type PAYMENT_CARD

HTTP Request

GET https://api-staging.finix.io/payment_instruments/:PAYMENT_INSTRUMENT_ID

URL Parameters

Parameter Description
:PAYMENT_INSTRUMENT_ID ID of the Payment Instrument

Check for Card Updates (Account Updater)

Finix works with card networks so that your costumers can continue, without interruption, using your service even if their card has changed due to it being closed, lost, or stolen. When a successful account update record is located, the Payment Instrument will be automatically updated with the new primary account number or new expiration date.

curl https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/updates \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "merchant": "MUwoSMzoUiAXsY6ydFhjFp6t"
    }'


<?php



from finix.resources import PaymentCard

card = PaymentCard(**
    {
        "name": "Walter James",
        "expiration_year": 2020,
        "tags": {
            "card_name": "Business Card"
        },
        "number": "4957030420210454",
        "expiration_month": 12,
        "address": {
            "city": "San Mateo",
            "country": "USA",
            "region": "CA",
            "line2": "Apartment 7",
            "line1": "741 Douglass St",
            "postal_code": "94114"
        },
        "security_code": "112",
        "type": "PAYMENT_CARD",
        "identity": "ID3iy9oJJydKBPfyGjSoXGuz"
    }).save()
update = card.update("MUwoSMzoUiAXsY6ydFhjFp6t")


Example Response:

{
  "id" : "IUsWtxDh15p2oeaBLCM3qP6J",
  "application" : "APwBFNui4QkYRWyVmnr78s2e",
  "merchant" : "MUwoSMzoUiAXsY6ydFhjFp6t",
  "state" : "PENDING",
  "messages" : [ ],
  "created_at" : "2017-08-15T02:03:48.85Z",
  "updated_at" : "2017-08-15T02:03:48.87Z",
  "payment_instrument" : "PIpgvYknCDRcdsQkDUu3XJxZ",
  "trace_id" : "14b6171b-a566-4fa9-b946-ef52e45dcaac",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/updates/IUsWtxDh15p2oeaBLCM3qP6J"
    },
    "payment_instrument" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    }
  }
}

Immediate Response

When first making a Post request to the updates endpoint, the state field will either be pending or failed.

  1. PENDING: The initial Account Update request has been approved by the card networks and is awaiting review.

  2. FAILED: Request rejected due to one of the following reasons:

    • Invalid credit card number
    • Invalid expiration date

Subsequent Response

Once Finix receives a response from the card network, the state of the Update resource will return either SUCCEEDED or FAILED. Each Update will also provide a message that details the reason for the outcome. If either an account number or expiration date was found, Finix will automatically update the associated Payment Instrument resource with the new details and the card will be ready for use.

  1. SUCCEEDED Messages:

    • No changes found
    • The account number was changed
    • The expiration date was changed
  2. FAILED Messages:

    • No match found
    • Invalid payment type (often due to unsupported card brands, e.g. Amex)
    • The issuing bank does not participate in the update program
    • The account was closed

HTTP Request

POST https://api-staging.finix.io/payment_instruments/:PAYMENT_INSTRUMENT_ID/updates/

Request Arguments

Field Type Description
:MERCHANT_ID string, required ID of the Merchant
:PAYMENT_INSTRUMENT_ID string, required ID of the Payment Instrument

List all Payment Instruments

curl https://api-staging.finix.io/payment_instruments \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56
import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.lib.Page;
import io.finix.payments.views.Instrument;

Maybe<Page<Instrument>> response = api.instruments.get();

if (! response.succeeded()) {
    ApiError error = response.error();
    System.out.println(error.getCode());
    System.out.println(error.getMessage());
    System.out.println(error.getDetails());
    throw new RuntimeException("API error attempting to list all Payment Instruments");
}

Page<Instrument> page = response.view();

<?php
use Finix\Resources\PaymentInstrument;

$paymentinstruments = PaymentInstrument::getPagination("/payment_instruments");




from finix.resources import PaymentInstrument
payment_instruments = PaymentInstrument.get()

payment_instruments = Finix::PaymentInstruments.retrieve

Example Response:

{
  "_embedded" : {
    "payment_instruments" : [ {
      "id" : "PIr643v58k9eGhcR1VDByWn7",
      "fingerprint" : "FPR405642276",
      "tags" : { },
      "expiration_month" : 12,
      "expiration_year" : 2020,
      "last_four" : "0454",
      "brand" : "VISA",
      "card_type" : "UNKNOWN",
      "name" : null,
      "address" : {
        "line1" : "741 Douglass St",
        "line2" : "Apartment 7",
        "city" : "San Mateo",
        "region" : "CA",
        "postal_code" : "94114",
        "country" : "USA"
      },
      "address_verification" : "UNKNOWN",
      "security_code_verification" : "UNKNOWN",
      "created_at" : "2017-08-15T02:03:47.14Z",
      "updated_at" : "2017-08-15T02:03:47.14Z",
      "instrument_type" : "PAYMENT_CARD",
      "type" : "PAYMENT_CARD",
      "currency" : "USD",
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "updates" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIr643v58k9eGhcR1VDByWn7/updates"
        }
      }
    }, {
      "id" : "PIpacoJXEqXKv768damKkpjD",
      "fingerprint" : "FPR-1215770130",
      "tags" : {
        "Bank Account" : "Company Account"
      },
      "bank_code" : "123123123",
      "country" : "USA",
      "masked_account_number" : "XXXXX3123",
      "name" : "Fran Lemke",
      "account_type" : "SAVINGS",
      "created_at" : "2017-08-15T02:03:39.83Z",
      "updated_at" : "2017-08-15T02:03:39.83Z",
      "instrument_type" : "BANK_ACCOUNT",
      "type" : "BANK_ACCOUNT",
      "currency" : "USD",
      "identity" : "ID3iy9oJJydKBPfyGjSoXGuz",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpacoJXEqXKv768damKkpjD"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpacoJXEqXKv768damKkpjD/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpacoJXEqXKv768damKkpjD/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpacoJXEqXKv768damKkpjD/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIpgvYknCDRcdsQkDUu3XJxZ",
      "fingerprint" : "FPR1187401672",
      "tags" : {
        "card_name" : "Business Card"
      },
      "expiration_month" : 12,
      "expiration_year" : 2020,
      "last_four" : "0454",
      "brand" : "VISA",
      "card_type" : "UNKNOWN",
      "name" : "Walter James",
      "address" : {
        "line1" : "741 Douglass St",
        "line2" : "Apartment 7",
        "city" : "San Mateo",
        "region" : "CA",
        "postal_code" : "94114",
        "country" : "USA"
      },
      "address_verification" : "POSTAL_CODE_AND_STREET_MATCH",
      "security_code_verification" : "MATCHED",
      "created_at" : "2017-08-15T02:03:39.40Z",
      "updated_at" : "2017-08-15T02:03:44.91Z",
      "instrument_type" : "PAYMENT_CARD",
      "type" : "PAYMENT_CARD",
      "currency" : "USD",
      "identity" : "ID3iy9oJJydKBPfyGjSoXGuz",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/ID3iy9oJJydKBPfyGjSoXGuz"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "updates" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/updates"
        }
      }
    }, {
      "id" : "PI2QSWeBPK4av3KNUHVFoX6N",
      "fingerprint" : "FPR-2042121662",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:37.52Z",
      "updated_at" : "2017-08-15T02:03:37.52Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI2QSWeBPK4av3KNUHVFoX6N"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI2QSWeBPK4av3KNUHVFoX6N/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI2QSWeBPK4av3KNUHVFoX6N/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI2QSWeBPK4av3KNUHVFoX6N/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PI52hCLAtbZ4sR6HeKVgtDfY",
      "fingerprint" : "FPR-1383578548",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:37.52Z",
      "updated_at" : "2017-08-15T02:03:37.52Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI52hCLAtbZ4sR6HeKVgtDfY"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI52hCLAtbZ4sR6HeKVgtDfY/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI52hCLAtbZ4sR6HeKVgtDfY/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PI52hCLAtbZ4sR6HeKVgtDfY/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIaSm9K6rwktDbGF79weCHfT",
      "fingerprint" : "FPR-1645745263",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:37.52Z",
      "updated_at" : "2017-08-15T02:03:37.52Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
      "fingerprint" : "FPR-1215770130",
      "tags" : {
        "Display Name" : "Updated Field"
      },
      "bank_code" : "123123123",
      "country" : "USA",
      "masked_account_number" : "XXXXX3123",
      "name" : "Fran Lemke",
      "account_type" : "SAVINGS",
      "created_at" : "2017-08-15T02:03:36.35Z",
      "updated_at" : "2017-08-15T02:03:36.96Z",
      "instrument_type" : "BANK_ACCOUNT",
      "type" : "BANK_ACCOUNT",
      "currency" : "USD",
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIi31wA46MZ3QDgUfW3Wiveo",
      "fingerprint" : "FPR-2042121662",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:30.40Z",
      "updated_at" : "2017-08-15T02:03:30.40Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "ID8bW3W9DmKEgFYF4GfDJ8or",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/ID8bW3W9DmKEgFYF4GfDJ8or"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIueL4VQYxLifFYYY6MChAND",
      "fingerprint" : "FPR-2042121662",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:30.40Z",
      "updated_at" : "2017-08-15T02:03:30.40Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "IDmSEAfzR5Mm9oKRzrVC8viG",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIueL4VQYxLifFYYY6MChAND"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIueL4VQYxLifFYYY6MChAND/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIueL4VQYxLifFYYY6MChAND/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIueL4VQYxLifFYYY6MChAND/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIoMQ4GDy8hQW7iD2wj1khE",
      "fingerprint" : "FPR-1383578548",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:30.40Z",
      "updated_at" : "2017-08-15T02:03:30.40Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "IDmSEAfzR5Mm9oKRzrVC8viG",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoMQ4GDy8hQW7iD2wj1khE"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoMQ4GDy8hQW7iD2wj1khE/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoMQ4GDy8hQW7iD2wj1khE/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoMQ4GDy8hQW7iD2wj1khE/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    }, {
      "id" : "PIoDVnMsL8Tx3SmrZQmKnQx3",
      "fingerprint" : "FPR-1645745263",
      "tags" : { },
      "name" : null,
      "created_at" : "2017-08-15T02:03:30.40Z",
      "updated_at" : "2017-08-15T02:03:30.40Z",
      "instrument_type" : "VIRTUAL",
      "type" : "VIRTUAL",
      "currency" : "USD",
      "identity" : "IDmSEAfzR5Mm9oKRzrVC8viG",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoDVnMsL8Tx3SmrZQmKnQx3"
        },
        "authorizations" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoDVnMsL8Tx3SmrZQmKnQx3/authorizations"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoDVnMsL8Tx3SmrZQmKnQx3/transfers"
        },
        "verifications" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIoDVnMsL8Tx3SmrZQmKnQx3/verifications"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/payment_instruments?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 11
  }
}

HTTP Request

GET https://api-staging.finix.io/payment_instruments

Payment Instrument Verification

curl https://api-staging.finix.io/payment_instruments/PIpgvYknCDRcdsQkDUu3XJxZ/verifications \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "processor": "VISA_V1"
    }'

import io.finix.payments.forms.*;
import io.finix.payments.views.*;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;


 VerificationForm verificationForm = VerificationForm.builder()
    .processor("VISA_V1")
    .build();

Maybe<Verification> verificationResponse = api.instruments.id("PIaySfwbXCzwDMsFyiaeeqU8").verifications.post(verificationForm);
if (! verificationResponse.succeeded()) {
    ApiError error = verificationResponse.error();
    System.out.println(error.getCode());
    throw new RuntimeException("API error attempting to create a Verification");
}
Verification verification = verificationResponse.view();

<?php



from finix.resources import PaymentInstrument
from finix.resources import Verification


payment_card = PaymentInstrument.get(id="PIpgvYknCDRcdsQkDUu3XJxZ")

verification = payment_card.verify_on(Verification(**
    {
        "processor": "VISA_V1"
    }))


Example Response:

{
  "id" : "VIsEEaCzKKFKZYDPotQvoJjm",
  "tags" : { },
  "messages" : [ ],
  "raw" : {
    "validation_details" : {
      "systems_trace_audit_number" : "192047",
      "transaction_identifier" : "141890859001162",
      "action_code" : "N7",
      "response_code" : "5",
      "address_verification_results" : "N",
      "cvv2_result_code" : "N"
    },
    "inquiry_details" : {
      "systems_trace_audit_number" : "192047",
      "card_type_code" : "C",
      "billing_currency_code" : 986,
      "billing_currency_minor_digits" : 2,
      "issuer_name" : "Visa Test Bank",
      "card_issuer_country_code" : 76,
      "fast_funds_indicator" : "N",
      "push_funds_block_indicator" : "N",
      "online_gambing_block_indicator" : "Y"
    },
    "general_inquiry_details" : {
      "systems_trace_audit_number" : "192047",
      "status" : {
        "status_code" : "CDI000",
        "status_description" : "Success"
      }
    }
  },
  "processor" : "VISA_V1",
  "state" : "SUCCEEDED",
  "created_at" : "2017-08-15T02:05:50.79Z",
  "updated_at" : "2017-08-15T02:05:51.74Z",
  "trace_id" : "192047",
  "payment_instrument" : "PIaySfwbXCzwDMsFyiaeeqU8",
  "merchant" : null,
  "identity" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/verifications/VIsEEaCzKKFKZYDPotQvoJjm"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APgSoxGS3UycNYRPLjgAvmBX"
    },
    "payment_instrument" : {
      "href" : "https://api-staging.finix.io/payment_instruments/PIaySfwbXCzwDMsFyiaeeqU8"
    }
  }
}

HTTP Request

POST https://api-staging.finix.io/payment_instruments/:PAYMENT_INSTRUMENT_ID/verifications

URL Parameters

Parameter Description
:PAYMENT_INSTRUMENT_ID ID of the Payment Instrument

Request Arguments

Field Type Description
processor string, required The name of the processor, which needs to be: VISA_V1

Address Verification Results (address_verification_results)

Letter Description
D, F, M, Y Address verified
A, B, C, G, I, N, P, R, S, U, W Address not verified

Card Verification 2 Results (cvv2_result_code)

Letter Description
M CVV verified
N, P, S CVV not verified
U Issuer does not participate in CVV2 service

Card Type (card_type_code)

This one-character code indicates whether the account is credit, debit, prepaid, deferred debit, or charge.

Letter Description
C Credit
D Debit
H Charge Card
P Prepaid
R Deferred Debit

Fasts Funds Indicator (fast_funds_indicator)

Indicates whether or not the card is Fast Funds eligible (i.e. if the funds will settle in 30 mins or less). If not eligible, typically funds will settle within 2 business days.

Letter Description
B, D Fast Funds eligible
N Not eligible for Fast Funds

Push Funds Indicator (push_funds_block_indicator)

This code indicates if the associated card can receive push-to-card disbursements.

Letter Description
A, B, C Accepts push-to-card payments
N Does not accept push-to-card payments

Online Gambling Block Indicator (online_gambing_block_indicator)

Indicates if the card can receive push-payments for online gambling payouts.

Letter Description
Y Blocked for online gambling payouts
N Not blocked for online gambling payouts

Card Product ID (card_product_id)

A combination of card brand, platform, class and scheme.

Letter Description
A Visa Traditional
AX American Express
B Visa Traditional Rewards
C Visa Signature
D Visa Signature Preferred
DI Discover
DN Diners
E Proprietary ATM
F Visa Classic
G Visa Business
G1 Visa Signature Business
G2 Visa Business Check Card
G3 Visa Business Enhanced
G4 Visa Infinite Business
G5 Visa Business Rewards
I Visa Infinite
I1 Visa Infinite Privilege
I2 Visa UHNW
J3 Visa Healthcare
JC JCB
K Visa Corporate T&E
K1 Visa Government Corporate T&E
L Visa Electron
M MasterCard
N Visa Platinum
N1 Visa Rewards
N2 Visa Select
P Visa Gold
Q Private Label
Q1 Private Label Prepaid
Q2 Private Label Basic
Q3 Private Label Standard
Q4 Private Label Enhanced
Q5 Private Label Specialized
Q6 Private Label Premium
R Proprietary
S Visa Purchasing
S1 Visa Purchasing with Fleet
S2 Visa Government Purchasing
S3 Visa Government Purchasing with Fleet
S4 Visa Commercial Agriculture
S5 Visa Commercial Transport
S6 Visa Commercial Marketplace
U Visa Travel Money
V Visa V PAY

Product Sub-Type (card_product_subtype)

Description of product subtype.

Letter Description
AC Agriculture Maintenance Account
AE Agriculture Debit Account/Electron
AG Agriculture
AI Agriculture Investment Loan
CG Brazil Cargo
CS Construction
DS Distribution
HC Healthcare
LP Visa Large Purchase Advantage
MA Visa Mobile Agent
MB Interoperable Mobile Branchless Banking
MG Visa Mobile General
VA Visa Vale - Supermarket
VF Visa Vale - Fuel
VR Visa Vale - Restaurant

Card Sub-Type (card_subtype_code)

The code for account funding source subtype, such as reloadable and non-reloadable.

Letter Description
N Non-Reloadable
R Reloadable

Settlements

A Settlement is a logical construct representing a collection (i.e. batch) of Transfers that are intended to be paid out to a specific Merchant.

Create a Batch Settlement


curl https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu/settlements \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \
    -d '
    {
        "currency": "USD",
        "tags": {
            "Internal Daily Settlement ID": "21DFASJSAKAS"
        }
    }'

import io.finix.payments.ApiClient;
import io.finix.payments.forms.SettlementForm;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.*;
import java.util.Currency;


Settlement settlement = identity.createSettlement(
  Settlement.builder()
    .currency("USD")
    .build()
);

SettlementForm formSettlement = SettlementForm.builder()
        .currency(Currency.getInstance("USD"))
        .build();

Transfer transfer = api.transfers.id("AUbrca8T1iPQnx4NeKCqBmtz").get().view();

Maybe<Settlement> response = api.identities.id("IDgqagivtqV3BhPyBNGTucTu").settlements.post(formSettlement);

if (! response.succeeded()) {
    throw new RuntimeException("API error attempting to create batch settlement");
}

Settlement settlementBatch = response.view();

<?php
use Finix\Resources\Identity;
use Finix\Resources\Settlement;

$identity = Identity::retrieve('IDgqagivtqV3BhPyBNGTucTu');
$settlement = new Settlement(
    array(
        "currency"=> "USD",
        "tags"=> array(
            "Internal Daily Settlement ID"=> "21DFASJSAKAS"
        )
    ));
$settlement = $identity->createSettlement($settlement);



from finix.resources import Identity
from finix.resources import Settlement

identity = Identity.get(id="IDgqagivtqV3BhPyBNGTucTu")
settlement = Settlement(**
    {
        "currency": "USD",
        "tags": {
            "Internal Daily Settlement ID": "21DFASJSAKAS"
        }
    })
identity.create_settlement(settlement)
identity = Finix::Identity.retrieve(:id=>"IDgqagivtqV3BhPyBNGTucTu")
settlement = identity.create_settlement(
    {
        "currency"=> "USD",
        "tags"=> {
            "Internal Daily Settlement ID"=> "21DFASJSAKAS"
        }
    })

Example Response:

{
  "id" : "STdJ1KjyFPjbraG1RFNQXJgF",
  "tags" : {
    "Internal Daily Settlement ID" : "21DFASJSAKAS"
  },
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "currency" : "USD",
  "created_at" : "2017-08-15T02:05:35.79Z",
  "updated_at" : "2017-08-15T02:05:35.82Z",
  "processor" : "DUMMY_V1",
  "total_amount" : 1240949,
  "total_fees" : 124096,
  "total_fee" : 124096,
  "net_amount" : 1116853,
  "destination" : null,
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "funding_transfers" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/funding_transfers"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers"
    },
    "fees" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=fee"
    },
    "reversals" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=reverse"
    },
    "credits" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=credit"
    },
    "debits" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=debit"
    }
  }
}

Each settlement is comprised of all the Transfers that have a SUCCEEDED state and that have not been previously settled out. In other words, if a merchant has a Transfer in the PENDING state it will not be included in the batch settlement. In addition, Settlements will include any refunded Transfers as a deduction. The total_amount minus the total_fee equals the net_amount (the amount in cents that will be deposited into your merchant’s bank account).

HTTP Request

POST https://api-staging.finix.io/identities/:IDENTITY_ID/settlements

URL Parameters

Parameter Description
:IDENTITY_ID ID of the Identity for the merchant you wish to settle out

Request Arguments

Field Type Description
currency integer, required 3-letter currency code that the funds should be deposited (e.g. USD)
tags object, optional Key value pair for annotating custom meta data (e.g. order numbers)

Fetch a Settlement



curl https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56 \

import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.views.Settlement;

Maybe<Settlement> response = api.settlements
  .id("STdJ1KjyFPjbraG1RFNQXJgF")
  .get();

if(! response.succeeded()){
    System.out.println(response.error());
    System.out.println(response.error().getDetails());
    throw new RuntimeException("API error attempting to fetch settlement");
}

Settlement settlementView = response.view();

<?php
use Finix\Resources\Settlement;

$settlement = Settlement::retrieve('STdJ1KjyFPjbraG1RFNQXJgF');



from finix.resources import Settlements
settlement = Settlements.get(id="STdJ1KjyFPjbraG1RFNQXJgF")

settlement = Finix::Settlement.retrieve(:id=>"STdJ1KjyFPjbraG1RFNQXJgF")

Example Response:

{
  "id" : "STdJ1KjyFPjbraG1RFNQXJgF",
  "tags" : {
    "Internal Daily Settlement ID" : "21DFASJSAKAS"
  },
  "identity" : "IDgqagivtqV3BhPyBNGTucTu",
  "currency" : "USD",
  "created_at" : "2017-08-15T02:05:35.73Z",
  "updated_at" : "2017-08-15T02:05:36.80Z",
  "processor" : "DUMMY_V1",
  "total_amount" : 1240949,
  "total_fees" : 124096,
  "total_fee" : 124096,
  "net_amount" : 1116853,
  "destination" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF"
    },
    "application" : {
      "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
    },
    "identity" : {
      "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
    },
    "funding_transfers" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/funding_transfers"
    },
    "transfers" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers"
    },
    "fees" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=fee"
    },
    "reversals" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=reverse"
    },
    "credits" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=credit"
    },
    "debits" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=debit"
    }
  }
}

Fetch a previously created Settlement.

HTTP Request

POST https://api-staging.finix.io/settlements/:SETTLEMENT_ID/

URL Parameters

Parameter Description
:SETTLEMENT_ID ID of the Settlement

List all Settlements

curl https://api-staging.finix.io/settlements/ \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

import io.finix.payments.ApiClient;
import io.finix.payments.interfaces.ApiError;
import io.finix.payments.interfaces.Maybe;
import io.finix.payments.lib.Page;
import io.finix.payments.views.Settlement;

Maybe<Page<Settlement>> request = api.settlements.get();

if (! request.succeeded()) {
    ApiError error = request.error();
    System.out.println(error.getCode());
    System.out.println(error.getMessage());
    System.out.println(error.getDetails());
    throw new RuntimeException("API error attempting to list all Settlements");
}

Page<Settlement> page = request.view();

<?php
use Finix\Resources\Settlement;

$settlements = Settlement::getPagination("/settlements");




from finix.resources import Settlement
settlements = Settlement.get()

settlements = Finix::Settlement.retrieve

Example Response:

{
  "_embedded" : {
    "settlements" : [ {
      "id" : "STdJ1KjyFPjbraG1RFNQXJgF",
      "tags" : {
        "Internal Daily Settlement ID" : "21DFASJSAKAS"
      },
      "identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "currency" : "USD",
      "created_at" : "2017-08-15T02:05:35.73Z",
      "updated_at" : "2017-08-15T02:05:36.80Z",
      "processor" : "DUMMY_V1",
      "total_amount" : 1240949,
      "total_fees" : 124096,
      "total_fee" : 124096,
      "net_amount" : 1116853,
      "destination" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
      "_links" : {
        "self" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF"
        },
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "funding_transfers" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/funding_transfers"
        },
        "transfers" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=fee"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=reverse"
        },
        "credits" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=credit"
        },
        "debits" : {
          "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers?type=debit"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/settlements?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 1
  }
}

List the Transfers of type CREDIT that result from issuing funding instructions for the Settlement.

HTTP Request

GET https://api-staging.finix.io/settlements/:SETTLEMENT_ID/funding_transfers

URL Parameters

Parameter Description
:SETTLEMENT_ID ID of the Settlement

List Funding Transfers

curl https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/funding_transfers \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

Settlement settlement = client.settlementsClient().fetch("STdJ1KjyFPjbraG1RFNQXJgF");
  settlement.fundingTransfersClient().<Resources<Transfer>>resourcesIterator()
    .forEachRemaining(page -> {
      Collection<Transfer> transfers = page.getContent();
      transfers.forEach(transfer ->
     // do something
      );
    });
}
<?php
use Finix\Resources\Settlement;

$settlement = Settlement::retrieve('STdJ1KjyFPjbraG1RFNQXJgF');
$settlements = Settlement::getPagination($settlement->getHref("funding_transfers"));



from finix.resources import Settlements
settlement = Settlement.get(id="STdJ1KjyFPjbraG1RFNQXJgF")
transfers = settlement.funding_transfers

settlement = Finix::Settlement.retrieve(:id=>"STdJ1KjyFPjbraG1RFNQXJgF")
transfers = settlement.funding_transfers

Example Response:

{
  "_embedded" : {
    "transfers" : [ {
      "id" : "TRaUtgXYHTKaQGsKUZL8oPw5",
      "amount" : 1116853,
      "tags" : {
        "Internal Daily Settlement ID" : "21DFASJSAKAS"
      },
      "state" : "PENDING",
      "trace_id" : "3aca6d5c-6d54-42a7-bb69-0d6cc2bf1879",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" : "PIaSm9K6rwktDbGF79weCHfT",
      "destination" : "PIpSF1wdC9j2rDdPs8yyyUTJ",
      "ready_to_settle_at" : null,
      "fee" : 0,
      "statement_descriptor" : null,
      "type" : "CREDIT",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:05:36.33Z",
      "updated_at" : "2017-08-15T02:05:36.70Z",
      "idempotency_id" : null,
      "merchant_identity" : "IDgqagivtqV3BhPyBNGTucTu",
      "subtype" : "API",
      "_links" : {
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "self" : {
          "href" : "https://api-staging.finix.io/transfers/TRaUtgXYHTKaQGsKUZL8oPw5"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/transfers/TRaUtgXYHTKaQGsKUZL8oPw5/payment_instruments"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/IDgqagivtqV3BhPyBNGTucTu"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/transfers/TRaUtgXYHTKaQGsKUZL8oPw5/reversals"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/transfers/TRaUtgXYHTKaQGsKUZL8oPw5/fees"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/transfers/TRaUtgXYHTKaQGsKUZL8oPw5/disputes"
        },
        "source" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "destination" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIpSF1wdC9j2rDdPs8yyyUTJ"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/funding_transfers?offset=0&limit=20&sort=created_at,desc"
    }
  },
  "page" : {
    "offset" : 0,
    "limit" : 20,
    "count" : 1
  }
}

List the Transfers of type CREDIT that result from issuing funding instructions for the Settlement.

HTTP Request

GET https://api-staging.finix.io/settlements/:SETTLEMENT_ID/funding_transfers

URL Parameters

Parameter Description
:SETTLEMENT_ID ID of the Settlement

List Transfers in a Settlement


curl https://api-staging.finix.io/settlements/STdJ1KjyFPjbraG1RFNQXJgF/transfers \
    -H "Content-Type: application/vnd.json+api" \
    -u  USoYjCdingudV9KwcB6MMXW2:89d4f64e-3069-40d6-b9da-2de01b476a56

Settlement settlement = client.settlementsClient().fetch("STdJ1KjyFPjbraG1RFNQXJgF");
    settlement.transfersClient().<Resources<Transfer>>resourcesIterator()
      .forEachRemaining(page -> {
        Collection<Transfer> transfers = page.getContent();
        transfers.forEach(transfer ->
       // do something
        );
      });
  }



<?php
use Finix\Resources\Settlement;

$settlement = Settlement::retrieve('STdJ1KjyFPjbraG1RFNQXJgF');
$settlements = Settlement::getPagination($settlement->getHref("transfers"));




settlement = Finix::Settlement.retrieve(:id=>"STdJ1KjyFPjbraG1RFNQXJgF")
transfers = settlement.transfers

Example Response:

{
  "_embedded" : {
    "transfers" : [ {
      "id" : "TRg7vjFjPEgcxV9deyWeTRRA",
      "amount" : 37354,
      "tags" : { },
      "state" : "SUCCEEDED",
      "trace_id" : "5ad1a8fa-1901-4f11-8366-12d3d59eeebd",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" : "PIaSm9K6rwktDbGF79weCHfT",
      "destination" : "PIueL4VQYxLifFYYY6MChAND",
      "ready_to_settle_at" : "2017-08-15T02:05:35.07Z",
      "fee" : 0,
      "statement_descriptor" : null,
      "type" : "FEE",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:05:34.70Z",
      "updated_at" : "2017-08-15T02:05:35.06Z",
      "idempotency_id" : null,
      "merchant_identity" : "IDmSEAfzR5Mm9oKRzrVC8viG",
      "subtype" : "API",
      "_links" : {
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "self" : {
          "href" : "https://api-staging.finix.io/transfers/TRg7vjFjPEgcxV9deyWeTRRA"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/transfers/TRg7vjFjPEgcxV9deyWeTRRA/payment_instruments"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/transfers/TRg7vjFjPEgcxV9deyWeTRRA/reversals"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/transfers/TRg7vjFjPEgcxV9deyWeTRRA/fees"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/transfers/TRg7vjFjPEgcxV9deyWeTRRA/disputes"
        },
        "source" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "destination" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIueL4VQYxLifFYYY6MChAND"
        }
      }
    }, {
      "id" : "TRu3G7qSQRPs9YeBALQLiRhi",
      "amount" : 11,
      "tags" : { },
      "state" : "SUCCEEDED",
      "trace_id" : "8a6b728a-4930-4036-96c2-0b7681cb6281",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" : "PIaSm9K6rwktDbGF79weCHfT",
      "destination" : "PIi31wA46MZ3QDgUfW3Wiveo",
      "ready_to_settle_at" : "2017-08-15T02:05:34.69Z",
      "fee" : 0,
      "statement_descriptor" : null,
      "type" : "FEE",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:05:34.32Z",
      "updated_at" : "2017-08-15T02:05:34.68Z",
      "idempotency_id" : null,
      "merchant_identity" : "ID8bW3W9DmKEgFYF4GfDJ8or",
      "subtype" : "API",
      "_links" : {
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "self" : {
          "href" : "https://api-staging.finix.io/transfers/TRu3G7qSQRPs9YeBALQLiRhi"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/transfers/TRu3G7qSQRPs9YeBALQLiRhi/payment_instruments"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/ID8bW3W9DmKEgFYF4GfDJ8or"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/transfers/TRu3G7qSQRPs9YeBALQLiRhi/reversals"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/transfers/TRu3G7qSQRPs9YeBALQLiRhi/fees"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/transfers/TRu3G7qSQRPs9YeBALQLiRhi/disputes"
        },
        "source" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "destination" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo"
        }
      }
    }, {
      "id" : "TRqoDaPBJ76QFa6dE1aA3V4W",
      "amount" : 86709,
      "tags" : { },
      "state" : "SUCCEEDED",
      "trace_id" : "57b4fe5e-f2d3-47d7-bb51-f5d6cdd8cba1",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" : "PIaSm9K6rwktDbGF79weCHfT",
      "destination" : "PIueL4VQYxLifFYYY6MChAND",
      "ready_to_settle_at" : "2017-08-15T02:05:34.24Z",
      "fee" : 0,
      "statement_descriptor" : null,
      "type" : "FEE",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:05:33.70Z",
      "updated_at" : "2017-08-15T02:05:34.22Z",
      "idempotency_id" : null,
      "merchant_identity" : "IDmSEAfzR5Mm9oKRzrVC8viG",
      "subtype" : "API",
      "_links" : {
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "self" : {
          "href" : "https://api-staging.finix.io/transfers/TRqoDaPBJ76QFa6dE1aA3V4W"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/transfers/TRqoDaPBJ76QFa6dE1aA3V4W/payment_instruments"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/IDmSEAfzR5Mm9oKRzrVC8viG"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/transfers/TRqoDaPBJ76QFa6dE1aA3V4W/reversals"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/transfers/TRqoDaPBJ76QFa6dE1aA3V4W/fees"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/transfers/TRqoDaPBJ76QFa6dE1aA3V4W/disputes"
        },
        "source" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "destination" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIueL4VQYxLifFYYY6MChAND"
        }
      }
    }, {
      "id" : "TRwsNq4HGw4ySX4gAQ3ymDZ9",
      "amount" : 11,
      "tags" : { },
      "state" : "SUCCEEDED",
      "trace_id" : "08c6db12-6f82-47d1-9d09-bfb6fa4a8d80",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" : "PIaSm9K6rwktDbGF79weCHfT",
      "destination" : "PIi31wA46MZ3QDgUfW3Wiveo",
      "ready_to_settle_at" : "2017-08-15T02:05:33.69Z",
      "fee" : 0,
      "statement_descriptor" : null,
      "type" : "FEE",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:05:33.25Z",
      "updated_at" : "2017-08-15T02:05:33.67Z",
      "idempotency_id" : null,
      "merchant_identity" : "ID8bW3W9DmKEgFYF4GfDJ8or",
      "subtype" : "API",
      "_links" : {
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "self" : {
          "href" : "https://api-staging.finix.io/transfers/TRwsNq4HGw4ySX4gAQ3ymDZ9"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/transfers/TRwsNq4HGw4ySX4gAQ3ymDZ9/payment_instruments"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/ID8bW3W9DmKEgFYF4GfDJ8or"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/transfers/TRwsNq4HGw4ySX4gAQ3ymDZ9/reversals"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/transfers/TRwsNq4HGw4ySX4gAQ3ymDZ9/fees"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/transfers/TRwsNq4HGw4ySX4gAQ3ymDZ9/disputes"
        },
        "source" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "destination" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo"
        }
      }
    }, {
      "id" : "TRw4bCsk2ih1tSTDnyJkxH17",
      "amount" : 11,
      "tags" : { },
      "state" : "SUCCEEDED",
      "trace_id" : "d853c69e-bd6a-4d6f-b3cf-a1272f755a45",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" : "PIaSm9K6rwktDbGF79weCHfT",
      "destination" : "PIi31wA46MZ3QDgUfW3Wiveo",
      "ready_to_settle_at" : "2017-08-15T02:05:33.19Z",
      "fee" : 0,
      "statement_descriptor" : null,
      "type" : "FEE",
      "messages" : [ ],
      "raw" : null,
      "created_at" : "2017-08-15T02:05:32.74Z",
      "updated_at" : "2017-08-15T02:05:33.17Z",
      "idempotency_id" : null,
      "merchant_identity" : "ID8bW3W9DmKEgFYF4GfDJ8or",
      "subtype" : "API",
      "_links" : {
        "application" : {
          "href" : "https://api-staging.finix.io/applications/APwBFNui4QkYRWyVmnr78s2e"
        },
        "self" : {
          "href" : "https://api-staging.finix.io/transfers/TRw4bCsk2ih1tSTDnyJkxH17"
        },
        "payment_instruments" : {
          "href" : "https://api-staging.finix.io/transfers/TRw4bCsk2ih1tSTDnyJkxH17/payment_instruments"
        },
        "merchant_identity" : {
          "href" : "https://api-staging.finix.io/identities/ID8bW3W9DmKEgFYF4GfDJ8or"
        },
        "reversals" : {
          "href" : "https://api-staging.finix.io/transfers/TRw4bCsk2ih1tSTDnyJkxH17/reversals"
        },
        "fees" : {
          "href" : "https://api-staging.finix.io/transfers/TRw4bCsk2ih1tSTDnyJkxH17/fees"
        },
        "disputes" : {
          "href" : "https://api-staging.finix.io/transfers/TRw4bCsk2ih1tSTDnyJkxH17/disputes"
        },
        "source" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIaSm9K6rwktDbGF79weCHfT"
        },
        "destination" : {
          "href" : "https://api-staging.finix.io/payment_instruments/PIi31wA46MZ3QDgUfW3Wiveo"
        }
      }
    }, {
      "id" : "TRkKK4q1aHNdYSjzfbz3EF7D",
      "amount" : 100,
      "tags" : { },
      "state" : "SUCCEEDED",
      "trace_id" : "9cee99a2-181e-44bb-b80c-ea53e813d1b6",
      "currency" : "USD",
      "application" : "APwBFNui4QkYRWyVmnr78s2e",
      "source" :