POS API Endpoint Overview
The Flexiti POS API Endpoints is divided into 5 categories:
Authentication - Required mechanisms to authenticate a 3rd party session.
Customers - Endpoints required to identify a Flexiti customer.
CreditApps - Endpoints that allow Merchant customers to apply for new credit.
Transactions - - Endpoints required to post transactions (purchases and returns).
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
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 |
|
FORMDATA | client_secret | Yes |
|
BODY | grant_type |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
{ "client_id": "flexitidemo", "client_secret": "77fde15a-9d33-4e15-930a-76e4b3ae33e9", "grant_type": "client_credentials" }
Success Response:
{ "token_type": "bearer", "access_token": "3d8f373a9a2b1e61baf5abb69930ff4f0e08cdb0", "expires_in": 1200, "refresh_token": "36e0fc3d7415185f4b1d71512c459fd6eaa13aa8" }
POST /client-id/{client_id}/merchants/login
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 |
|
PATH | client_id | Yes |
|
QUERY | lang |
| |
BODY | merchant_username |
| |
BODY | merchant_password |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
{ "merchant_username": "merchantonline", "merchant_password": "dice-manila-purism" }
Success Response:
{ "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
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 |
|
PATH | client_id | Yes |
|
QUERY | lang |
| |
QUERY | province |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
Success Response:
<div id='tcs'>... </div>
POST /client-id/{client_id}/apply
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 |
|
PATH | client_id | Yes |
|
BODY | amount_requested | Yes |
|
BODY | phone_number | Yes |
|
BODY | Yes |
| |
BODY | language |
| |
BODY | salutation | Yes |
|
BODY | first_name | Yes |
|
BODY | middle_name |
| |
BODY | last_name | Yes |
|
BODY | dob | Yes |
|
BODY | address_1 |
| |
BODY | address_2 | Yes |
|
BODY | city | Yes |
|
BODY | province | Yes |
|
BODY | postal_code | Yes |
|
BODY | govid_type |
| |
BODY | govid_issuedby |
| |
BODY | govid_number |
| |
BODY | govid_expiry |
| |
BODY | input_type |
| |
BODY | personal_income | Yes |
|
BODY | household_income | Yes |
|
BODY | monthly_housing_expenses |
| |
BODY | housing_type | Yes |
|
BODY | occupation_id | Yes |
|
BODY | occupation_title | Yes |
|
BODY | employer_name |
| |
BODY | employer_phone |
| |
BODY | sin |
| |
BODY | security_qid | Yes |
|
BODY | security_answer | Yes |
|
BODY | piw | Yes |
|
BODY | tos_agreement | Yes |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
{ "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
{ "vcc_number": 6374980100408234, "account_number": 20035156, "customer_id": 43353, "available_credit": 5000, "credit_limit": 5000, "risk_rating": "L" }
200 - Success - QC applicant
{ "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
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup?vcc_number=1234123412341234
or
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 |
|
PATH | client_id | Yes |
|
QUERY | first_name |
| |
QUERY | last_name |
| |
QUERY | dob |
| |
QUERY | postal_code |
| |
QUERY | vcc_number |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
Success Response:
{ "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
{ "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/lookup", "message": "Customer not found", "error": "not_found" }
409 - VCC Not Activated
{ "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"
{ "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
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 |
|
PATH | client_id | Yes |
|
PATH | customer_id | Yes |
|
BODY | format | Yes |
|
BODY | security_qid | Required for format: security_question |
|
BODY | security_answer | Required for format: security_question |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
Success Responses:
200 - Success - Override
{ "verification_code": 2485 }
200 - Success - SMS
{ "verification_code": "verification_sent_to_sms" }
200 - Success - Email
{ "verification_code": "verification_sent_to_email" }
Error Responses:
409 - Account Not Found
{ "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
{ "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
{ "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
{ "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
{ "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
{ "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
{ "url": "/flexiti/pos-api/v2/client-id/flexitidemo/customers/828930/verify", "message": "Some inputs are wrong!", "error": "wrong_input" }
409 - Wrong Personal Identification Word
{ "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
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 |
|
PATH | client_id | Yes |
|
PATH | customer_id | Yes |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
Success Response:
200 - Success
{ "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": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized - Invalid Token
{ "code": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Not Found
{ "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
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 |
|
PATH | client_id | Yes |
|
QUERY | first_name | Yes |
|
QUERY | last_name | Yes |
|
QUERY | dob | Yes |
|
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
[ { "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": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized - Invalid Token
{ "code": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Customer not found
{ "code": 404, "error": "not_found", "error_description": "not_found" }
409 - User not able to Purchase
{ "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
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 |
|
PATH | client_id | Yes |
|
BODY | code | Yes |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
Success Response:
{ "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": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized - Invalid Token
{ "code": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Not Supported
{ "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
{ "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
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 |
|
PATH | client_id | Yes |
|
BODY | account_number | Yes |
|
Validations:
Parameter | Case | Error Type |
---|---|---|
Example Value:
Success Response:
200 - Success
{ }
Endpoints: Transactions
These are all of the necessary endpoints required to post Transactions (Purchases, Returns).
POST /client-id/{client_id}/transactions
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 |
|
PATH | client_id | Yes |
|
QUERY | lang |
| |
BODY | transaction_type |
| |
BODY | plan_id |
| |
BODY | term |
| |
BODY | amount |
| |
BODY | vcc_number |
| |
BODY | account_number |
| |
BODY | customer_id |
| |
BODY | account_avs |
| |
BODY | customer_confirmed |
| |
BODY | hold_authorization |
| |
BODY | verification_code | Yes |
|
Success Response:
200 - Success - Promotional Purchase
{ "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
{ "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
{ "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
{ "transaction_id": "696952", "customer_name": "John", "customer_lname": "Doe", "total_amount": "120.05000", "verified": true}
Error Responses:
401 - Unauthorized - Invalid Token
{ "code": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized
{ "code": 401, "error": "unauthorized", "error_description": "Unauthorized" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Wrong Verification Code
{ "code": 409, "error": "wrong_verification_code", "error_description": "wrong_verification_code" }
409 - MIssing Verification Code
{ "code": 409, "error": "verification_code_required", "error_description": "verification_code_required" }
409 - Incorrect Transaction type
{ "code": 409, "error": "invalid_transaction_type", "error_description": "invalid_transaction_type" }
409 - Customer / Account / Transaction - Not Found
{ "code": 404, "error": "not_found", "error_description": "not_found" }
409 - User Not Able to Purchase
{ "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": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
409 - Customer does not have enough credit
{ "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": 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 |
|
PATH | client_id | Yes |
|
PATH | transaction_id | Yes |
|
BODY | customer_confirmed |
| |
BODY | transaction_type |
| |
BODY | plan_id |
| |
BODY | term |
| |
BODY | amount |
| |
BODY | validation | Yes |
|
BODY | hold_authorization |
|
Success Response:
200 - Success
{ "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": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized
{ "code": 401, "error": "unauthorized", "error_description": "Unauthorized" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - MIssing Verification Code
{ "code": 409, "error": "verification_code_required", "error_description": "verification_code_required" }
409 - User Not Able to Purchase
{ "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": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
409 - Customer does not have enough credit
{ "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": 404, "error": "not_found", "error_description": "not_found" }
409 - User not Active
{ "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": 409, "error": "invalid_transaction_type", "error_description": "invalid_transaction_type" }
POST /client-id/{client_id}/transactions/{transaction_id}/post
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 |
|
PATH | client_id | Yes |
|
PATH | transaction_id | Yes |
|
Success Response:
200 - Success
{}
Error Responses:
401 - Unauthorized - Invalid Token
{ "code": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized
{ "code": 401, "error": "unauthorized", "error_description": "Unauthorized" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Wrong Input
{ "code": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
409 - Customer is not able to Preauth
{ "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": 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": 404, "error": "not_found", "error_description": "not_found" }
409 - Merchant not valid
{ "code": 409, "error": "invalid_merchant", "error_description": "Invalid Merchant" }
POST /client-id/{client_id}/transactions/{transaction_id}/cancel
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 |
|
PATH | client_id | Yes |
|
PATH | transaction_id | Yes |
|
Success Response:
200 - Success
{}
Error Responses:
401 - Unauthorized - Invalid Token
{ "code": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized
{ "code": 401, "error": "unauthorized", "error_description": "Unauthorized" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Transaction - Not Found
{ "code": 404, "error": "not_found", "error_description": "not_found" }
409 Invalid Merchant provided
{ "code": 409, "error": "invalid_merchant", "error_description": "Invalid Merchant" }
POST /client-id/{client_id}/transactions/{transaction_id}/return
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 |
|
PATH | client_id | Yes |
|
PATH | transaction_id | Yes |
|
BODY | return_type |
| |
BODY | return_amount | Yes |
|
Success Response:
200 - Success
{}
Error Responses:
401 - Unauthorized - Invalid Token
{ "code": 401, "error": "invalid_token", "error_description": "The access token provided is invalid." }
401 - Unauthorized
{ "code": 401, "error": "unauthorized", "error_description": "Unauthorized" }
400 - Conflict - Invalid Client
{ "code": 400, "error": "invalid_client", "error_description": "Client credentials are invalid" }
400 - Conflict - Invalid client ID
{ "code": 400, "error": "invalid_client", "error_description": "Invalid or missing client_id parameter" }
400 - Conflict - Invalid grant type
{ "code": 400, "error": "invalid_request", "error_description": "Invalid or missing grant_type parameter" }
409 - Wrong Input
{ "code": 409, "error": "wrong_inputs", "error_description": "Some inputs are wrong!" }
409 - Transaction - Not Found
{ "code": 404, "error": "not_found", "error_description": "not_found" }
409 - Refund - Exceeds Amount
{ "code": 409, "error": "refunds_limit_exceeded_amount", "error_description": "Please contact us at<br/><strong class='no-break'>1-877-259-3745</strong><br/>and we will be happy to assist you." }