Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Required mechanisms to authenticate a 3rd party session and trigger the integration to the APIThese endpoints support Merchant integrations of Flexiti services.

Table of Contents

...

POST /oauth/token

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/oauth/token

...

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

Scope Parameter Usage

For the token endpoint there are two possible scopes: merchant or customer.

...

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

  • POST /client-id/{client_id}widget/init

  • POST /client-id/{client_id}/apply

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

  • POST /client-id/{client_id}/information

  • POST /client-id/{client_id}/accounts/{account_number}/calculate-interest

  • POST /client-id/{client_id}/account/{account_number}/verify

  • POST /client-id/{client_id}/authorization

Request Parameters:

Type

Parameter

Required

Details

FORMDATA

client_id

Yes

  • ASCII string (100)

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

FORMDATA

client_secret

Yes

  • ASCII string (100)

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

HEADER

x-reference-id

Yes

  • ASCII string (32)

  • GUID

  • Unique identifier for the flow for traceability purposes

BODY

grant_type


  • ASCII string

  • This is the client's access type

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

  • default value: 'client_credentials'

BODY

refresh_token

  • ASCII string

  • only to be used with the grant_type: refresh_token.

  • It should be the refresh_token attribute in the last response of this method.

BODY

scope

  • ASCII string

  • Available values: ‘customer', 'merchant’

  • Default value: merchant

Example Request:

Code Block
languagejson
{
    "client_id": "flexitidemo",
    "client_secret": "77xde15a-9d33-4c15-930a-3se4b3as33e9",
    "grant_type": "client_credentials",
    "scope": "merchant"
}

Response Parameters:

Type

Parameter

Details

BODY

access_token

  • Bearer token to be used in subsequent calls

BODY

expires_in

  • Time, in seconds, that the token will last

BODY

refresh_token

  • Token to be used to refresh the access_token

Success Response:

Code Block
{
    "token_type": "bearer",  
    "access_token": "2d8f373a3c2b1e61baf5a7769930ff4f0e08cdb0",  
    "expires_in": 1200,  
    "refresh_token": "36e0fc3d7415145f4b1d71512c459fd6eaa13aa8",
    "scope": "merchant"
}

...

...

GET /client-id/{client_id}/

...

i18n

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client-_id}/merchants/login?lang=en
Warning

This endpoint has been depreciated as of our 20.3 Release and is no longer necessary to authenticate the Merchant.

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.

Request Parameters:

...

Type

...

Parameter

i18n

Or

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client_id}/i18n/{key}
  • This endpoint will return information for form value and messaging purposes

  • You can retrieve all information or filter for specific messages using a key in the URL

Request Parameters:

Type

Parameter

Required

Details

HEADER

authorization

Yes

  • ASCII string (100040)

  • 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}

HEADER

x-reference-id

Yes

  • ASCII string (32)

  • GUID

  • Unique identifier for the flow for traceability purposes

PATH

client_id

Yes

  • ASCII string (100)

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

QUERY

lang


  • ASCII string (25)

  • Customer Preferred language

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

  • Default value: en

BODY

merchant_usernameQUERY

{key}


  • 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

Example Request:

...

breakoutModewide
languagejson

...

  • (1000)

  • Specific values can be used to filter the response

  • Not passing a value will response with all messages.

  • Available values:

    • salutation

    • province

    • security_id

    • govid_type

    • govid_issued_by

    • occupation

    • transaction_type

    • plan_id

    • qcpa_disclosure

    • insurance

    • insurance_tc

    • annual_fees

Success Response:

Code Block
{
    "salutations": {
        "merchant_usernamemr": "acmejewellersMr.",
    "merchant_password    "ms": "dice-vanila-purse"
}

Response Parameters:

...

Type

...

Parameter

...

Details

...

BODY

...

merchant_name

...

  • ASCII string (130)

  • Name of the merchant authenticated

...

BODY

...

merchant_id

...

  • number (10)

  • ID of the merchant authenticated

...

BODY

...

form_values

...

  • ASCII strings

  • Various values used in the credit application form

Success Response:

Code Block
breakoutModewide
languagejson
{Ms.",
        "merchant_namemrs": "ACME JewellersMrs.",
        "merchant_idmss": "123456"Miss."
    },
    "form_valuesprovinces": {
        "salutationAB": {
"Alberta",
           "optionsBC": {
      "British Columbia",
         "mrMB": "Mr.Manitoba",
        "NB": "New Brunswick",
        "msNL": "Ms.Newfoundland & Labrador",
 
              "mrs"NS": "Mrs.Nova Scotia",
                "mss"NT": "Miss.Northwest Territories",
        "NU": "Nunavut",
  }         }"ON": "Ontario",
        "provincePE": {"Prince Edward   Island",
        "optionsQC": {
  "Quebec",
             "ABSK": "AlbertaSaskatchewan",
       
        "BCYT": "BritishYukon ColumbiaTerritory",
    },
    "security_ids": {
        "MB4": "Manitoba",What is the name of your favourite childhood friend?",
        "NB5": "NewWhat Brunswick",is the country of your ultimate dream vacation?",
         "NL6": "NewfoundlandWhat &was Labrador",the first concert     you attended?",
         "NS7": "Nova Scotia",
       What is the name of the street you grew up on?",
        "NT8": "NorthwestWhat Territories",is the name of your first grade teacher?",
         "NU9": "Nunavut",
 What is your favourite movie?"
    },
    "govid_types": {
        "ONCADL": "OntarioDriver's Licence",
        "CAHC": "Health Card",
        "PECAPID": "PrinceProvincial EdwardID IslandCard",
  
             "QCCAP": "QuebecPassport",
       
        "SKCAPRC": "SaskatchewanPermanent Resident Card",
        "CAICBC": "Insurance Corporation of British    "YT": "Yukon Territory"Columbia",
        "CAAR": "Alberta Registries",
   }     "CASGI": "Saskatchewan Government  }Insurance",
        "security_qidCADSNS": {
    "Department of Service Nova Scotia and Municipal Relations",
        "optionsCADPPEI": {
       "Department of Transportation and Public Works of the Province of Prince Edward Island",
        "4CASNB": "WhatService isNew theBrunswick",
name of your favourite childhood friend?",   "CADGSNF": "Department of Government Services and Lands of the Province of Newfoundland and  Labrador"5":,
"What is the country of your ultimate dream vacation?"CADTNW",: "Department of Transportation of the Northwest  Territories",
        "6CADCTN": "WhatDepartment wasof theCommunity firstGovernment concertand you attended?",
   Transportation of the Territory of Nunavut",
            "7CACSC": "WhatCorrectional isService theCanada name ofidentification card (with the streetindividual's youname grew up on?and photograph)",
        "CAGCEC": "Government of Canada employee identity card (with the individual's "8": "What is the name of your first grade teacher?",
       name and photograph)",
        "CALCB": "Liquor Control Board Age of Majority (BYID) card",
        "9CACFL": "WhatCanadian is your favourite movie?"Firearms licence",
        "CACFID": "Canadian Forces identification  }
        }card",
        "CAMPIC": "MPIC card issued by the Manitoba Public Insurance Corporation",
        "govid_typeCACAID": {"NEXUS or CANPASS Air membership card (issued by Canada Border Services Agency)"
 "options": {  },
    "govid_issued_bys": {
        "CADLoption_depends": "Driver's Licence",{
            "CADL": {
   "CAHC             "AB": "Health CardAlberta",
                "CAPIDBC": "ProvincialBritish ID CardColumbia",
                "CAPMB": "PassportManitoba",
                "CAPRCNB": "PermanentNew Resident CardBrunswick",
                "CAICBCNL": "InsuranceNewfoundland Corporation of British Columbia& Labrador",
                "CAARNS": "AlbertaNova RegistriesScotia",
                "CASGINT": "SaskatchewanNorthwest Government InsuranceTerritories",
                "CADSNSNU": "Department of Service Nova Scotia and Municipal RelationsNunavut",
                "CADPPEION": "DepartmentOntario",
of Transportation and Public Works of the Province of                "PE": "Prince Edward Island",
                "CASNBQC": "Service New BrunswickQuebec",
                "CADGSNFSK": "Saskatchewan"Department,
of Government Services and Lands of the Province of Newfoundland and Labrador",     "YT": "Yukon Territory"
         "CADTNW": "Department of Transportation},
of the Northwest Territories",         "CAHC": {
      "CADCTN": "Department of Community Government and Transportation of the Territory of Nunavut "BC": "British Columbia",
                "CACSCNB": "CorrectionalNew Brunswick",
Service Canada identification card (with the individual's name and photograph)",       "NL": "Newfoundland & Labrador",
      "CAGCEC": "Government of Canada employee identity card (with the individual's name and photograph) "NT": "Northwest Territories",
                "CALCBNU": "Liquor Control Board Age of Majority (BYID) cardNunavut",
                "CACFLQC": "Canadian Firearms licenceQuebec",
                "CACFIDSK": "Canadian Forces identification cardSaskatchewan",
                "CAMPICYT": "Yukon Territory"MPIC
card issued by the Manitoba Public Insurance Corporation",     },
            "CACAIDCAPID": "NEXUS{
  or CANPASS Air membership card (issued by Canada Border Services Agency)"    "ON": "Ontario"
       }     },
   },         "govid_issued_byCAP": {
                "option_dependsCANADA": {"Canada"
            },
   "CADL": {         "CAPRC": {
                "ABCANADA": "AlbertaCanada",
            },
       "BC": "British Columbia",   "CAICBC": {
                "MBBC": "ManitobaBritish Columbia",
            },
       "NB": "New Brunswick",   "CAAR": {
                "NLAB": "Newfoundland & LabradorAlberta",
            },
       "NS": "Nova Scotia",   "CASGI": {
                "NTSK": "Saskatchewan"Northwest
Territories",            },
        "NU": "Nunavut",   "CADSNS": {
                "ONNS": "OntarioNova Scotia",
             },
      "PE": "Prince Edward Island",   "CADPPEI": {
                "QCPE": "QuebecPrince Edward Island",
            },
       "SK": "Saskatchewan",    "CASNB": {
                "YTNB": "YukonNew TerritoryBrunswick"
   
            },
  
             "CAHCCADGSNF": {
                    "BCNL": "BritishNewfoundland & ColumbiaLabrador",
            },
       "NB": "New Brunswick",   "CADTNW": {
                "NLNT": "NewfoundlandNorthwest & LabradorTerritories",
            },
       "NT": "Northwest Territories",   "CADCTN": {
                "NU": "Nunavut",
            },
       "QC": "Quebec",     "CACSC": {
                "SKCANADA": "Saskatchewan",Canada"
            },
            "YTCAGCEC": "Yukon{
Territory"                 },"CANADA": "Canada"
            },
   "CAPID": {         "CALCB": {
                "ONAB": "OntarioAlberta",
                } "BC": "British Columbia",
                "CAPMB": {"Manitoba",
                    "CANADANB": "Canada"New Brunswick",
                "NL": "Newfoundland & }Labrador",
                "CAPRCNS": {
   "Nova Scotia",
                "CANADANT": "CanadaNorthwest Territories",
                } "NU": "Nunavut",
                "CAICBCON": {"Ontario",
                    "BCPE": "BritishPrince Edward ColumbiaIsland",
                } "QC": "Quebec",
                "CAARSK": {
   "Saskatchewan",
                "ABYT": "AlbertaYukon Territory"
                },
   
            "CASGICACFL": {
   
                "SKCANADA": "SaskatchewanCanada"
                },

               "CADSNSCACFID": {
  
                 "NSCANADA": "Nova ScotiaCanada"
 
              },
                "CADPPEICAMPIC": {
                    "PE": "Prince Edward Island""MB": "Manitoba"
                 },
                "CASNBCACAID": {
   
                "NBCANADA": "New BrunswickCanada"
            }
   },     }
    },
      "CADGSNFoccupation_ids": {
        "options": {
            "NLFE": "Newfoundland & Labrador"Full-time Employment",
            "PE":    },
  "Part-time Employment",
             "CADTNWSE": {"Self-Employed",
                    "NT"RT": "Northwest TerritoriesRetired",
              "ST": "Student",
 },           "HM": "Homemaker",
    "CADCTN": {       "DS": "Disability",
            "NUSW": "NunavutSeasonal Worker",
            "UE": "Unemployed with  }income",
                "CACSCUW": {"Unemployed without   income",
                "CANADAOT": "CanadaOther"
        }
       },
      "transaction_types": {
         "CAGCECpromotional_purchase": {"Financed Purchase",
        "regular_purchase": "Revolving Purchase"
    },
    "CANADAplan_ids": "Canada"{
        "1": "90 Days Grace, Equal Payments Regular  }Interest",
        "2": "Equal Payments, Low     "CALCB": {Interest",
        "4": "Equal Payments, Regular Interest",
        "AB5": "Alberta",Equal Payments,      No Interest",
             "BC6": "British ColumbiaNo Interest, No Payments (S.A.C.)",
        "7": "No Interest, No Payments",
        "MB9": "Manitoba"No Interest, Minimum monthly payments"
    },
       "qcpa_disclosure": "...",
    "NBinsurance": "New Brunswick...",
                    "NL": "Newfoundland & Labrador",
     "insurance_tc": "...",
              "NS"annual_fees": "Nova Scotia",
                    "NT": "Northwest Territories",
                    "NU": "Nunavut",
                    "ON": "Ontario",
    ..."
}

...

POST /client-id/{clientId}/widget/init

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client_id}/widget/init

The Flexiti widget is used in high orchestration scenarios, such as customer verification, using a UI component as an entry point to the Flexiti credit application and purchase flows.

For full Widget documentation start here - Flexiti Widget - Online Channel - POS API

...

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

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client-id}/merchants/login?lang=en
Warning

This endpoint has been depreciated as of our 20.3 Release and is no longer necessary to authenticate the Merchant.

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.

Request Parameters:

Type

Parameter

Required

Details

HEADER

authorization

Yes

  • ASCII string (1000)

  • 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}

HEADER

x-reference-id

Yes

  • ASCII string (32)

  • GUID

  • Unique identifier for the flow for traceability purposes

PATH

client_id

Yes

  • ASCII string (100)

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

QUERY

lang


  • ASCII string (2)

  • Customer Preferred language

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

  • Default: en

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

Example Request:

Code Block
breakoutModewide
languagejson
{
    "merchant_username": "acmejewellers",
    "merchant_password": "dice-vanila-purse"
}

Response Parameters:

Type

Parameter

Details

BODY

merchant_name

  • ASCII string (130)

  • Name of the merchant authenticated

BODY

merchant_id

  • number (10)

  • ID of the merchant authenticated

BODY

form_values

  • ASCII strings

  • Various values used in the credit application form

Success Response:

Code Block
breakoutModewide
languagejson
{
    "merchant_name": "ACME Jewellers",
    "merchant_id": "123456",
    "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"
                },
                "PECACAID": "Prince{
Edward Island",
                    "QCCANADA": "Quebec",Canada"
                }
       "SK": "Saskatchewan",    }
        }
    },
    "YToccupation_id": "Yukon Territory" {
        "options": {
           }, "FE": "Full-time Employment",
             "CACFLPE": {
"Part-time Employment",
                   "CANADA"SE": "CanadaSelf-Employed",
            "RT": "Retired",
  },          "ST": "Student",
     "CACFID": {       "HM": "Homemaker",
            "CANADADS": "CanadaDisability",
            "SW": "Seasonal Worker",
     },       "UE": "Unemployed with income",
      "CAMPIC": {     "UW": "Unemployed without income",
            "MBOT": "ManitobaOther"
        }
       },
                "CACAID": {
                    "CANADA": "Canada"
                }
            }
        }
    },
    "occupation_id": {
        "options": {
            "FE": "Full-time Employment",
            "PE": "Part-time Employment",
            "SE": "Self-Employed",
            "RT": "Retired",
            "ST": "Student",
   }
}

...

DEPRECIATED - GET /client-id/{client_id}/merchants/information

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client_id}/merchants/information?lang=en

Or

Code Block
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client-id}/information?lang=en&message=qcpa_disclosure
Warning

This endpoint has been depreciated with our 20.3 Release

This endpoint will return HTML for information/message purposes, such as disclosures. You can retrieve all messages or filter for specific messages using a key in the URL

Request Parameters:

Type

Parameter

Required

Details

HEADER

authorization

Yes

  • ASCII string (40)

  • 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}

HEADER

x-reference-id

Yes

  • ASCII string (32)

  • GUID

  • Unique identifier for the flow for traceability purposes

PATH

client_id

Yes

  • ASCII string (100)

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

QUERY

lang


  • ASCII string (5)

  • Customer Preferred language

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

  • Default value: en

QUERY

message


  • ASCII string (1000)

  • Specific values can be used to filter the response

  • Not passing a value will response with all messages.

Success Response:

200 - Success - All
Code Block
languagejson
[
    {
        "HMqcpa_disclosure": "Homemaker",
            "DS": "Disability",
      ......."
    },
"SW": "Seasonal Worker",  {
          "UEannual_fees": "Unemployed with income"".."
    },
    {
        "UWkey_3": "Unemployed without income",....."
    }
]
200 - Success - Specific Message filtered
Code Block
[
      "OT": "Other"{
         }"qcpa_disclosure": "......."
    }
}]