Flexiti SDK Init Method
Before to use this method, an access_token is needed
Once the FlexitiSDK is instantiated you will be able to trigger the FlexitiSDK.init(params) method from any call to action element.
POST /client-id/{clientId}/widget/init
https://{posapi_url}/flexiti/pos-api/v2.5/client-id/{client_id}/widget/init
Using the /pos-api/v2.5/client-id/{clientId}/widget/init will render the redirection_url given by the previous init call.
Note: While testing apply flows in the Training or Merchant Integration environments you will not receive an SMS pin - just enter 2222 as the pin value in the widget. You will receive a dynamic pin for purchases however.
API Request Parameters:
Type | Parameter | Required | Details |
---|---|---|---|
HEADER | authorization | Yes |
|
HEADER | x-reference-id | Yes |
|
PATH | client_id | Yes |
|
BODY | customer_identification.account_number | Yes if flow is “purchase” and vcc_number and personal_information is empty |
|
BODY | customer_identification.vcc_number | Yes if flow is “purchase” and account_number and personal_information is empty |
|
BODY | customer_identification.personal_information.first_name |
|
|
BODY | customer_identification.personal_information.last_name |
|
|
BODY | customer_identification.personal_information.dob |
|
|
BODY | customer_identification.personal_information.postal_code |
|
|
BODY | lang |
|
|
BODY | flow | Yes |
|
Example Request for Buy Flow:
{
"customer_identification": {
"account_number": 20009100, //conditional mandatory
"vcc_number": "1070015210367982", //conditional mandatory
"personal_information": { //conditional mandatory
"first_name": "John",
"last_name": "Smith",
"dob": "1988-07-24",
"postal_code": "m1m1m1"
}
},
"flow": "purchase"
}
Conditional mandatory means you only need one in order to identify the customer.
Success Response:
{
"redirection_url": "{posapi_url}/#/widget/{client_id}/{token}?lang=en&x-reference-id={GUID}&widget_session_id={GUID}"
}