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:

...

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

Validations:

Parameter

Case

Error Type

Example Value:

Success Response:

200 - Success - Promotional Purchase

...

Code Block
{  "transaction_id": "696952",  "customer_name": "John",  "customer_lname": "Doe",  "total_amount": "120.05000",  "verified": true}

Error Responses:

...

409 - Wrong Verification Code
Code Block
{
    "code": 401409,
    "error": "invalidwrong_verification_tokencode",
    "error_description": "The access token provided is invalid.wrong_verification_code"
}

...

409 -

...

MIssing Verification Code
Code Block
{
    "code": 401409,
    "error": "unauthorizedverification_code_required",
    "error_description": "Unauthorizedverification_code_required"
}

...

409 - Incorrect Transaction type
Code Block
{
    "code": 400409,
    "error": "invalid_clienttransaction_type",
    "error_description": "Client credentials are invalidinvalid_transaction_type"
}

...

409 - Customer / Account / Transaction - Not Found
Code Block
{
    "code": 400404,
    "error": "invalidnot_clientfound",
    "error_description": "Invalid or missing client_id parameternot_found"
}

...

409 - User Not Able to Purchase
Code Block
{
    "code": 400409,
    "error": "invalid_requestuser_not_able_to_purchase",
    "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"
}

...

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 - Customer does not have enough credit
Code Block
{
    "code": 409,
    "error": "verificationnot_codeenough_requiredcredit",
    "error_description": "verification_code_required"
}
409 - Incorrect Transaction type
Code Block
{
    "code": 409,
    "error": "invalid_transaction_type",
    "error_description": "invalid_transaction_type"
}

...

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": 404409,
    "error": "not_foundlimit_payment_amount_24",
    "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

...

Endpoints: Merchants

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

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

Or

Code Block
https://posapi-training.flexiti.fi/flexiti/pos-api/v2/client-id/{client-id}/information&lang=en&message=qcpa_disclosure

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

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

message


  • ASCII string

  • Specific values can be used to filter the response

  • Not passing a value will response with all messages.


Validations:

Parameter

Case

Error Type

Example Value:

Success Response:

200 - Success - All
Code Block

  [{"qcpa_disclosure":"......."},{"key_2":".."},{"key_3":"....."}]
  
200 - Success - Specific Message filtered
Code Block
[{"qcpa_disclosure":"......."}]