UMS IFrame
- Request an authorization token via UMS IFrame Authentication method.
- Add the provided script reference to your application HTML page (parent page in the external system).
- Add Underwriting amaryllis-application custom element container (with required parameters) to your application HTML page (parent page in the external system).
- Add async
submit()method to your application HTML page (parent page in the external system), a specific responses will be received – see attached implementation example.
Component Properties
| Name | Required | Description |
| template | ✓ | Id of the application template to display specific underwriting application form in the external system. |
| provider | ✓ | Id of the Service Provider that is related to application template in the configuration. |
| name | ✓ | Generated or pre-defined name of the Underwriting Application form. |
| ✓ | Merchant contact email. | |
| token | ✓ | Token that is taken via get authentication token method. |
| configuration | optional | Pre-filled form information. |
Component properties rendering logic
| Name | Required | Description |
| name | ✓ | Name of the field. |
| value | optional | Value of the field. |
| isHidden | optional | The flag defines whether the field is hidden or not. |
- Single fields (one parameter in Template = one field in Application) can be hidden, if set “isHidden”:true
- Group fields (one parameter in Template = a few fields in Application, named as block of parameters in the description) can be hidden, if set block name “isHidden”:true.
- List of group fields:
- businessDetails.businessAddress
- businessDetails.corporateAddress
- bankingDetails.bankAccount
- contactDetails.address
- businessProfile.gstExempt
- businessProfile.shippingRequired
- businessProfile.pciCompliance
- businessFinancials.volumeProjection
- businessFinancials.annualVolumeProjection
- businessFinancials.monthlyVolumeProjection
- businessProcessingHistory.volumeHistory
- businessProcessingHistory.monthlyVolumeHistory
- businessProcessingHistory.annualVolumeHistory
- List of group fields:
There are two types of pre-filled information representation:
- Hidden fields: hidden in the UMS custom element. Fields contain pre-filled data that cannot be overridden and are represented by the following parameters
nameisHidden flag="true"- pre-populated
valueis saved after submit action from the external system
- Visible fields with pre-filled data: displayed in the UMS custom element and contain pre-filled data that can be overridden. Fields are represented by the following parameters
nameisHidden flag="false"- pre-populated
valueOR the user input is saved after submit action from the external system
Available Fields
As each application is based on a specific Template (see list of Component Properties earlier in this section), application fields depend on the related fields in the Template.
- In case fields are marked as visible, then they are not required;
- In case fields are marked as required, then they are required and fields values must be populated in the form at the moment when the
submit()method is called - Enumeration field type value is defined via
enumnumber according to Validation rules – see below
Available Fields Validation Rules
| Name | Type | Description | ||||||||||||||||||||||
| businessDetails.name | string | Max length = 255 symbols. | ||||||||||||||||||||||
| businessDetails.legalname | string | Max length = 255 symbols. | ||||||||||||||||||||||
| businessDetails.registrationNumber | string | Max length = 255 symbols. | ||||||||||||||||||||||
| businessDetails.ownershipType | enum | Available Values:
| ||||||||||||||||||||||
| businessDetails.taxId | string | Length must be equal to 9 digits. | ||||||||||||||||||||||
| businessDetails.giin | string | Max length = 19 symbols 1st and 2nd parts – Numbers and uppercase letters only 3rd part – Uppercase letters only 4th part – Numbers only | ||||||||||||||||||||||
| businessDetails.incorporationDate | datetime | Date format: US pattern mm/dd/yyyy | ||||||||||||||||||||||
| businessDetails.businessAddress | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessDetails.businessAddress.country | string | Country from the list of available values | ||||||||||||||||||||||
| businessDetails.businessAddress.stateCode | string | Max length = 3 symbols States from the list of available values for country = “US” or “CA”or “Australia”: | ||||||||||||||||||||||
| businessDetails.businessAddress.city | string | Max length = 50 symbols | ||||||||||||||||||||||
| businessDetails.businessAddress.street | string | Max length = 38 symbols | ||||||||||||||||||||||
| businessDetails.businessAddress.apartment | string | Max length = 38 symbols | ||||||||||||||||||||||
| businessDetails.corporateAddress.zip | string | If businessDetails.businessAddress.country = “US”, max length = 5 or 9 symbols max length = 15 symbols | ||||||||||||||||||||||
| businessDetails.companyWebsiteUrl | string | Web address URL address should be started with http(s):// | ||||||||||||||||||||||
| businessDetails.dbaName | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessDetails.dbaWebsiteUrl | string | Web address URL address should be started with http(s):// | ||||||||||||||||||||||
| businessDetails.dynamicDescriptor | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessDetails.description | string | Max length = 4000 symbols | ||||||||||||||||||||||
| businessDetails.customerServicePhone | string | Max length = 50 symbols Regular expression: /^([+ ]+)?(\d[\d- ]+)?(([\d- ]+))?[\d- ]+\d$/ | ||||||||||||||||||||||
| businessDetails.customerServiceEmail | string | Email Regular expression: /^(?=[a-zA-Z0-9])[a-zA-Z0-9.!#$%&’+/=?^_`{|}~-]a-zA-Z0-9@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]{2,})$/ | ||||||||||||||||||||||
| businessDetails.fax | string | Max length = 50 symbols Regular expression: /^([+ ]+)?(\d[\d- ]+)?(([\d- ]+))?[\d- ]+\d$/ | ||||||||||||||||||||||
| businessDetails.agreement | boolean | Available Values:
| ||||||||||||||||||||||
| businessDetails.customField1 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessDetails.customField2 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessDetails.customField3 | string | Max length = 255 symbols | ||||||||||||||||||||||
| bankingDetails.bankAccount | block of parameters | See examples for additional reference If there is external bank validation (‘External Bank Validation’ = ‘PLAID’ in Template), | ||||||||||||||||||||||
| bankingDetails.bankAccount.accountNumber | string | Value restrictions: digits; min.length=3 max.length=17 | ||||||||||||||||||||||
| bankingDetails.bankAccount.accountType | enum | Available Values:
| ||||||||||||||||||||||
| bankingDetails.bankAccount.ccountHolderName | string | length= 120 | ||||||||||||||||||||||
| bankingDetails.bankAccount.entityType | enum | Available Values: personal – 0 business – 1 | ||||||||||||||||||||||
| bankingDetails.bankAccount.routingNumber | string | digits; length = 9 | ||||||||||||||||||||||
| bankingDetails.bankAccount.bankName | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProfile.industry | enum | String with IndustryType enumeration value. Available Values:
| ||||||||||||||||||||||
| businessProfile.category | enum | String with the CategoryType enumeration value. Available Values:
| ||||||||||||||||||||||
| businessProfile.privacyPolicyUrl | string | Web address URL address should be started with http(s):// | ||||||||||||||||||||||
| businessProfile.returnsPolicyUrl | string | Web address URL address should be started with http(s):// | ||||||||||||||||||||||
| businessProfile.tcPolicyUrl | string | Web address URL address should be started with http(s):// | ||||||||||||||||||||||
| businessProfile.gstExempt | boolean | Available Values:
| ||||||||||||||||||||||
| businessProfile.gstNumber | string | In case businessProfile.gstExempt = true, then businessProfile.gstNumber is required businessProfile.gstExempt = false, then businessProfile.gstNumber should be empty. | ||||||||||||||||||||||
| businessProfile.descriptionOfGoods | string | Max length = 4000 symbols | ||||||||||||||||||||||
| businessProfile.seasonalBusiness | boolean | Available Values:
| ||||||||||||||||||||||
| businessProfile.shippingRequired | boolean | If businessProfile.shipping.shippingRequired = false, then following values should be empty: businessProfile.shipping.inventory businessProfile.shipping.deliveryTimePercentage.oneToSevenDays businessProfile.shipping.deliveryTimePercentage.eightToFourteenDays businessProfile.shipping.deliveryTimePercentage.fifteenToThirtyDays businessProfile.shipping.deliveryTimePercentage.moreThanThirtyDays Available Values:
| ||||||||||||||||||||||
| businessProfile.inventory | boolean | Available Values:
| ||||||||||||||||||||||
| businessProfile.deliveryTimePercentage.oneToSevenDays | integer | 0 >= Value <= 100 In case businessProfile.shipping.shippingRequired = true parameter is required businessProfile.shipping.shippingRequired = false parameter is not required | ||||||||||||||||||||||
| businessProfile.deliveryTimePercentage.eightToFourTeenDays | integer | 0 >= Value <= 100 In case businessProfile.shipping.shippingRequired = true parameter is required businessProfile.shipping.shippingRequired = false parameter is not required | ||||||||||||||||||||||
| businessProfile.deliveryTimePercentage.fifteenToThirtyDays | integer | 0 >= Value <= 100 In case businessProfile.shipping.shippingRequired = true parameter is required businessProfile.shipping.shippingRequired = false parameter is not required | ||||||||||||||||||||||
| businessProfile.deliveryTimePercentage.moreThanThirtyDays | integer | 0 >= Value <= 100 In case businessProfile.shipping.shippingRequired = true parameter is required businessProfile.shipping.shippingRequired = false parameter is not required | ||||||||||||||||||||||
| businessProfile.pciCompliance | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessProfile.pciCompliance.pciLevel | enum | In case businessProfile.pciCompliance.isEnabled = true parameter is required businessProfile.pciCompliance.isEnabled = false parameter is not required Available Values:
| ||||||||||||||||||||||
businessProfile.pciCompliance. storesSensitiveData | boolean | In case businessProfile.pciCompliance.isEnabled = true parameter is required businessProfile.pciCompliance.isEnabled = false parameter is not required Available Values:
| ||||||||||||||||||||||
businessProfile.pciCompliance. dataCompromised | boolean | In case businessProfile.pciCompliance.isEnabled = true parameter is required businessProfile.pciCompliance.isEnabled = false parameter is not required Available Values:
| ||||||||||||||||||||||
| businessProfile.customField1 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProfile.customField2 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProfile.customField3 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProfile.mccCode | string, Max 255 | MCC code. | ||||||||||||||||||||||
| businessProfile.merchantBillingType | enum | Merchant Billing Type details. Available Values:
| ||||||||||||||||||||||
| businessProfile.merchantPricingModel | enum | Merchant Pricing Model details. Available Values:
| ||||||||||||||||||||||
| businessFinancials.volumeProjection | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessFinancials.volumeProjection.visa | string | Max length = 255 symbols In case parameter “Volume Projection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.volumeProjection.mastercard | string | Max length = 255 symbols In case parameter “Volume Projection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.volumeProjection.americanExpress | string | Max length = 255 symbols In case parameter “Volume Projection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.volumeProjection.discover | string | Max length = 255 symbols In case parameter “Volume Projection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.volumeProjection.localDebitCard | string | Max length = 255 symbols In case parameter “Volume Projection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.annualVolumeProjection | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessFinancials.annualVolumeProjection.visa | string | Max length = 255 symbols In case parameter “annualVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.annualVolumeProjection.mastercard | string | Max length = 255 symbols In case parameter “annualVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.annualVolumeProjection.americanExpress | string | Max length = 255 symbols In case parameter “annualVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.annualVolumeProjection.discover | string | Max length = 255 symbols In case parameter “annualVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.annualVolumeProjection.localDebitCard | string | Max length = 255 symbols In case parameter “annualVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.monthlyVolumeProjection | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessFinancials.monthlyVolumeProjection.visa | string | Max length = 255 symbols In case parameter “monthlyVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.monthlyVolumeProjection.mastercard | string | Max length = 255 symbols In case parameter “monthlyVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.monthlyVolumeProjection.americanExpress | string | Max length = 255 symbols In case parameter “monthlyVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.monthlyVolumeProjection.discover | string | Max length = 255 symbols In case parameter “monthlyVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.monthlyVolumeProjection.localDebitCard | string | Max length = 255 symbols In case parameter “monthlyVolumeProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.avgTicketPriceProjection | string | Max length = 255 symbols In case parameter “Volume Projection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.highestTicketPriceProjection | string | Max length = 255 symbols In case parameter “highestTicketPriceProjection” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.isAnnualAmexVolumeExceedMillionDollars | string | Max length = 255 symbols In case parameter “isAnnualAmexVolumeExceedMillionDollars” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessFinancials.customField1 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessFinancials.customField2 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessFinancials.customField3 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProcessingHistory.volumeHistory | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessProcessingHistory.volumeHistory.visa | string | Max length = 255 symbols In case parameter “Volume History” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.volumeHistory.mastercard | string | Max length = 255 symbols In case parameter “Volume History” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.volumeHistory.americanExpress | string | Max length = 255 symbols In case parameter “Volume History” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.volumeHistorydiscover | string | Max length = 255 symbols In case parameter “Volume History” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.volumeHistorylocalDebitCard | string | Max length = 255 symbols In case parameter “Volume History” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.monthlyVolumeHistory | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessProcessingHistory.monthlyVolumeHistory.visa | string | Max length = 255 symbols In case parameter “monthlyVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.monthlyVolumeHistory.mastercard | string | Max length = 255 symbols In case parameter “monthlyVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.monthlyVolumeHistory.americanExpress | string | Max length = 255 symbols In case parameter “monthlyVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.monthlyVolumeHistory.discover | string | Max length = 255 symbols In case parameter “monthlyVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.monthlyVolumeHistory.localDebitCard | string | Max length = 255 symbols In case parameter “monthlyVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.annualVolumeHistory | block of parameters | See examples for additional reference | ||||||||||||||||||||||
| businessProcessingHistory.annualVolumeHistory.visa | string | Max length = 255 symbols In case parameter “annualVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.annualVolumeHistory.mastercard | string | Max length = 255 symbols In case parameter “annualVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.annualVolumeHistory.americanExpress | string | Max length = 255 symbols In case parameter “annualVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.annualVolumeHistory.discover | string | Max length = 255 symbols In case parameter “annualVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.annualVolumeHistory.localDebitCard | string | Max length = 255 symbols In case parameter “annualVolumeHistory” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.avgTicketPriceHistory | string | Max length = 255 symbols In case parameter “Volume History” = ‘Required’ under Underwriting Template the parameter is required | ||||||||||||||||||||||
| businessProcessingHistory.previousBankruptcy | boolean | Available Values:
| ||||||||||||||||||||||
| businessProcessingHistory.previousPersonalBankruptcy | boolean | Available Values:
| ||||||||||||||||||||||
| businessProcessingHistory.highestTicketPriceHistory | string, Max 255 | |||||||||||||||||||||||
| businessProcessingHistory.customField1 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProcessingHistory.customField2 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProcessingHistory.customField3 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProcessingHistory.customField3 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProcessingHistory.customField3 | string | Max length = 255 symbols | ||||||||||||||||||||||
| businessProcessingHistory.customField3 | string | Max length = 255 symbols |
//1. Request an authorization token via UMS IFrame Authentication method.
//See UMS IFrame Authentication section
//2. Add script reference to your application HTML page
//sandbox environment
<script src= "https://sandbox.4levers.com/underwritingiframe/amaryllis-application.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js"></script>
//production environment
<script src= "https://underwriting.4levers.com/amaryllis-application.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js"></script>
//3. Add Underwriting amaryllis-application custom element container.
<div id="container">
<amaryllis-application-create
template="application template id"
provider="Service Provider Id"
name="underwriting application form name"
email="merchant contact email"
configuration='[{"parameterName":"text","value":"text","isHidden":"true"}]'
token="Token that is taken via Get Authentication Token method">
</amaryllis-application-create>
</div>
//4. submit() method example
<script type="application/javascript">
async function submitApplication(){
try {
var applicationElement = document.querySelector('amaryllis-application-create');
var appId = await applicationElement.submit();
document.body.removeChild(document.getElementById('container'));
alert("Your application ID is: " + appId);
} catch (e) {
alert("Please complete all the steps and required fields");
}
}
</script>
//Iframe example
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js"></script>
<script src="https://sandbox.4levers.com/underwritingiframe/amaryllis-application.js"></script>
<script type="application/javascript">
async function submitApplication(){
try {
var applicationElement = document.querySelector('amaryllis-application-create');
var appId = await applicationElement.submit();
document.body.removeChild(document.getElementById('container'));
alert("Your application ID is: " + appId);
} catch (e) {
alert("Please complete all the steps and required fields");
}
}
</script>
</head>
<body>
<div id="container">
<amaryllis-application-create
template="application template id"
provider="Service Provider Id"
name="underwriting application form name"
email="merchant contact email"
configuration='[{"parameterName":"text","value":"text","isHidden":"true"}]'
token = "Token that is taken via Get Authentication Token method"
>
</amaryllis-application-create>
</div>
<div>
<button onclick="submitApplication()">Submit</button>
</div>
</body>
</html>