Online API Endpoints
POST /oauth/token
...
To use it add the refresh token (provided in the original /oauth/token call) and change the grant_type to refresh_token.
NOTE: The API request must be passed in the x-www-form-urlencoded format, or you will receive an error.
...
This endpoint will return the Flexiti Online Flow as a Redirect URL, which can be hosted in a Modal (Preferred presentation method).
Request Parameters:
Type | Parameter | Required | Details | ||||||||||||||||||
HEADER | authorization | Yes |
| ||||||||||||||||||
HEADER | x-reference-id | Yes |
| ||||||||||||||||||
PATH | client_id | Yes |
| ||||||||||||||||||
BODY | merchant_orderid | Optional |
| ||||||||||||||||||
BODY | is_guest | Optional |
| ||||||||||||||||||
BODY | customer_id | Optional - Required for Buy & Apply/Buy Flow if VCC is not provided |
| ||||||||||||||||||
BODY | vcc | Optional - Required for Buy & Apply/ Buy Flow if customer_id is not provided |
| ||||||||||||||||||
BODY | has_previous_purchase | Optional |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Success Response:
{
"online_order_id": 0,
"redirection_url": "string"
}
Failure Response:
{
"code": 0,
"error": "string",
"error_description": "string"
}
POST /online/client-id/{clientId}/systems/learn-more
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
Header
...
Authorization
...
...
...
Path
...
clientId
...
...
...
Body
...
merchant_orderid
...
...
string
...
...
is_guest
...
...
True, False
...
...
customer_id
...
...
string
...
...
vcc
...
...
string
...
...
has_previous_purchase
...
...
True, False
...
...
lang
...
...
En-CA, en-FR
...
...
flow
...
...
Apply, Buy
...
...
salutation
...
...
Mr, Mrs, Ms
...
...
amount_requested
...
...
string
...
...
...
...
string
...
...
phone_number
...
...
string
...
...
fname
...
...
string
...
...
mname
...
...
string
...
...
lname
...
...
string
...
...
dob
...
...
string
...
...
address_1
...
...
string
...
...
address_2
...
...
string
...
...
city
...
...
string
...
...
province
...
...
ON, AB, QC,
...
...
postal_code
...
...
string
...
...
show_close_button
...
...
string
GET /online/v2/client-id/{clientId}/systems/payment-calculator
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
Header
...
Authorization
...
Yes
...
...
Path
...
ClientId
...
Yes
...
string
...
Query
...
Price
...
Yes
...
...
Query
...
Customer ID
...
...
string
...
...
...
...
...
...
...
...
Success Response:
{
"htmlRender": "string",
"paymentPlan": {
"monthlyPayment": "string",
"months": "string"
}
}
Notification Endpoints
POST /online/client-id/{clientId}/notifications/test
Simulates an event triggered and will communicate to the callback url defined by the user the success or cancellation for a purchase.
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
Header
...
Authorization
...
...
string
...
Path
...
ClientId
...
...
String
...
Body
...
Event
...
...
Purchase, Apply
...
...
Notification_type
...
...
Success, Error, Cancelled
Success Response:
{
"event": 0,
"notificationType": "string",
"callback_url": "string",
"username": 0,
"client_id": "string",
"purchase": {
"customer_fname": "string",
"customer_lname": "string",
"customer_dob": "string",
"customer_postal_code": "string",
"customer_id": 0,
"purchase_status": "string",
"purchase_amount": "string",
"administrative_fee": "string",
"transaction_total_amount": 0,
"vcc": 0,
"plan_id": 0,
"term": 0,
"promo_id": 0,
"customer_comparison_result": {
"billing_information": {
"first_name": 0,
"last_name": 0,
"address_1": 0,
"address_2": 0,
"city": 0,
"postal_code": 0,
"province": 0
},
"shipping_information": {
"address_1": 0,
"address_2": 0,
"city": 0,
"postal_code": 0,
"province": 0
}
}
},
"apply": {
"customer_fname": "string",
"customer_lname": "string",
"customer_dob": "string",
"customer_postal_code": "string",
"apply_status": "string",
"customer_id": 0,
"vcc": 0
}
}
Retrieve Information
GET /online/client-id/{clientId}/notifications/order-id/{orderId}
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Example Request:
Response Parameters:
...
Type
...
Parameter
...
Details
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Example Response:[SS2]
GET /online/client-id/{clientId}/notifications/merchant-order-id/{MerchantOrderId}
Get Apply or Purchase information and status for a given order Using Merchant order ID.
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
Header
...
Authorization
...
Yes
...
String
...
Path
...
ClientId
...
Yes
...
string
...
Path
...
merchantOrderId
...
Yes
...
Integer
Success Response:
{
"event": 0,
"notificationType": "string",
"callback_url": "string",
"username": 0,
"client_id": "string",
"purchase": {
"customer_fname": "string",
"customer_lname": "string",
"customer_dob": "string",
"customer_postal_code": "string",
"customer_id": 0,
"purchase_status": "string",
"purchase_amount": "string",
"administrative_fee": "string",
"transaction_total_amount": 0,
"vcc": 0,
"plan_id": 0,
"term": 0,
"promo_id": 0,
"customer_comparison_result": {
"billing_information": {
"first_name": 0,
"last_name": 0,
"address_1": 0,
"address_2": 0,
"city": 0,
"postal_code": 0,
"province": 0
},
"shipping_information": {
"address_1": 0,
"address_2": 0,
"city": 0,
"postal_code": 0,
"province": 0
}
}
},
"apply": {
"customer_fname": "string",
"customer_lname": "string",
"customer_dob": "string",
"customer_postal_code": "string",
"apply_status": "string",
"customer_id": 0,
"vcc": 0
}
}
default
Error
Example Value
Model
GET /online/client-id/{clientId}/notifications/promo-id/{promoId}
This endpoint allows you to get Apply or Purchase information and status for a given order Using Flexiti promo ID.
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
Header
...
Authorization
...
...
...
Path
...
ClientId
...
...
...
Path
...
PromoId
...
...
Success Response:
{
"fname": "string",
"lname": "string",
"transaction_total_amount": 0,
"purchase_amount": "string",
"plan_id": "string",
"term": 0,
"promo_id": "string",
"administrative_fee": 0,
"customer_comparison_result": {
"billing_information": {
"first_name": 0,
"last_name": 0,
"address_1": 0,
"address_2": 0,
"city": 0,
"postal_code": 0,
"province": 0
},
"shipping_information": {
"address_1": 0,
"address_2": 0,
"city": 0,
"postal_code": 0,
"province": 0
}
}
}
POST /online/client-id/{clientId}/merchants/payment-availability
This endpoint is for comparing the price to return if the payment gateway can be shown.
Request Parameters:
...
Type
...
Parameter
...
Required
...
Details
...
Header
...
Authorization
...
Yes
...
...
Path
...
clientId
...
Yes
...
...
Body
...
amount_requested
...
Yes
...
Example Request:
Success Response:
{
"enable_payment_gateway": true
}
Failure Response
{
"code": 0,
"error": "string",
"error_description": "string"
}
[SS1]Determine which body parameters needed for apply and for buy
...
| |||
BODY | lang | Yes |
|
BODY | flow | Yes |
|
BODY | amount_requested | Yes |
|
BODY | salutation | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
| |
BODY | phone_number | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | fname | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | mname | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | lname | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | dob | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | address_1 | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | address_2 | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | city | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | province | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | postal_code | Optional - Helps pre-populate application form during “Apply” and “Apply/Buy” flow if information is available |
|
BODY | billing_information.first_name | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | billing_information.last_name | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | billing_information.address_1 | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | billing_information.address_2 | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | billing_information.city | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | billing_information.province | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | billing_information.postal_code | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.first_name | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.last_name | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.address_1 | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.address_2 | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.city | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.province | Yes if Flow is “Buy” or “Apply/Buy” |
|
BODY | shipping_information.postal_code | Yes if Flow is “Buy” or “Apply/Buy” |
|
Example Request - Flow = “apply”:
Code Block |
---|
{
"lang":"en-CA",
"flow":"apply",
"salutation":"mr",
"amount_requested":3000.00,
"email":"test@flexiti.com",
"phone_number":"6476161234",
"fname":"Tommy",
"mname":"",
"lname":"Samson",
"dob":"06/01/1981",
"address_1":"123 Any Street",
"address_2":"",
"city":"Toronto",
"province":"ON",
"postal_code":"M2A2A2"
} |
Example Request - Flow = “buy”:
Code Block |
---|
{
"lang":"en-CA",
"flow":"buy",
"amount_requested":1.00,
"vcc":"2374980012897093",
"shipping_information":{
"first_name":"Tom",
"last_name":"Samson",
"address_1":"123 Any Street",
"address_2":"",
"city":"Toronto",
"postal_code":"M2A2A2",
"province":"ON"
},
"billing_information":{
"first_name":"Tom",
"last_name":"Samson",
"address_1":"123 Any Street",
"address_2":"",
"city":"Toronto",
"postal_code":"M2A2A2",
"province":"ON"
}
} |
Example Request - Flow = “apply/buy”:
Code Block |
---|
{
"lang":"en-CA",
"flow":"apply/buy",
"amount_requested":2.00,
"salutation":"mr",
"email":"test@flexiti.com",
"phone_number":"6476161234",
"fname":"Tommy",
"mname":"",
"lname":"Samson",
"dob":"06/01/1981",
"address_1":"123 Any Street",
"address_2":"",
"city":"Toronto",
"province":"ON",
"postal_code":"M2A2A2",
"shipping_information":{
"first_name":"Tom",
"last_name":"Samson",
"address_1":"123 Any Street",
"address_2":"",
"city":"Toronto",
"postal_code":"M2A2A2",
"province":"ON"
},
"billing_information":{
"first_name":"Tom",
"last_name":"Samson",
"address_1":"123 Any Street",
"address_2":"",
"city":"Toronto",
"postal_code":"M2A2A2",
"province":"ON"
}
} |
Response Parameters:
Type | Parameter | Details |
BODY | online_order_id |
|
BODY | redirection_url |
|
Success Response:
Code Block |
---|
{
"online_order_id": 131209,
"redirection_url": "..."
} |
GET /online/v2/client-id/{clientId}/systems/payment-calculator
Code Block |
---|
https://onlineapi.flexiti.fi/flexiti/online-api/online/v2/client-id/{{client_id}}/systems/payment-calculator?clientId=flexitidemo&price=499&lang=fr |
Request Parameters:
Type | Parameter | Required | Details |
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
PATH | client_id | Yes |
|
QUERY | price | Yes |
|
QUERY | lang | Yes |
|
Sample Request:
...
Response Parameters:
Type | Parameter | Details |
BODY | htmlRender |
|
BODY | paymentPlan.monthlyPayment |
|
BODY | paymentPlan.months |
|
Success Response:
Code Block |
---|
{
"htmlRender": "...",
"paymentPlan": {
"monthlyPayment": "166.33",
"months": "3"
}
} |
Notification Endpoints - Getting information about Transactions
GET /online/client-id/{clientId}/notifications/order-id/{orderId}
Code Block | ||
---|---|---|
| ||
https://onlineapi.flexiti.fi/flexiti/online-api/online/client-id/{{client_id}}/notifications/order-id/:orderId |
Request Parameters:
Type | Parameter | Required | Details |
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
PATH | client_id | Yes |
|
PATH | orderId | Yes |
|
Example Request:
...
Response Parameters:
Type | Parameter | Details |
BODY | transaction_id |
|
BODY | flow |
|
BODY | callback_url |
|
BODY | date |
|
BODY | purchase.status |
|
BODY | purchase.administrative_fee |
|
BODY | purchase.promo_id |
|
BODY | purchase.term |
|
BODY | purchase.plan_id |
|
BODY | purchase.purchase_amount |
|
BODY | purchase.transaction_total_amount |
|
BODY | purchase.customer_id |
|
BODY | purchase.customer_comparison_result.shipping_information.province |
|
BODY | purchase.customer_comparison_result.shipping_information.postal_code |
|
BODY | purchase.customer_comparison_result.shipping_information.city |
|
BODY | purchase.customer_comparison_result.shipping_information.address_2 |
|
BODY | purchase.customer_comparison_result.shipping_information.address_1 |
|
BODY | purchase.customer_comparison_result.shipping_information.dob |
|
BODY | purchase.customer_comparison_result.shipping_information.last_name |
|
BODY | purchase.customer_comparison_result.shipping_information.first_name |
|
BODY | purchase.customer_comparison_result.billing_information.province |
|
BODY | purchase.customer_comparison_result.billing_information.postal_code |
|
BODY | purchase.customer_comparison_result.billing_information.city |
|
BODY | purchase.customer_comparison_result.billing_information.address_2 |
|
BODY | purchase.customer_comparison_result.billing_information.address_1 |
|
BODY | purchase.customer_comparison_result.billing_information.dob |
|
BODY | purchase.customer_comparison_result.billing_information.last_name |
|
BODY | purchase.customer_comparison_result.billing_information.first_name |
|
BODY | apply.customer_id |
|
BODY | apply_status |
|
Example Response: Buy Flow
Code Block |
---|
{
"transaction_id": 131221,
"flow": "buy",
"callback_url": "",
"purchase": {
"purchase_status": "SUCCESS",
"customer_comparison_result": {
"shipping_information": {
"province": 1,
"postal_code": 0.4,
"city": 1,
"address_2": null,
"address_1": 1,
"dob": null,
"last_name": 0.3333333333333333,
"first_name": 0
},
"billing_information": {
"province": 1,
"postal_code": 0.4,
"city": 1,
"address_2": null,
"address_1": 1,
"dob": null,
"last_name": 0.3333333333333333,
"first_name": 0
}
},
"administrative_fee": "0.00",
"promo_id": "382712",
"term": 3,
"plan_id": "4",
"purchase_amount": 2,
"transaction_total_amount": 2,
"customer_id": "1293835",
},
"date": "2022-06-13T22:20:01.552Z""
} |
Example Response: Apply Flow
Code Block |
---|
{
"transaction_id": 131222,
"flow": "apply",
"callback_url": "",
"apply": {
"customer_id": 1293836,
"apply_status": "SUCCESS",
},
"date": "2022-06-13T22:29:20.276Z""
} |
GET /online/client-id/{clientId}/notifications/merchant-order-id/{merchantOrderId}
Code Block | ||
---|---|---|
| ||
https://onlineapi.flexiti.fi/flexiti/online-api/online/client-id/{{client_id}}/notifications/merchant-order-id/:merchantOrderId |
Request Parameters:
Type | Parameter | Required | Details |
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
PATH | client_id | Yes |
|
PATH | merchantOrderId | Yes |
|
Example Request:
...
Response Parameters:
Type | Parameter | Details |
BODY | transaction_id |
|
BODY | flow |
|
BODY | callback_url |
|
BODY | date |
|
BODY | purchase.status |
|
BODY | purchase.administrative_fee |
|
BODY | purchase.promo_id |
|
BODY | purchase.term |
|
BODY | purchase.plan_id |
|
BODY | purchase.purchase_amount |
|
BODY | purchase.transaction_total_amount |
|
BODY | purchase.customer_id |
|
BODY | purchase.customer_comparison_result.shipping_information.province |
|
BODY | purchase.customer_comparison_result.shipping_information.postal_code |
|
BODY | purchase.customer_comparison_result.shipping_information.city |
|
BODY | purchase.customer_comparison_result.shipping_information.address_2 |
|
BODY | purchase.customer_comparison_result.shipping_information.address_1 |
|
BODY | purchase.customer_comparison_result.shipping_information.dob |
|
BODY | purchase.customer_comparison_result.shipping_information.last_name |
|
BODY | purchase.customer_comparison_result.shipping_information.first_name |
|
BODY | purchase.customer_comparison_result.billing_information.province |
|
BODY | purchase.customer_comparison_result.billing_information.postal_code |
|
BODY | purchase.customer_comparison_result.billing_information.city |
|
BODY | purchase.customer_comparison_result.billing_information.address_2 |
|
BODY | purchase.customer_comparison_result.billing_information.address_1 |
|
BODY | purchase.customer_comparison_result.billing_information.dob |
|
BODY | purchase.customer_comparison_result.billing_information.last_name |
|
BODY | purchase.customer_comparison_result.billing_information.first_name |
|
BODY | apply.customer_id |
|
BODY | apply_status |
|
Example Response: Buy Flow
Code Block |
---|
{
"transaction_id": 131221,
"flow": "buy",
"callback_url": "",
"purchase": {
"purchase_status": "SUCCESS",
"customer_comparison_result": {
"shipping_information": {
"province": 1,
"postal_code": 0.4,
"city": 1,
"address_2": null,
"address_1": 1,
"dob": null,
"last_name": 0.3333333333333333,
"first_name": 0
},
"billing_information": {
"province": 1,
"postal_code": 0.4,
"city": 1,
"address_2": null,
"address_1": 1,
"dob": null,
"last_name": 0.3333333333333333,
"first_name": 0
}
},
"administrative_fee": "0.00",
"promo_id": "382712",
"term": 3,
"plan_id": "4",
"purchase_amount": 2,
"transaction_total_amount": 2,
"customer_id": "1293835",
},
"date": "2022-06-13T22:20:01.552Z""
} |
Example Response: Apply Flow
Code Block |
---|
{
"transaction_id": 131222,
"flow": "apply",
"callback_url": "",
"apply": {
"customer_id": 1293836,
"apply_status": "SUCCESS",
},
"date": "2022-06-13T22:29:20.276Z""
} |
POST /online/client-id/{clientId}/merchants/payment-availability
Code Block |
---|
https://onlineapi.flexiti.fi/flexiti/online-api/online/client-id/{{client_id}}/merchants/payment-availability |
This endpoint compares the checkout total against the available merchant plan ranges to determine if Flexiti should be enabled as a checkout option.
Request Parameters:
Type | Parameter | Required | Details |
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
PATH | client_id | Yes |
|
BODY | amount_requested | Yes |
|
Example Request:
Code Block |
---|
{
"amount_requested": 400
} |
Response Parameters:
Type | Parameter | Details |
BODY | enable_payment_gate |
|
Success Response:
Code Block |
---|
{
"enable_payment_gateway": true
} |