Required mechanisms to authenticate a 3rd party session and trigger the integration to the API.
Table of Contents |
---|
POST /oauth/token
Code Block |
---|
https://{posapi_url}/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.
Scope Parameter Usage
For the token endpoint there are two possible scopes: merchant or customer.
...
A token with a merchant scope will be allowed for all endpoints
...
These 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 |
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 when the current one is about to expire. It cannot be refreshed after it is 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. More information available here: How to Implement the Refresh Token
Scope Parameter Usage (IMPORTANT)
For the token endpoint there are two possible scopes: merchant or customer.
A token with a customer scope will be allowed in all endpoints required by customer facing UI, other endpoints will considered this token invalid.
...
When to use: for Online channel implementations during the application and authorization flows (outlined below).
A token with a merchant scope will be allowed for all endpoints
When to use: for In-store channel implementations, or Online channel back office processes like capturing an authorization, releasing, refunding/returning, etc.
The endpoints that should be called using a customer scope should be:
POST /client-id/{client_id}/merchants/logini18nPOST
GET /client-id/{client_id}widget/init/terms-and-conditions
POST /client-id/{client_id}/customers/applydriverslicense
GET POST /client-id/{client_id}widget/terms-and-conditionsinit
POST /client-id/{client_id}/apply
POST /client-id/{client_id}/accounts/{account_number}/informationclose
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 |
|
FORMDATA | client_secret | Yes |
|
HEADER | x-reference-id | Yes |
|
BODY | grant_type |
| |
BODY | refresh_token |
| |
BODY | scope |
|
Example Request:
Code Block | ||
---|---|---|
| ||
{ "client_id": "flexitidemo", "client_secret": "77xde15a-9d33-4c15-930a-3se4b3as33e9", "grant_type": "client_credentials", "scope": "merchant" } |
Response Parameters:
Type | Parameter | Details |
---|---|---|
BODY | access_token |
|
BODY | expires_in |
|
BODY | refresh_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 |
...
i18n |
Or
Code Block |
---|
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client_id}/i18n/{key} |
This endpoint will return information for application form values and customer facing messaging like disclaimers
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 |
|
| |||
HEADER | x-reference-id | Yes |
|
PATH | client_id | Yes |
|
QUERY | lang |
|
|
BODY
QUERY | {key} |
|
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:
...
|
Success Response:
Code Block |
---|
{ "merchant_usernamesalutations": "acmejewellers",{ "merchant_password "mr": "Mr.", "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 | ||||
---|---|---|---|---|
| ||||
{Ms.", "mrs": "Mrs.", "merchant_namemss": "ACME JewellersMiss.", "merchant_id": "123",}, "form_valuesprovinces": { "salutationAB": {"Alberta", "optionsBC": { "British Columbia", "mrMB": "Mr.Manitoba", "NB": "New Brunswick", "msNL": "Ms.Newfoundland & Labrador", "NS": "Nova Scotia", "mrsNT": "Mrs.Northwest Territories", "NU": "Nunavut", "mssON": "Miss.Ontario", "PE": "Prince Edward Island", } }"QC": "Quebec", "provinceSK": {"Saskatchewan", "YT": "Yukon Territory" "options": { }, "security_ids": { "AB4": "Alberta",What is the name of your favourite childhood friend?", "BC5": "BritishWhat Columbia",is the country of your ultimate dream vacation?", "MB6": "Manitoba",What was the first concert you attended?", "NB7": "New Brunswick", What is the name of the street you grew up on?", "NL8": "NewfoundlandWhat &is Labrador",the name of your first grade teacher?", "NS9": "Nova Scotia", What is your favourite movie?" }, "govid_types": { "NTCADL": "NorthwestDriver's TerritoriesLicence", "NU"CAHC": "NunavutHealth Card", "CAPID": "Provincial ID Card", "ONCAP": "OntarioPassport", "PE"CAPRC": "PrincePermanent EdwardResident IslandCard", "CAICBC": "Insurance Corporation of British Columbia", "QC": "Quebec", "CAAR": "Alberta Registries", "SKCASGI": "Saskatchewan Government Insurance", "CADSNS": "Department of Service Nova Scotia and Municipal Relations"YT":, "Yukon Territory" "CADPPEI": "Department of Transportation and Public }Works of the Province of Prince Edward }Island", "security_qidCASNB": {"Service New Brunswick", "optionsCADGSNF": { "Department of Government Services and Lands of the Province of Newfoundland and Labrador", "4CADTNW": "WhatDepartment isof the nameTransportation of yourthe favourite childhood friend?Northwest Territories", "5"CADCTN": "What is the countryDepartment of Community Government and Transportation of yourthe ultimateTerritory dreamof vacation?Nunavut", "CACSC": "Correctional Service Canada identification card (with "6": "What was the first concert you attended?",the individual's name and photograph)", "CAGCEC": "Government of Canada employee identity card (with the individual's name "7": "What is the name of the street you grew up on?", and photograph)", "CALCB": "Liquor Control Board Age of Majority (BYID) card", "8CACFL": "WhatCanadian isFirearms thelicence", name of your first grade teacher?", "CACFID": "Canadian Forces identification card", "9CAMPIC": "What is your favourite movie?"MPIC card issued by the Manitoba Public Insurance Corporation", "CACAID": "NEXUS or CANPASS }Air membership card (issued by Canada Border Services Agency)" }, }, "govid_issued_typebys": { "optionsoption_depends": { "CADL": "Driver's Licence",{ "CAHCAB": "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": "DepartmentNunavut", of Service Nova Scotia and Municipal Relations", "ON": "Ontario", "CADPPEI": "Department 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 card""Saskatchewan", "CAMPICYT": "MPICYukon Territory" 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_depends": { "CANADA": "Canada" }, "CADL "CAPRC": { "ABCANADA": "AlbertaCanada", }, "BC": "British Columbia", "CAICBC": { "MBBC": "ManitobaBritish Columbia", }, "NB": "New Brunswick", "CAAR": { "NLAB": "Newfoundland & LabradorAlberta", }, "NS": "Nova Scotia", "CASGI": { "NTSK": "NorthwestSaskatchewan" 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 &Territories" Labrador", }, "NT": "Northwest Territories", "CADCTN": { "NU": "Nunavut", }, "QC": "Quebec", "CACSC": { "SKCANADA": "SaskatchewanCanada", }, "YT": "Yukon Territory" "CAGCEC": { }, "CANADA": "Canada" "CAPID": { }, "ON": "Ontario""CALCB": { }"AB": "Alberta", "CAPBC": {"British Columbia", "CANADAMB": "CanadaManitoba", "NB": "New }Brunswick", "CAPRCNL": {"Newfoundland & Labrador", "CANADANS": "CanadaNova Scotia", }, "NT": "Northwest Territories", "CAICBCNU": {"Nunavut", "BCON": "British Columbia"Ontario", "PE": "Prince Edward }Island", "CAARQC": {"Quebec", "ABSK": "AlbertaSaskatchewan", }, "YT": "Yukon Territory" }, "CASGI": { "CACFL": { "SK": "Saskatchewan" "CANADA": "Canada" }, }, "CADSNSCACFID": { "NSCANADA": "Nova Scotia" Canada" }, "CADPPEICAMPIC": { "PEMB": "Prince Edward IslandManitoba" }, "CASNBCACAID": { "NBCANADA": "Canada"New Brunswick" } }, } }, "CADGSNFoccupation_ids": { "options": { "NLFE": "Newfoundland & Labrador"Full-time Employment", "PE": }"Part-time Employment", "CADTNWSE": { "Self-Employed", "NTRT": "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 Interest", "CALCB": { "4": "Equal Payments, Regular Interest", "AB5": "AlbertaEqual Payments, No Interest", "6": "No Interest, No Payments (S.A.C.)", "BC7": "BritishNo Columbia"Interest, No Payments", "9": "No Interest, Minimum monthly payments" }, "MB "qcpa_disclosure": "Manitoba...", "insurance": "...", "insurance_tc": "...", "NBannual_fees": "New Brunswick...", "housing_type": { "Rent": "Rent", "NLOwned": "Newfoundland & LabradorOwned", "NS"Relatives": "NovaLives with ScotiaRelatives", "NTOther": "Northwest TerritoriesOther", "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" } } } } }} } |
...
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 for the Online channel only, and is for high orchestration scenarios, such as customer verification and multiple account selection. It is a UI component that’s an entry point to the Flexiti purchase flow.
For full Widget documentation start here - Flexiti Widget - POS API Online Channel Purchase Flow