Table of Contents |
---|
...
POS API Endpoint Overview
The Flexiti POS API Endpoints is divided into 5 categories:
...
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 |
|
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 |
|
PATH | client_id | Yes |
|
PATH | transaction_id | Yes |
|
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 |
|
PATH | client_id | Yes |
|
PATH | transaction_id | Yes |
|
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 |
|
PATH | client_id | Yes |
|
QUERY | message |
|
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":"......."}]
|