Module: FLEX {#module-flex-v2_module_flex_v044}
===============================================

**Flex(captureContext)**  
`new Flex(captureContext)`  
For detailed setup instructions, see [Getting Started](/docs/cybs/en-us/digital-accept-flex/developer/all/rest/digital-accept-flex/microform-integ-v2/microform-integ-getting-started-v2.md "").  
**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*

```
&lt;script src="[INSERT clientLibrary VALUE HERE]" integrity=”[INSERT clientLibraryIntegrity VALUE HERE]” crossorigin=”anonymous”&gt;
&lt;/script&gt;//Note: Script location and integrity value should be sourced from the capture context response clientLibrary and clientLibraryIntegrity values.
&lt;script&gt; const flex = new Flex('captureContext');&lt;/script&gt;
```

Methods {#module-flex-v2_id1949GM0705Z}
---------------------------------------

`microform(optionsopt) &gt; {Microform}`{#module-flex-v2_staticmicroformoptionscallbackvoid}  
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](/docs/cybs/en-us/digital-accept-flex/developer/all/rest/digital-accept-flex/microform-integ-v2/micro-v2-reference/api-reference-v2/class-microform-v2.md "").

| Name    | Type   | Description |
|:--------|:-------|:------------|
| options | Object |             |
[**Parameter**]

| Name   | Type   | Attributes         | Description                                                 |
|:-------|:-------|:-------------------|:------------------------------------------------------------|
| styles | Object | \&lt;optional\&gt; | Apply custom styling to all the fields in your integration. |
[**Property**]

***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'
		}
	}
});
```

