Pen Settings



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


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


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.


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.


                <form data-quickstream-api="creditCardForm">
  <div class="form-group">
    <label>Name on card</label>
    <input type="text" class="form-control" data-quickstream-api="cardholderName" />
  <div class="form-group">
    <label>Credit or debit card number</label>
    <input type="text" class="form-control" data-quickstream-api="cardNumber" />
  <div class="form-group col-sm-6">
    <label>Expiry date</label>
    <div class="row">
      <div class="col-5">
        <select class="form-control" data-quickstream-api="expiryDateMonth">
          <option value>Month</option>
          <option value="01">01</option>
          <option value="02">02</option>
          <option value="03">03</option>
          <option value="04">04</option>
          <option value="05">05</option>
          <option value="06">06</option>
          <option value="07">07</option>
          <option value="08">08</option>
          <option value="09">09</option>
          <option value="10">10</option>
          <option value="11">11</option>
          <option value="12">12</option>
      <div class="col-2">
        <span class="slash">/</span>
      <div class="col-5">
        <select class="form-control" data-quickstream-api="expiryDateYear">
          <option value>Year</option>
          let minYear = new Date().getFullYear(),
            maxYear = minYear + 9,
            select = document.getElementsByTagName('select')[1];
          for (let year = minYear; year <= maxYear; year++) {
            var option = document.createElement('option');
            option.value = year;
            option.innerHTML = year;
<button type="button" class="btn btn-primary" data-toggle="popover" data-container="body" data-placement="right" data-title="Got Token!" data-content="">Make Payment</button>
<script src=""></script>

<!-- Libraries for this demo -->
<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>


                body {
  color: #2d373e;
  font-family: "Helvetica Neue", Roboto, Arial, sans-serif;

form {
  background-color: white;
  border: 1px solid rgb(222, 222, 222);
  border-radius: 2px;
  margin-bottom: 0.75rem;
  min-height: 300px;
  padding: 1.5rem;
  width: 100%;

.slash {
  line-height: 34px;

.row {
  margin-left: 0;

.form-control {
  border: 1px solid rgb(204, 204, 204);
  border-radius: 2px;
  font-size: 14px;
  height: 34px;

.btn {
  font-weight: 300;
  margin-left: 25px;

label {
  font-size: 13px;
  line-height: 20px;
  margin-bottom: 5px;

.error {
  border-color: #dd1903 !important;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075) !important;
  color: #dd1903;
  font-size: 11px;
  font-weight: normal;
  line-height: 18px;

select.error {
  color: inherit;
  font-size: 13px;
  transition: border 500ms ease-in-out;

.col-5 {
  padding-left: 0;



                if (window.QuickstreamAPI) {
    publishableApiKey: "QUICKSTREAMDEMO_PUB"
  $(document).ready(function () {
    var form = $("[data-quickstream-api='creditCardForm']");
    $("button").click(function (event) {
      $this = $(this);
      $this.attr("disabled", "disabled");
      QuickstreamAPI.creditCards.getToken(form[0], "QUICKSTREAMDEMO", function (
      ) {
        $this.attr("disabled", null);
        if (errors) {
          QuickstreamAPI.creditCards.appendErrors(data.form, errors);
          console.log("Errors: " + JSON.stringify(errors));
        } else {
          let token = data.singleUseToken.singleUseTokenId;
          QuickstreamAPI.creditCards.appendTokenToForm(data.form, token);
          console.log("Single-Use-Token: " + token);
            .attr("data-content", token)
} else {
  $(document).ready(function () {
    $("form :input").prop("disabled", true);
      '<div class="alert alert-danger" role="alert">The service is currently unavailable</div>'
function resetFormState(button) {