On This Page
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. |
Example
Basic Setup
<script src="[INSERT clientLibrary VALUE HERE]" integrity=”[INSERT clientLibraryIntegrity VALUE HERE]” crossorigin=”anonymous”> </script>//Note: Script location and integrity value should be sourced from the capture context response clientLibrary and clientLibraryIntegrity values. <script> const flex = new Flex('captureContext');</script>
Methods
microform(optionsopt) > {Microform}
This method is the main setup function used to initialize
Microform Integration
. Upon
successful setup, the callback receives a microform
, which is used to
interact with the service and build your integration. For details, see Class: Microform.Name | Type | Description |
---|---|---|
options | Object |
Name | Type | Attributes | Description |
---|---|---|---|
styles | Object | <optional> | Apply custom styling to all the fields in
your integration. |
Returns:
Type: Microform
Examples
Minimal Setup
const flex = new Flex('header.payload.signature'); const microform = flex.microform();
Custom Styling
const flex = new Flex('header.payload.signature'); const microform = flex.microform({ styles: { input: { color: '#212529', 'font-size': '20px' } } });