Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

POS API Endpoint Overview

The Flexiti POS API Endpoints is divided into 5 categories:

  1. Authentication - Required mechanisms to authenticate a 3rd party session.

  2. Customers - Endpoints required to identify a Flexiti customer.

  3. CreditApps - Endpoints that allow Merchant customers to apply for new credit.

  4. Transactions - - Endpoints required to post transactions (purchases and returns).

  5. Merchants - Endpoints that allow the retrieval of transaction information for daily activities.

POS API - Widget

https://flexiti.atlassian.net/wiki/spaces/ONL/pages/9502856/POS+API+v2.5+-+Widget+Implementation

Endpoints: Authentication

Required mechanisms to authenticate a 3rd party session and trigger the integration to the API.

POST /oauth/token

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2.5/oauth/token

Please note the parameters should not be passed as Query string, the service is expecting an application/x-www-form-url encoded payload.

This service Authenticates the developer user and provides a Bearer Token that needs to be used as part of every future request.

The refresh token is used to get a new access token once the current one has expired.

In order to use it add the refresh token (provided in the original /oauth/token call) and change the grant_type to refresh_token.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

FORMDATA

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

FORMDATA

...

client_secret

...

Yes

...

  • ASCII string

  • This is the Client Secret given in the Developer User Account section

...

BODY

...

grant_type

...

  • ASCII string

  • This is the client's access type

  • possible values: 'password', 'refresh_token', 'client_credentials'

  • default value: 'client_credentials'

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Code Block
{
    "client_id": "flexitidemo",
    "client_secret": "77fde15a-9d33-4e15-930a-76e4b3ae33e9",
    "grant_type": "client_credentials"
}

Success Response:

Code Block
{
    "token_type": "bearer",  
    "access_token": "3d8f373a9a2b1e61baf5abb69930ff4f0e08cdb0",  
    "expires_in": 1200,  
    "refresh_token": "36e0fc3d7415185f4b1d71512c459fd6eaa13aa8"
}

POST /client-id/{client_id}/merchants/login

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2.5/client-id/flexitidemo/merchants/login?lang=en

This service will log in the Merchant session and provide back an updated version of the list of parameters based on the language variable provided. This is required within the session to ensure the Merchant has the latest version of all parameters.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

QUERY

...

lang

...

  • ASCII string

  • Customer Preferred language

  • Available values: (en=English) or (fr=French)

...

BODY

...

merchant_username

...

  • ASCII string

  • Optional information to log in a specific Sales Representative or Merchant location

...

BODY

...

merchant_password

...

  • ASCII string

  • Optional information to log in a specific Sales Representative or Merchant location

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Code Block
breakoutModewide
{
    "merchant_username": "merchantonline",
    "merchant_password": "dice-manila-purism"
}

Success Response:

Code Block
breakoutModewide
{
    "merchant_name": "European Restorations",
    "merchant_id": "382",
    "form_values": {
        "salutation": {
            "options": {
                "mr": "Mr.",
                "ms": "Ms.",
                "mrs": "Mrs.",
                "mss": "Miss."
            }
        },
        "province": {
            "options": {
                "AB": "Alberta",
                "BC": "British Columbia",
                "MB": "Manitoba",
                "NB": "New Brunswick",
                "NL": "Newfoundland & Labrador",
                "NS": "Nova Scotia",
                "NT": "Northwest Territories",
                "NU": "Nunavut",
                "ON": "Ontario",
                "PE": "Prince Edward Island",
                "QC": "Quebec",
                "SK": "Saskatchewan",
                "YT": "Yukon Territory"
            }
        },
        "security_qid": {
            "options": {
                "4": "What is the name of your favourite childhood friend?",
                "5": "What is the country of your ultimate dream vacation?",
                "6": "What was the first concert you attended?",
                "7": "What is the name of the street you grew up on?",
                "8": "What is the name of your first grade teacher?",
                "9": "What is your favourite movie?"
            }
        },
        "govid_type": {
            "options": {
                "CADL": "Driver's Licence",
                "CAHC": "Health Card",
                "CAPID": "Provincial ID Card",
                "CAP": "Passport",
                "CAPRC": "Permanent Resident Card",
                "CAICBC": "Insurance Corporation of British Columbia",
                "CAAR": "Alberta Registries",
                "CASGI": "Saskatchewan Government Insurance",
                "CADSNS": "Department of Service Nova Scotia and Municipal Relations",
                "CADPPEI": "Department of Transportation and Public Works of the Province of Prince Edward Island",
                "CASNB": "Service New Brunswick",
                "CADGSNF": "Department of Government Services and Lands of the Province of Newfoundland and Labrador",
                "CADTNW": "Department of Transportation of the Northwest Territories",
                "CADCTN": "Department of Community Government and Transportation of the Territory of Nunavut",
                "CACSC": "Correctional Service Canada identification card (with the individual's name and photograph)",
                "CAGCEC": "Government of Canada employee identity card (with the individual's name and photograph)",
                "CALCB": "Liquor Control Board Age of Majority (BYID) card",
                "CACFL": "Canadian Firearms licence",
                "CACFID": "Canadian Forces identification card",
                "CAMPIC": "MPIC card issued by the Manitoba Public Insurance Corporation",
                "CACAID": "NEXUS or CANPASS Air membership card (issued by Canada Border Services Agency)"
            }
        },
        "govid_issued_by": {
            "option_depends": {
                "CADL": {
                    "AB": "Alberta",
                    "BC": "British Columbia",
                    "MB": "Manitoba",
                    "NB": "New Brunswick",
                    "NL": "Newfoundland & Labrador",
                    "NS": "Nova Scotia",
                    "NT": "Northwest Territories",
                    "NU": "Nunavut",
                    "ON": "Ontario",
                    "PE": "Prince Edward Island",
                    "QC": "Quebec",
                    "SK": "Saskatchewan",
                    "YT": "Yukon Territory"
                },
                "CAHC": {
                    "BC": "British Columbia",
                    "NB": "New Brunswick",
                    "NL": "Newfoundland & Labrador",
                    "NT": "Northwest Territories",
                    "NU": "Nunavut",
                    "QC": "Quebec",
                    "SK": "Saskatchewan",
                    "YT": "Yukon Territory"
                },
                "CAPID": {
                    "ON": "Ontario"
                },
                "CAP": {
                    "CANADA": "Canada"
                },
                "CAPRC": {
                    "CANADA": "Canada"
                },
                "CAICBC": {
                    "BC": "British Columbia"
                },
                "CAAR": {
                    "AB": "Alberta"
                },
                "CASGI": {
                    "SK": "Saskatchewan"
                },
                "CADSNS": {
                    "NS": "Nova Scotia"
                },
                "CADPPEI": {
                    "PE": "Prince Edward Island"
                },
                "CASNB": {
                    "NB": "New Brunswick"
                },
                "CADGSNF": {
                    "NL": "Newfoundland & Labrador"
                },
                "CADTNW": {
                    "NT": "Northwest Territories"
                },
                "CADCTN": {
                    "NU": "Nunavut"
                },
                "CACSC": {
                    "CANADA": "Canada"
                },
                "CAGCEC": {
                    "CANADA": "Canada"
                },
                "CALCB": {
                    "AB": "Alberta",
                    "BC": "British Columbia",
                    "MB": "Manitoba",
                    "NB": "New Brunswick",
                    "NL": "Newfoundland & Labrador",
                    "NS": "Nova Scotia",
                    "NT": "Northwest Territories",
                    "NU": "Nunavut",
                    "ON": "Ontario",
                    "PE": "Prince Edward Island",
                    "QC": "Quebec",
                    "SK": "Saskatchewan",
                    "YT": "Yukon Territory"
                },
                "CACFL": {
                    "CANADA": "Canada"
                },
                "CACFID": {
                    "CANADA": "Canada"
                },
                "CAMPIC": {
                    "MB": "Manitoba"
                },
                "CACAID": {
                    "CANADA": "Canada"
                }
            }
        },
        "offer_types": [
            {
                "plan_name": "90 Days Grace, Equal Payments Regular Interest",
                "term_options": [
                    18,
                    36,
                    48,
                    72
                ],
                "plan_id": "1",
                "offer_category": "equal_billing"
            },
            {
                "plan_name": "Equal Payments, Low Interest",
                "term_options": [
                    3,
                    6,
                    40,
                    60
                ],
                "plan_id": "2",
                "offer_category": "equal_billing"
            },
            {
                "plan_name": "Equal Payments, Regular Interest",
                "term_options": [
                    3,
                    6,
                    18,
                    36,
                    72
                ],
                "plan_id": "4",
                "offer_category": "equal_billing"
            },
            {
                "plan_name": "Equal Payments, No Interest",
                "term_options": [
                    3,
                    6,
                    10,
                    20,
                    30,
                    40
                ],
                "plan_id": "5",
                "offer_category": "equal_billing"
            },
            {
                "plan_name": "No Interest, No Payments  (S.A.C.)",
                "term_options": [
                    3,
                    6,
                    8
                ],
                "plan_id": "6",
                "offer_category": "deferred_payment"
            },
            {
                "plan_name": "No Interest, No Payments ",
                "term_options": [
                    3,
                    12
                ],
                "plan_id": "7",
                "offer_category": "deferred_payment"
            },
            {
                "plan_name": "No Interest, Minimum monthly payments",
                "term_options": [
                    3,
                    6,
                    9,
                    12,
                    18
                ],
                "plan_id": "9",
                "offer_category": "deferred_payment"
            }
        ]
    }
}

Endpoints: CreditApps

Endpoints that allow Customers to Apply for new Credit.

GET /client-id/{client_id}/terms-and-conditions

Code Block
breakoutModewide
https://posapi-training.flexiti.fi/flexiti/pos-api/v2.5/client-id/flexitidemo/terms-and-conditions?lang=en&province=QC

Serves a HTML of the terms and conditions a Customer must approve for a Credit Application with Flexiti.

Applicants from Quebec will be served terms and conditions specific to Quebec Residents in compliance with the QCPA. All other provinces will be served terms and conditions for the rest of Canada.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

QUERY

...

lang

...

  • ASCII string

  • Customer Preferred language

  • Available values: (en=English) or (fr=French)

  • Default value: en

...

QUERY

...

province

...

  • ASCII string

  • 2 character syntax (ex. ON for Ontario)

  • Available values: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT

  • Not passing a province value will default to the ROC terms and conditions

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Success Response:

Code Block
<div id='tcs'>...
</div>

POST /client-id/{client_id}/apply

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2.5/client-id/flexitidemo/apply

This endpoint is used for new Customer applications.

Quebec applicants must pass the monthly_housing_expenses parameter. Upon successful adjudication, Quebec applicant responses will include a debt_ratio parameter which must be displayed to the applicant along with the available credit. The applicant must then be given the option to cancel the adjudicated application (through the POST /client-id/{client_id}/customers/close-account endpoint).

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

BODY

...

amount_requested

...

Yes

...

  • number

  • Amount Requested

...

BODY

...

phone_number

...

Yes

...

  • ASCII string

  • Customer Mobile Phone Number

  • This will be used for MFA via SMS

...

BODY

...

email

...

Yes

...

  • ASCII string

  • Customer Email

...

BODY

...

language

...

  • ASCII string

  • Preferred Language (Locale)

  • Available values: en-CA, fr-CA

  • Default value: en-CA

...

BODY

...

salutation

...

Yes

...

  • ASCII string

  • Salutation

  • Available values: (mr = Mr./M.), (ms = Ms./Mme.), (mrs = Mrs.), (mss = Miss.)

...

BODY

...

first_name

...

Yes

...

  • ASCII string

  • Customer First Name

...

BODY

...

middle_name

...

  • ASCII string

  • Customer Middle Name

...

BODY

...

last_name

...

Yes

...

  • ASCII string

  • Customer Last Name

...

BODY

...

dob

...

Yes

...

  • ISO 8406 Date

  • Customer Date of Birth (YYYY-MM-DD)

...

BODY

...

address_1

...

  • ASCII string

  • Customer Address Line 1

...

BODY

...

address_2

...

Yes

...

  • ASCII string

  • Customer Address Line 2

...

BODY

...

city

...

Yes

...

  • ASCII string

  • Customer City

...

BODY

...

province

...

Yes

...

  • ASCII string

  • Customer Province (2 character syntax, ex. ON for Ontario)

  • Available values: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT.

...

BODY

...

postal_code

...

Yes

...

  • ASCII string

  • Customer Postal Code

...

BODY

...

govid_type

...

  • ASCII string

  • Required for in-store implementations

  • Customer Government Identification Type:

    • for Driver’s License use CADL;

    • for Health Card use CAHC;

    • for Provincial ID Card use CAPID;

    • for Passport use CAP;

    • for Permanent Resident Card use CAPRC;

    • for Insurance Corporation of British Columbia use CAICBC;

    • for Alberta Registries use CAAR;

    • for Saskatchewan Government Insurance use CASGI;

    • for Department of Service Nova Scotia and Municipal Relations use CADSNS;

    • for Department of Transportation and Public Works of the Province of Prince Edward Island use CADPPEI;

    • for Service New Brunswick use CASNB;

    • for Department of Government Services and Lands of the Province of Newfoundland and Labrador use CADGSNF;

    • for Department of Transportation of the Northwest Territories use CADTNW;

    • for Department of Community Government and Transportation of the Territory of Nunavut use CADCTN;

    • for Correctional Service Canada identification card use CACSC;

    • for Government of Canada Employee Identity Card use CAGCEC;

    • for Liquor Control Board Age of Majority (BYID) Card use CALCB;

    • for Canadian Firearms Licence use CACFL;

    • for Canadian Forces Identification Card use CACFID;

    • for MPIC Card issued by the Manitoba Public Insurance Corporation use CAMPIC;

    • for NEXUS or CANPASS Air Membership Card (issued by Canada Border Services Agency) use CACAID.

...

BODY

...

govid_issuedby

...

  • ASCII string

  • Required for in-store implementations

  • Issuing Authority (2/3 character syntax, ex. ON for Ontario, CANADA for Canada);

    • if type selected is DL or CALCB, available values are AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT;

    • if CAHC available values are BC, NB, NL, NT, NU, QC, SK, YT;

    • if CAPID, available value is ON;

    • if CAP or CAPRC, available value CANADA;

    • if CAICBC, available value is BC;

    • if CAAR, available value is AB;

    • if CASGI, available value is SK;

    • if CADSNS, available value is NS;

    • if CADPPEI, available value is PE;

    • if CASNB, available value is NB;

    • if CADGSNF, available value is NL;

    • if CADTNW, available value is NT;

    • if CADCTN, available value is NU;

    • if CACSC or CAGCEC, available value is CANADA;

    • if CACFL or CAFCID or CACAID, available value is CANADA;

    • if CAMPIC, available value is MB.

...

BODY

...

govid_number

...

  • ASCII string

  • Required for in-store implementations

  • Customer Government Identification Number

...

BODY

...

govid_expiry

...

  • ISO 8406 Date

  • Required for in-store implementations

  • Customer Government Identification Expiry Date (YYYY-MM-DD)

...

BODY

...

input_type

...

  • ASCII string

  • How the information has been provided

  • Available values: 'scanned', 'manual'

  • Default value: 'manual'

...

BODY

...

personal_income

...

Yes

...

  • integer

  • Customer Personal Income (ex. 100000; round to the dollar value, no decimals; do not enter commas or periods.)

...

BODY

...

household_income

...

Yes

...

  • integer

  • Customer Household Income (ex. 100000; round to the dollar value, no decimals; do not enter commas or periods.)

...

BODY

...

monthly_housing_expenses

...

  • integer

  • Required if province is QC

  • Customer monthly housing expenses (ex. 100000; round to the dollar value, no decimals; do not enter commas or periods.)

...

BODY

...

housing_type

...

Yes

...

  • ASCII string

  • Customer Housing Type

  • Available values: Rent, Owned, Relatives, Other.

...

BODY

...

occupation_id

...

Yes

...

  • ASCII string

  • Customer Occupation ID:,

    • for Full-Time Employment use FE;

    • for Part-Time Employment use PE;

    • for Self-Employed use SE;

    • for Retired use RT;

    • for Student use ST;

    • for Homemaker use HM;

    • for Disabled use DS;

    • for Seasonal Worker use SW;

    • for Unemployed with Income use UE;

    • for Unemployed without Income use UW;

    • for Other use OT.

...

BODY

...

occupation_title

...

Yes

...

  • ASCII string

  • Customer Job Title

...

BODY

...

employer_name

...

  • ASCII string

  • Customer Employer Name

...

BODY

...

employer_phone

...

  • ASCII string

  • Customer Employer Phone Number

...

BODY

...

sin

...

  • ASCII string

  • Customer Social Insurance Number

...

BODY

...

security_qid

...

Yes

...

  • ASCII string

  • Customer Security Question ID

  • Select value from list

...

BODY

...

security_answer

...

Yes

...

  • ASCII string

  • Customer Security Answer

...

BODY

...

piw

...

Yes

...

  • ASCII string

  • Customer Personal Identification Word

...

BODY

...

tos_agreement

...

Yes

...

  • boolean

  • Acceptance of the Cardholder Agreement (must be true at the time of submission).

  • Default value: false

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Code Block
{
  "amount_requested": 5000,
  "phone_number": "5551231231",
  "language": "en-CA",
  "salutation": "mr",
  "first_name": "John",
  "middle_name": "Grey",
  "last_name": "Doe",
  "dob": "1990-01-01",
  "address_1": "123 Any Street",
  "address_2": "Apt C",
  "govid_expiry": "2020-12-12",
  "city": "Montreal",
  "province": "QC",
  "postal_code": "A1A0H1",
  "govid_type": "CAP",
  "monthly_housing_expenses": 1000,
  "govid_issuedby": "CANADA",
  "govid_number": "ab121212",
  "input_type": "manual",
  "personal_income": 123123,
  "household_income": 223123,
  "housing_type": "Rent",
  "email": "email@address.com",
  "occupation_id": "FE",
  "occupation_title": "Baker",
  "employer_name": "Tasty Bakery",
  "employer_phone": "1231231231",
  "sin": "123123123",
  "security_qid": "8",
  "security_answer": "Horse",
  "piw": "Cloud",
  "tos_agreement": true
}

Success Response:

200 - Success - ROC applicant
Code Block
{
  "vcc_number": 6374980100408234,
  "account_number": 20035156,
  "customer_id": 43353,
  "available_credit": 5000,
  "credit_limit": 5000,
  "risk_rating": "L"
}
200 - Success - QC applicant
Code Block
languagejson
{
    "vcc_number": 6374980100408234,
    "account_number": 20035156,
    "customer_id": 43353,
    "available_credit": 5000,
    "credit_limit": 5000,
    "risk_rating": "L",
    "offer_types": [
        {
            "plan_name": "90 Days Grace, Equal Payments Regular Interest",
            "plan_id": "1",
            "offer_category": "equal_billing",
            "term_options": [
                "12",
                "18",
                "24",
                "36"
            ]
        }
    ],
    "debt_ratio": 0
}

Endpoints: Customers

These are all of the Endpoints required to identify Customers.

GET /client-id/{client_id}/customers/lookup

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup?vcc_number=1234123412341234

or

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup?first_name=Brian&last_name=Bold&dob=1900%2F01%2F01

This service allows the Merchant to gather the Customer information by providing a VCC or alternatively, the Merchant can provide demographic information about the Customer in order to pinpoint the Account (First Name, Last Name, DOB, Postal Code).

If you lookup via the VCC, the response will return the account the VCC belongs to. If you lookup using First Name, Last Name, and DOB it will return the account with highest Open to Buy.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

bearer token

...

Yes

...

  • ASCII string (40 characters)

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

QUERY

...

first_name

...

  • ASCII string

  • The customer’s First Name on file

...

QUERY

...

last_name

...

  • ASCII string

  • The customer’s Last Name on file

...

QUERY

...

dob

...

  • ISO 8406 Date

  • The customer’s Date of Birth on file (YYYY-MM-DD)

...

QUERY

...

postal_code

...

  • ASCII string

  • The customer’s Postal Code on file

...

QUERY

...

vcc_number

...

  • ASCII string

  • The Flexiti Card Number of the Customer

  • This is the VCC (Flexiti Card)

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Success Response:

Code Block
languagejson
{
    "available_credit": 5000,
    "account_number": 20035156,
    "customer_id": 43353,
    "security_qid": [
        {
            "id": "4",
            "text": "What is the name of your favourite childhood friend?"
        },
        {
            "id": "5",
            "text": "What is the country of your ultimate dream vacation?"
        }
    ],
    "address_1": "123 Anystreet Ave",
    "address_2": "Suite 100",
    "city": "Toronto",
    "postal_code": "M5M1M1",
    "province": "ON",
    "payment_protection": 0,
    "risk_rating": "L",
    "offer_types": [
        {
            "plan_name": "90 Days Grace, Equal Payments Regular Interest",
            "plan_id": "1",
            "offer_category": "equal_billing",
            "term_options": [
                "12",
                "18",
                "24",
                "36"
            ]
        }
    ],
    "preferred_language": "EN_CA"
}

Error Responses:

409 - Customer Not Found
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup",
    "message": "Customer not found",
    "error": "not_found"
}
409 - VCC Not Activated
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup?vcc_number=63749XXXXXXX97800&lang=en",
    "message": "Before proceeding with the purchase transaction, we need to activate your account. To activate your account or for more information visit my.flexiti.com.",
    "error": "user_not_active"
}
409 - Blocked VCC or Customer with a status other than "Normal"
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup?vcc_number=63749XXXXXXX97800&lang=en",
    "message": "We’re sorry, we aren’t able to proceed with your request right now. If you were trying to process a transaction on an existing account, please call us at 1-877-259-3750. Otherwise, please check your internet connectivity or restart your device before trying again.",
    "error": "user_not_able_to_purchase"
}

POST /client-id/{client_id}/customers/{customer_id}/verify

Code Block
breakoutModewide
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/12345/verify

This endpoint allows you to verify a Customer using one of the four available verification methods, depending on the "format" specified in the body.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

PATH

...

customer_id

...

Yes

...

  • number

  • This is the Customer ID retrieved in any of the available endpoints

...

BODY

...

format

...

Yes

...

  • ASCII string

  • Verification format to be presented to the Customer

  • Available values: sms, email, merchant_override, security_question

  • Default value: sms

...

BODY

...

security_qid

...

Required for format: security_question

...

  • ASCII string

  • Customer’s Security Question ID provided by the Customer Lookup service

...

BODY

...

security_answer

...

Required for format: security_question

...

  • ASCII string

  • Customer’s response to the Security Question

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Success Responses:

200 - Success - Override
Code Block
{
  "verification_code": 2485
}
200 - Success - SMS
Code Block
{
    "verification_code": "verification_sent_to_sms"
}
200 - Success - Email
Code Block
{
    "verification_code": "verification_sent_to_email"
}

Error Responses:

409 - Account Not Found
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "We’re sorry, account number can’t be found.",
    "error": "not_found"
}
400 - SMS Not Found
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "It has been following errors:",
    "error": "wrong_input",
    "field_errors": [
        {
            "param": "email",
            "msg": "invalid",
            "value": ""
        }
    ]
}
409 - Email Not Found
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "Some inputs are wrong!",
    "error": "wrong_input",
    "field_errors": [
        {
            "param": "email",
            "msg": "invalid",
            "value": ""
        }
    ]
}
409 - Email invalid
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "Some inputs are wrong!",
    "error": "wrong_input",
    "field_errors": [
        {
            "param": "email",
            "msg": "invalid",
            "value": ""
        }
    ]
}
409 - Secret Answer Mismatch
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "The answer you provided did not match our records.",
    "error": "secret_answer_mismatch"
}
409 - Merchant Override Not Allowed
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "merchant_override_is_not_allowed",
    "error": "merchant_override_is_not_allowed"
}
409 - Wrong Email Format
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "Some inputs are wrong!",
    "error": "wrong_input"
}
409 - Wrong Personal Identification Word
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify",
    "message": "Please check the information you just entered. If the information is correct and you see this message again, please restart the Flexiti App or close and re-open your browser window. If this message continues to appear, please contact us at 1-877-259-3754 and we will be happy to assist you",
    "error": "piw_mismatch"
}

GET /client-id/{client_id}/customers/{customer_id}/transactions

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/12345/transactions

This endpoint returns a list of Purchases made by a particular Customer.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

PATH

...

customer_id

...

Yes

...

  • number

  • This is the Customer ID retrieved in any of the available endpoints

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Success Response:

200 - Success
Code Block
{  "transactions": [    {      "term": "3",      "transaction_id": "167637",      "transaction_status": "Posted",      "customer_name": "Doe, John",      "transaction_balance": "1200.05",      "transaction_date": "2019/04/14",      "plan_name": "EMP - No Interest"    },    {      "term": "3",      "transaction_id": "167636",      "transaction_status": "Posted",      "customer_name": "Doe, John",      "transaction_balance": "120.05",      "transaction_date": "2019/04/14",      "plan_name": "EMP - No Interest"    }  ]}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized - Invalid Token
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Not Found
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828931/transactions",
    "message": "<h1>There are no purchases available to return for this customer.</h1><p>If you’ve already processed a partial return and now want to return the remainder, please email service@flexitifinancial.com or call us at <strong class='no-break'>1-877-259-3754</strong></p>",
    "error": "no_returns_found"
}

GET /client-id/{client_id}/customers/search

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/search?first_name=John&last_name=Smith&dob=1900%2F01%2F01

This Endpoint returns a list of accounts for the customer being searched for.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

QUERY

...

first_name

...

Yes

...

  • ASCII string

  • The customer’s First Name on file

...

QUERY

...

last_name

...

Yes

...

  • ASCII string

  • The customer’s Last Name on file

...

QUERY

...

dob

...

Yes

...

  • ASCII string

  • The customer’s Date of Birth on file (YYYY/MM/DD)

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Account Statuses Returned

On the response you can be returned the following possible account statuses (CUSS7):

  • Normal “N” (only status that allows Customers to make Purchases/Authorizations)

  • Auth Prohibited “A” (Authorizations/Purchases are prohibited due to lack of payment, this status can be reverted automatically by the system)

  • Frozen “F” (Frozen accounts can NOT make Authorizations/Purchases, this status can only be reverted manually by Operations)

  • Charged Off “Z” (When accounts do not pay for 6 or more months, the account is written off the Portfolio)

  • Closed “C” (no longer in use, this represents accounts that are closed and can NOT be brought back to life, there are some old accounts with this status)

Success Response:

200 - Success
Code Block
[  {    "customer_id": "829825",    "account_status": "N",    "account_status_reason_code": "NNOR",    "tos": true,    "risk_rating": "H",    "account_number": "116574819",    "credit_limit": "1000.00",    "available_credit": "659.51",    "originating_merchant_id": "11503",    "originating_merchant_name": "Paris Jewellers",    "creation_date": "01/17/2019",    "first_name": "David",    "last_name": "Morley",    "card_ending_in": "5941",    "preferred_language": "fr-CA"  },  {    "customer_id": "829875",    "account_status": "F",    "account_status_reason_code": "FLCK",    "tos": true,    "risk_rating": "Y",    "account_number": "116574860",    "credit_limit": "1000.00",    "available_credit": "847.00",    "originating_merchant_id": "11503",    "originating_merchant_name": "Paris Jewellers",    "creation_date": "01/22/2019",    "first_name": "David",    "last_name": "Morley",    "card_ending_in": "6457",    "preferred_language": "en-CA"  }]

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized - Invalid Token
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Customer not found
Code Block
{
    "code": 404,
    "error": "not_found",
    "error_description": "not_found"
}
409 - User not able to Purchase
Code Block
{
    "code": 409,
    "error": "user_not_able_to_purchase",
    "error_description": "We’re sorry, we aren’t able to proceed with your request right now. If you were trying to process a transaction on an existing account, please call us at 1-877-259-3750. Otherwise, please check your internet connectivity or restart your device before trying again."
}

POST /client-id/{client_id}/customers/driverslicense

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/driverslicense

This endpoint allows the decoding of PDF417 scanned driver licence information.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

BODY

...

code

...

Yes

...

  • ASCII string

  • PDF417 code with driver licence information

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Success Response:

Code Block
{
    "first_name": "John",
    "middle_name": "Grey",
    "last_name": "Doe",
    "dob": "1974-05-15",
    "address_1": "55 UNIVERSITY AVE",
    "city": "TORONTO",
    "province": "ON",
    "postal_code": "M5J 2H7",
    "govid_type": "CADL",
    "govid_issuedby": "ON",
    "govid_number": "D61014070660905",
    "govid_expiry": "2020-05-15"
}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized - Invalid Token
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Not Supported
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/driverslicense",
    "message": "It has been following errors:",
    "error": "Driver License's not supported"
}
409 - Code parameter missing
Code Block
{
    "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/driverslicense",
    "message": "It has been following errors:",
    "error": ""
}

POST /client-id/{client_id}/customers/close-account

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/close-account

This endpoint allows the closure of a QC account.

Parameters:

Type

Parameter

Required

Details

HEADER

authorization

Yes

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

PATH

client_id

Yes

  • ASCII string

  • This is the Client ID given in the Developer User Account section

BODY

account_number

Yes

  • ASCII string

  • The account number of the account to be closed

Validations:

...

Parameter

...

Case

...

Error Type

Example Value:

Success Response:

200 - Success
Code Block
{
}

Endpoints: Transactions

These are all of the necessary endpoints required to post Transactions (Purchases, Returns).

POST /client-id/{client_id}/transactions

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/transactions?lang=en

This service is the one used to post Transactions on the Customer Account. These transactions can be Promotional Purchases, Regular Purchases, Deposits, In-Store Payments or Trade-Ins.

You can post a transaction using one of the following: VCC number, Account number, or Customer ID.

For Promotional Purchases, the values pertaining to the Plan and Term are mandatory.

The variable “customer_confirmed” = true, will post and authorize the Transaction directly, whereas a value of false will require you yo go through the PUT /transactions endpoint in order to have the Transaction posted.

The variable “hold_authorization” = true, will hold the Open-To-Buy from the Customer without posting the Transaction (this Transaction will not be authorized at this point). Transactions that are “held” will be listed in the /“authorized” endpoint (GET /client-id/{client_id}/transactions/authorized).

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

QUERY

...

lang

...

  • ASCII string

  • Customer Preferred language

  • Available values: (en=English) or (fr=French)

...

BODY

...

transaction_type

...

  • ASCII string

  • This is the Transaction Type:

    • for Promotional Purchases use "promotional_purchase";

    • for Regular Revolving Purchases, use "regular_purchase";

    • for Deposits, use "deposit”;

    • for In-Store Payments, use "instore_payment”;

    • for Trade-In, please use "tradein".

  • Default value: promotional_purchase

...

BODY

...

plan_id

...

  • number

  • This field is required when the transaction type is 'promotional_purchase’

  • Only applicable to Promotional Purchases

  • Plan ID (utilize values from plan_id from the offer_types array in the /client-id/{client_id}/merchants/login endpoint)

...

BODY

...

term

...

  • number

  • This field is required when the transaction type is 'promotional_purchase’

  • Only applicable to Promotional Purchases

  • Term (utilize values from terms_options from the offer_types array in the /client-id/{client_id}/merchants/login endpoint)

...

BODY

...

amount

...

  • number

  • the Transaction Amount

  • this applies for all transaction types (promotional_purchase, regular_purchase, deposit, instore_payment, tradein.)

...

BODY

...

vcc_number

...

  • ASCII string

  • The Flexiti Card Number provided by the Customer

  • This IS the VCC (Flexiti Card)

...

BODY

...

account_number

...

  • ASCII string

  • Flexiti Account Number retrieved from the /client-id/{client_id}/customers/lookup or the /client-id/{client_id}/customers/search endpoints

  • This is NOT the VCC (Flexiti Card) nor the Customer ID

...

BODY

...

customer_id

...

  • ASCII string

  • Flexiti Customer ID stored by the Merchant POS or any other system

  • This is NOT the VCC (Flexiti Card) nor the Account Number

...

BODY

...

account_avs

...

  • ASCII string

  • Information used to match/verify the Account details on file

    • billing_information (Customer Billing Information)

      • first_name

        • ASCII string

        • Customer’s First Name

      • last_name

        • ASCII string

        • Customer’s First Name

      • dob

        • ASCII string

        • Customer’s Date of Birth

        • (YYYY/MM/DD)

      • address_1

        • ASCII string

        • Billing Address Line 1

      • address_2

        • ASCII string

        • Billing Address Line 1

      • city

        • ASCII string

        • Billing Address City

      • postal-code

        • ASCII string

        • Billing Address Postal Code

      • province

        • ASCII string

        • Billing Address Province (2 character syntax, ex. ON for Ontario)

        • Available values: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT.

    • shipping_information (Customer Shipping Information)

      • first_name

        • ASCII string

        • Customer’s First Name

      • last_name

        • ASCII string

        • Customer’s First Name

      • dob

        • ASCII string

        • Customer’s Date of Birth

        • (YYYY/MM/DD)

      • address_1

        • ASCII string

        • Shipping Address Line 1

      • address_2

        • ASCII string

        • Shipping Address Line 1

      • city

        • ASCII string

        • Shipping Address City

      • postal-code

        • ASCII string

        • Shipping Address Postal Code

      • province

        • ASCII string

        • Shipping Address Province (2 character syntax, ex. ON for Ontario)

        • Available values: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT.

...

BODY

...

customer_confirmed

...

  • boolean

  • This value should be false unless the Customer is present and confirms the transaction

  • This field is not needed for In-Store Payment or Trade In transaction types

  • Default value: false

...

BODY

...

hold_authorization

...

  • boolean

  • This value should be false unless the Merchant needs to hold the Available Credit for future posting of the Transaction

  • Default value: false

...

BODY

...

verification_code

...

Yes

...

  • number

  • Verification number provided in the Customer Verification service from the /client-id/{client_id}/customers/{customer_id}/verify endpoint

Success Response:

200 - Success - Promotional Purchase
Code Block
{  "annual_fee": 0,  "payment_protection": false,  "transaction_id": 167635,  "available_credit": 5000,  "plan_name": "Equal Payments, No Interest",  "admin_fee": 49.99,  "balance_after_purchase": 4949.01,  "payment_value": "17.00",  "promotional_amount": 50.99,  "customer_confirmed": true,  "plan_id": "5",  "account_avs": {    "billing_information": {      "first_name": 0,      "last_name": 0,      "dob": 0,      "address_1": 0,      "address_2": 0,      "city": 0,      "postal_code": 0,      "province": 0    },    "shipping_information": {      "first_name": 0,      "last_name": 0,      "dob": 0,      "address_1": 0,      "address_2": 0,      "city": 0,      "postal_code": 0,      "province": 0    }  }}
200 - Success - Deposit
Code Block
{  "payment_protection": false,  "transaction_id": 167638,  "apr": 37.24,  "available_credit": 3528.93,  "term": "",  "admin_fee": 0,  "balance_after_purchase": 3528.88,  "payment_value": "0.05",  "promotional_amount": 0.05,  "air": 37.24,  "customer_confirmed": false,  "plan_id": "0",  "verified": true,  "account_avs": {    "billing_information": {      "first_name": 0,      "last_name": 0,      "dob": 0,      "address_1": 0,      "address_2": 0,      "city": 0,      "postal_code": 0,      "province": 0    },    "shipping_information": {      "first_name": 0,      "last_name": 0,      "dob": 0,      "address_1": 0,      "address_2": 0,      "city": 0,      "postal_code": 0,      "province": 0    }  }}
200 - Success - Regular Purchase
Code Block
{  "payment_protection": false,  "transaction_id": 167639,  "apr": 37.24,  "available_credit": 3528.93,  "term": "",  "admin_fee": 0,  "balance_after_purchase": 2328.88,  "payment_value": "1,200.05",  "promotional_amount": 1200.05,  "air": 37.24,  "customer_confirmed": false,  "plan_id": "",  "verified": true,  "account_avs": {    "billing_information": {      "first_name": 0,      "last_name": 0,      "dob": 0,      "address_1": 0,      "address_2": 0,      "city": 0,      "postal_code": 0,      "province": 0    },    "shipping_information": {      "first_name": 0,      "last_name": 0,      "dob": 0,      "address_1": 0,      "address_2": 0,      "city": 0,      "postal_code": 0,      "province": 0    }  }}
200 - Success - In-Store payment & Trade-in
Code Block
{  "transaction_id": "696952",  "customer_name": "John",  "customer_lname": "Doe",  "total_amount": "120.05000",  "verified": true}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized
Code Block
{
    "code": 401,
    "error": "unauthorized",
    "error_description": "Unauthorized"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Wrong Verification Code
Code Block
{
    "code": 409,
    "error": "wrong_verification_code",
    "error_description": "wrong_verification_code"
}
409 - MIssing Verification Code
Code Block
{
    "code": 409,
    "error": "verification_code_required",
    "error_description": "verification_code_required"
}
409 - Incorrect Transaction type
Code Block
{
    "code": 409,
    "error": "invalid_transaction_type",
    "error_description": "invalid_transaction_type"
}
409 - Customer / Account / Transaction - Not Found
Code Block
{
    "code": 404,
    "error": "not_found",
    "error_description": "not_found"
}
409 - User Not Able to Purchase
Code Block
{
    "code": 409,
    "error": "user_not_able_to_purchase",
    "error_description": "We’re sorry, we aren’t able to proceed with your request right now. If you were trying to process a transaction on an existing account, please call us at 1-877-259-3750. Otherwise, please check your internet connectivity or restart your device before trying again."
}
409 - Wrong Input
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
409 - Customer does not have enough credit
Code Block
{
    "code": 409,
    "error": "not_enough_credit",
    "error_description": "We're sorry, there doesn't seem to be enough credit for this purchase amount."
}
409 - Trade -In - Payment amount limit in 24 hours
Code Block
{
    "code": 409,
    "error": "limit_payment_amount_24",
    "error_description": ""
}

PUT /client-id/{client_id}/transactions/{transaction_id}

https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/transactions/12345

This endpoint allows for the modification of a Transaction by Customer or Merchant prior to being confirmed and submitted to Flexiti.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

PATH

...

transaction_id

...

Yes

...

  • number

  • This is the Transaction ID generated in the /client-id/{client_id}/transactions endpoint

...

BODY

...

customer_confirmed

...

  • boolean

  • Value denotes if the Customer is present and confirms the transaction

  • Default value: false

...

BODY

...

transaction_type

...

  • ASCII string

  • This is the transaction type

  • The PUT service is reserved for Promotional Purchases. Use "promotional_purchase”

  • Default value: promotional_purchase

...

BODY

...

plan_id

...

  • number

  • Only applicable to Promotional Purchases

  • Plan ID (utilize values from plan_id from the offer_types array in the /client-id/{client_id}/merchants/login endpoint)

...

BODY

...

term

...

  • integer

  • Only applicable to Promotional Purchases

  • Term (utilize values from terms_options from the offer_types array in the /client-id/{client_id}/merchants/login endpoint)

...

BODY

...

amount

...

  • number

  • This is the Purchase Amount

...

BODY

...

validation

...

Yes

...

  • number

  • This is the value returned by the customer validations methods

...

BODY

...

hold_authorization

...

  • boolean

  • This value should be false unless the Merchant needs to hold the Available Credit for future posting of the transaction

  • Default value: false

Success Response:

200 - Success
Code Block
{  "transaction_id": 152404,  "total_amount": 500,  "annual_fee": 0,  "available_credit": 5000,  "first_purchase": false,  "customer_confirmed": true,  "status": "pending",  "payment_protection": false,  "air": 0.3549,  "apr": 0.1999,  "plan_id": "4",  "term": 18,  "offer_plan_id": "7256",  "plan_name": "Equal Payments, Regular Interest",  "offer_plans": [    {      "promotional_amount": 500,      "regular_amount": 0,      "admin_fee": 0,      "balance_after_purchase": 4500,      "offer_category": "equal_billing",      "plan_id": "4",      "term": 18,      "payment_value": 32.38,      "offer_plan_id": "7256"    }  ]}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized
Code Block
{
    "code": 401,
    "error": "unauthorized",
    "error_description": "Unauthorized"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - MIssing Verification Code
Code Block
{
    "code": 409,
    "error": "verification_code_required",
    "error_description": "verification_code_required"
}
409 - User Not Able to Purchase
Code Block
{
    "code": 409,
    "error": "user_not_able_to_purchase",
    "error_description": "We’re sorry, we aren’t able to proceed with your request right now. If you were trying to process a transaction on an existing account, please call us at 1-877-259-3750. Otherwise, please check your internet connectivity or restart your device before trying again."
}
409 - Wrong Input
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
409 - Customer does not have enough credit
Code Block
{
    "code": 409,
    "error": "not_enough_credit",
    "error_description": "We're sorry, there doesn't seem to be enough credit for this purchase amount."
}
409 - Transaction Not Found
Code Block
{
    "code": 404,
    "error": "not_found",
    "error_description": "not_found"
}
409 - User not Active
Code Block
{
    "code": 409,
    "error": "user_not_active",
    "error_description": "Before proceeding with the purchase transaction, we need to activate your account. To activate your account or for more information visit my.flexiti.com."
}
409 - Invalid Transaction Type
Code Block
{
    "code": 409,
    "error": "invalid_transaction_type",
    "error_description": "invalid_transaction_type"
}

POST /client-id/{client_id}/transactions/{transaction_id}/post

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/transactions/12345/post

This endpoint authorizes Pending Purchases on Customer Accounts.

Parameters:

Type

Parameter

Required

Details

HEADER

authorization

Yes

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

PATH

client_id

Yes

  • ASCII string

  • This is the Client ID given in the Developer User Account section

PATH

transaction_id

Yes

  • number

  • This is the Pending Transaction ID to Authorize

Success Response:

200 - Success
Code Block
{}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized
Code Block
{
    "code": 401,
    "error": "unauthorized",
    "error_description": "Unauthorized"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Wrong Input
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
409 - Customer is not able to Preauth
Code Block
{
    "code": 409,
    "error": "user_not_able_to_preauth",
    "error_description": "We’re sorry, we aren’t able to proceed with your request right now. Please have your customer call us at 1-877-259-3750."
}
409 - Customer is not able to Purchase
Code Block
{
    "code": 409,
    "error": "user_not_able_to_purchase",
    "error_description": "We’re sorry, we aren’t able to proceed with your request right now. If you were trying to process a transaction on an existing account, please call us at 1-877-259-3750. Otherwise, please check your internet connectivity or restart your device before trying again."
}
409 - Transaction - Not Found
Code Block

{
    "code": 404,
    "error": "not_found",
    "error_description": "not_found"
}
409 - Merchant not valid
Code Block
{
    "code": 409,
    "error": "invalid_merchant",
    "error_description": "Invalid Merchant"
}

POST /client-id/{client_id}/transactions/{transaction_id}/cancel

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/transactions/12345/cancel

This endpoint Cancels Pending Purchases on Customer Accounts.

Parameters:

Type

Parameter

Required

Details

HEADER

authorization

Yes

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

PATH

client_id

Yes

  • ASCII string

  • This is the Client ID given in the Developer User Account section

PATH

transaction_id

Yes

  • number

  • This is the Pending Transaction ID to Authorize

Success Response:

200 - Success
Code Block
{}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized
Code Block
{
    "code": 401,
    "error": "unauthorized",
    "error_description": "Unauthorized"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Transaction - Not Found
Code Block

{
    "code": 404,
    "error": "not_found",
    "error_description": "not_found"
}
409 Invalid Merchant provided
Code Block
{
    "code": 409,
    "error": "invalid_merchant",
    "error_description": "Invalid Merchant"
}

POST /client-id/{client_id}/transactions/{transaction_id}/return

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/transactions/12345/return

This endpoint allows for the Returning/Refunding Purchases on Customer Accounts.

Parameters:

...

Type

...

Parameter

...

Required

...

Details

...

HEADER

...

authorization

...

Yes

...

  • ASCII string

  • This is the word “Bearer” with a space and then the access_token given in oauth/token API response

  • Default value: Bearer {insert_bearer_token_from_oauth_here/token_api}

...

PATH

...

client_id

...

Yes

...

  • ASCII string

  • This is the Client ID given in the Developer User Account section

...

PATH

...

transaction_id

...

Yes

...

  • number

  • This is the Pending Transaction ID to Authorize

...

BODY

...

return_type

...

  • ACII string

  • This is the type of Return to be processed

  • Available values: partial, full

...

BODY

...

return_amount

...

Yes

...

  • ASCII string

  • Required if the return_type is “partial”

  • This is the amount to Return

Success Response:

200 - Success
Code Block
{}

Error Responses:

401 - Unauthorized - Invalid Token
Code Block
{
    "code": 401,
    "error": "invalid_token",
    "error_description": "The access token provided is invalid."
}
401 - Unauthorized
Code Block
{
    "code": 401,
    "error": "unauthorized",
    "error_description": "Unauthorized"
}
400 - Conflict - Invalid Client
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Client credentials are invalid"
}
400 - Conflict - Invalid client ID
Code Block
{
    "code": 400,
    "error": "invalid_client",
    "error_description": "Invalid or missing client_id parameter"
}
400 - Conflict - Invalid grant type
Code Block
{
    "code": 400,
    "error": "invalid_request",
    "error_description": "Invalid or missing grant_type parameter"
}
409 - Wrong Input
Code Block
{
    "code": 409,
    "error": "wrong_inputs",
    "error_description": "Some inputs are wrong!"
}
409 - Transaction - Not Found
Code Block
{
    "code": 404,
    "error": "not_found",
    "error_description": "not_found"
}
409 - Refund - Exceeds Amount

...

Child pages (Children Display)
alltrue
depth4