Developer Guide Menu

Module: FLEX

Flex(captureContext)
new Flex(captureContext)
For detailed setup instructions, see  Getting Started .
Parameters:
Name
Type
Description
captureContext
String
JWT string that you requested via a server-side authenticated call before starting the checkout flow. See  Getting Started  for further information.
Example
Basic Setup
             
script src="https://flex.cybersource.com/cybersource/assets/microform/0.11/flex-microform.min.js">

Methods

microform(optionsopt) > {Microform}
This method is the main setup function used to initialize Flex Microform. Upon successful setup, the callback receives a 
microform
 (see  Class: Microform ), which is used to interact with the service and build your integration.

Table:

Parameter
Name
Type
Description
options
Object

Table:

Property
Name
Type
Attributes
Description
styles
Object
Apply custom styling to all the fields in your integration.
Returns:
Type: Microform
Examples
Minimal Setup
             
var flex = new Flex('header.payload.signature'); var microform = flex.microform();
Custom Styling
             
var flex = new Flex('header.payload.signature'); var microform = flex.microform({ styles: { input: { color: '#212529', 'font-size': '20px' } } });
Top