Table of Contents |
---|
Online API Endpoints
POST /oauth/token
Code Block |
---|
https://onlineapi.flexiti.fi/flexiti/online-api/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.
...
Code Block |
---|
{ "token_type": "bearer", "access_token": "2d8f373a3c2b1e61baf5a7769930ff4f0e08cdb0", "expires_in": 1200, "refresh_token": "36e0fc3d7415145f4b1d71512c459fd6eaa13aa8", "scope": "merchant" } |
POST /online/v2/client-id/{clientId}/systems/init
Code Block |
---|
https://onlineapi.flexiti.fi/flexiti/online-api/online/v2/client-id/{{client_id}}/systems/init |
This endpoint will return the Flexiti Online Flow as a Redirect URL, which can be hosted in a Modal (Preferred presentation method).
*NOTE: If you are integrating the APPLY-ONLY flow, please remove ‘/v2’ from the API URI, this will ensure that the flow opened immediately starts the application flow.
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 Flow if VCC is not provided |
|
BODY | vcc | Optional - Required for Buy Flow if customer_id is not provided |
|
BODY | has_previous_purchase | Optional |
|
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” |
|
...
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 |
...
Code Block |
---|
{ "htmlRender": "...", "paymentPlan": { "monthlyPayment": "166.33", "months": "3" } } |
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 |
...
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 |
...
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 |
...
Type | Parameter | Details |
BODY | enable_payment_gategateway |
|
...