Authentication Endpoints
POST /oauth/token
https://onlineapi.flexiti.fi/flexiti/online-api/oauth/token
This service Authenticates the developer user and provides a Bearer Token that needs to be used as part of every future request.
The refresh token is used to get a new access token when the current one is about to expire. It cannot be refreshed after it is expired
To use it add the refresh token (provided in the original /oauth/token call) and change the grant_type to refresh_token.
Request Parameters:
Type | Parameter | Required | Details |
Body | grant_type | Yes |
|
Body | client_id
| Yes |
|
Body | client_secret
| Yes |
|
Body | username | No |
|
Body | password | No |
|
Header | Authorization
| No |
|
Response Parameters:
Type | Parameter | Details |
String | access_token
|
|
String | token_type
|
|
Integer | expires_in
|
|
| refresh_token
|
|
| scope
|
|
Example Response:
{
"access_token": "e1f7258ee83a9b9ab0df88c72da5d12e5bcb190d",
"token_type": "Bearer",
"expires_in": 1199,
"refresh_token": "3a9c2cc9098c172fd757e903e2e34b8e137c29e6",
"scope": "merchant"
}
Integration Endpoints
POST /online/v2/client-id/{clientId}/systems/init[SS1]
https://onlineapi.flexiti.fi/flexiti/online-api/online/v2/client-id/{clientId}/systems/init
This endpoint will return the Flexiti payment gateway, allowing customers to checkout
Request Parameters:
Type | Parameter | Required | Details |
Header | Authorization | Yes |
|
Path | clientId | Yes |
|
Body | merchant_orderid |
| string |
| is_guest |
| True, False |
| customer_id |
| string |
| vcc | Yes for existing cardholders | 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 | No | string |
| city |
| string |
| province |
| ON, AB, QC, |
| postal_code |
| string |
| show_close_button |
| string |
| billing_information |
| "billing_information": { "first_name": "string", "last_name": "string", "address_1": "string", "address_2": "string", "city": "string", "postal_code": "string", "province": "string" |
| shipping_information" |
| "shipping_information": { "address_1": "string", "address_2": "string", "city": "string", "postal_code": "string", "province": "string" |
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
[SS2]Is this endpoint needed?