Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <h2 style="font-family: Arial; color: slategray">KYC Document Upload</h2>
</head>

<body>
  <select style="color: #4B4746" id="ddlContType">
    <option style="color: #4B4746">-- Select --</option>
    <option style="color: #4B4746" id="input1" value="affiliation">affiliation</option>
    <option style="color: #4B4746" id="input2" value="bankruptcy_trustee">bankruptcy_trustee</option>
    <option style="color: #4B4746" id="input3" value="certificate_of_association">certificate_of_association</option>
    <option style="color: #4B4746" id="input4" value="companies_house">companies_house</option>
    <option style="color: #4B4746" id="input5" value="current_local_tax_bill">current_local_tax_bill</option>
    <option style="color: #4B4746" id="input6" value="electoral_register_entry">electoral_register_entry</option>
    <option style="color: #4B4746" id="input7" value="evidence_of_authority">evidence_of_authority</option>
    <option style="color: #4B4746" id="input8" value="evidence_of_name_change">evidence_of_name_change</option>
    <option style="color: #4B4746" id="input9" value="filed_audited_accounts">filed_audited_accounts</option>
    <option style="color: #4B4746" id="input10" value="insurance_bill">insurance_bill</option>
    <option style="color: #4B4746" id="input11" value="marriage_certificate">marriage_certificate</option>
    <option style="color: #4B4746" id="input12" value="partnership_agreement">partnership_agreement</option>
    <option style="color: #4B4746" id="input13" value="secretary_of_state">secretary_of_state</option>
    <option style="color: #4B4746" id="input14" value="vehicle_registration">vehicle_registration</option>
  </select>
  <input style="color: #4B4746" type="file" id="filegoeshere">
  <br><br>
  <button style="color: #4B4746" onclick="submit()">Submit</button>
  <div id="token"></div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                var app_id = "{your-app-id}"; // your platform's app ID
var legal_entity_id = "{legal-entity-id}"; // Get this from user's login
var environment = "stage";
var api_version = "3.0";
WePay.configure(environment, app_id, api_version);
var error = WePay.configure("stage", app_id, api_version);
if (error) {
  console.log(error);
}

function submit() {
  var inputs = document.getElementById("filegoeshere");
  if (inputs.files !== undefined && inputs.files.length > 0) {
    var file = inputs.files[0];
  }

  var options = document.getElementById("ddlContType");
  {
    var type = options.value;
  }

  var body = {
    type: type,
    legal_entity_id: legal_entity_id,
    file: file
  };

  var headers = {};

  var node = document.createElement("div");
  var resp = WePay.documents.create(body, headers, function (response) {
    node.innerHTML = JSON.stringify(response);
    document.getElementById("token").appendChild(node);
  });
}

              
            
!
999px

Console