Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

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

  • ASCII string (40)

  • 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}

HEADER

x-reference-id

Yes

  • ASCII string (32)

  • GUID

  • Unique identifier for the flow for traceability purposes

PATH

client_id

Yes

  • ASCII string (100)

  • This is the Client ID given in the Developer User Account section

BODY

customer_identification.account_number

Yes if flow is “purchase” and vcc_number and personal_information is empty

  • number (14)

  • The Account Number of the Customer

  • This is not the FlexitiCard number (VCC) or the Customer ID

BODY

customer_identification.vcc_number

Yes if flow is “purchase” and account_number and personal_information is empty

  • ASCII string (16)

  • The FlexitiCard Number (VCC) of the Customer’s Account

BODY

customer_identification.personal_information.first_name

  • Yes if flow is “apply

  • Yes if flow is “purchase” and account_number and vcc_number is empty

  • ASCII string (80)

  • Customer First Name

BODY

customer_identification.personal_information.last_name

  • Yes if flow is “apply

  • Yes if flow is “purchase” and account_number and vcc_number is empty

  • ASCII string (130)

  • Customer Last Name

BODY

customer_identification.personal_information.dob

  • Yes if flow is “apply

  • Yes if flow is “purchase” and account_number and vcc_number is empty

  • ASCII string (10)

  • Format: YYYY-MM-DD

  • Customer Date of Birth

BODY

customer_identification.personal_information.postal_code

  • Yes if flow is “apply

  • Yes if flow is “purchase” and account_number and vcc_number is empty

  • ASCII string (10)

  • Customer Postal Code

BODY

lang

  • ASCII string

  • customer’s preferred language for localization of the widget

  • Available values: en, fr

  • Default value: en

BODY

tos_agreement

Yes if flow is “apply”

  • boolean

  • Acceptance of the Cardholder Agreement (must be true at the time of submission).

  • Default value: false

BODY

flow

Yes

  • Available values: apply, purchase

BODY

email

Yes if flow is “apply”

  • ASCII string (100)

  • Customer Email

  • This will be used for MFA

BODY

phone_number

Yes if flow is “apply”

  • number (10)

  • Customer Mobile Phone Number

  • This will be used for MFA via SMS

BODY

address_1

Yes if flow is “apply”

  • ASCII string (250)

  • Customer Address Line 1

BODY

address_2

 

  • ASCII string (100)

  • Customer Address Line 2

BODY

city

Yes if flow is “apply”

  • ASCII string (100)

  • Customer City

BODY

province

Yes if flow is “apply”

  • ASCII string (2)

  • Customer Province (2 character syntax, ex. ON for Ontario)

  • Available values: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT.

BODY

account_type

Yes if flow is “apply”

  • ASCII string (100)

  • This is the type of account the customer is applying for

  • Available values: business or consumer

  • Default value: consumer

Example Requests:

Apply Flow

{
    "customer_identification": {
        "personal_information": {
            "first_name": "John",
            "last_name": "Smith",
            "dob": "1988-07-24",
            "postal_code": "m1m1m1"
        }
    },
    "flow": "apply",
    "account_type": "consumer",
    "email": "john@email.com",
    "phone_number": 1231231234,
    "address_1": "Fake 445",
    "city": "Toronto",
    "province": "ON",
    "tos_agreement": true    
}

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}"
}

Access Token Notes:

In order to control the data flow Flexiti takes the access_token as a referential value for the entire flow. Usually there are several steps before and after reaching the widget :

  • Once you need to call to the first POS-API method you must call the oAuth POST /token first to get access

  • You will use this token from start to finish. To do so, ensure you use a refreshed token in order to have the necessary time to complete the flow once you reach the widget page.

  • Please refer to the Authorization Method and Refresh Token documentation for refreshing tokens.

  • No labels