• Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Script
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools
w3tweaks.com
  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Script
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools
w3tweaks.com
Home CSS Code Demos

Online Payment Credit & Debit Card Form Validation

September 18, 2019
in CSS Code Demos

Online payment option form like Credit Card & Debit Card Details with Validation using JavaScript for validate the payment details form. VISA, MASTER CARD and more bank card details we validate in this form. Developed using Bootstrap, jQuery, jQuery Validation Plugin, jQuery.payment library, and Stripe.js. AJAX form submission with visual feedback. This demo will create Stripe credit card token.

Demo / Download

Authorwmhilton
CreatedApril 17, 2018
Compatible browsersChrome, Firefox, Safari

HTML Code

  <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.13.1/jquery.validate.min.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.payment/1.2.3/jquery.payment.min.js"></script>  <!-- If you're using Stripe for payments --> <script type="text/javascript" src="https://js.stripe.com/v2/"></script>  <div class="container">     <div class="row">         <!-- You can make it whatever width you want. I'm making it full width              on <= small devices and 4/12 page width on >= medium devices -->         <div class="col-xs-12 col-md-4">                               <!-- CREDIT CARD FORM STARTS HERE -->             <div class="panel panel-default credit-card-box">                 <div class="panel-heading display-table" >                     <div class="row display-tr" >                         <h3 class="panel-title display-td" >Payment Details</h3>                         <div class="display-td" >                                                         <img class="img-responsive pull-right" src="http://i76.imgup.net/accepted_c22e0.png">                         </div>                     </div>                                     </div>                 <div class="panel-body">                     <form role="form" id="payment-form" method="POST" action="javascript:void(0);">                         <div class="row">                             <div class="col-xs-12">                                 <div class="form-group">                                     <label for="cardNumber">CARD NUMBER</label>                                     <div class="input-group">                                         <input                                              type="tel"                                             class="form-control"                                             name="cardNumber"                                             placeholder="Valid Card Number"                                             autocomplete="cc-number"                                             required autofocus                                          />                                         <span class="input-group-addon"><i class="fa fa-credit-card"></i></span>                                     </div>                                 </div>                                                         </div>                         </div>                         <div class="row">                             <div class="col-xs-7 col-md-7">                                 <div class="form-group">                                     <label for="cardExpiry"><span class="hidden-xs">EXPIRATION</span><span class="visible-xs-inline">EXP</span> DATE</label>                                     <input                                          type="tel"                                          class="form-control"                                          name="cardExpiry"                                         placeholder="MM / YY"                                         autocomplete="cc-exp"                                         required                                      />                                 </div>                             </div>                             <div class="col-xs-5 col-md-5 pull-right">                                 <div class="form-group">                                     <label for="cardCVC">CV CODE</label>                                     <input                                          type="tel"                                          class="form-control"                                         name="cardCVC"                                         placeholder="CVC"                                         autocomplete="cc-csc"                                         required                                     />                                 </div>                             </div>                         </div>                         <div class="row">                             <div class="col-xs-12">                                 <div class="form-group">                                     <label for="couponCode">COUPON CODE</label>                                     <input type="text" class="form-control" name="couponCode" />                                 </div>                             </div>                                                 </div>                         <div class="row">                             <div class="col-xs-12">                                 <button class="subscribe btn btn-success btn-lg btn-block" type="button">Start Subscription</button>                             </div>                         </div>                         <div class="row" style="display:none;">                             <div class="col-xs-12">                                 <p class="payment-errors"></p>                             </div>                         </div>                     </form>                 </div>             </div>                         <!-- CREDIT CARD FORM ENDS HERE -->                                   </div>                              <div class="col-xs-12 col-md-8" style="font-size: 12pt; line-height: 2em;">             <p><h1>Features:</h1>                 <ul>                     <li>As-you-type, input formatting</li>                     <li>Form field validation (also as you type)</li>                     <li>Graceful error feedback for declined card, etc</li>                     <li>AJAX form submission w/ visual feedback</li>                     <li>Creates a Stripe credit card token</li>                 </ul>             </p>             <p>Be sure to replace the dummy API key with a valid Stripe API key.</p>                          <p>Built upon: Bootstrap, jQuery,                  <a href="http://jqueryvalidation.org/">jQuery Validation Plugin</a>,                  <a href="https://github.com/stripe/jquery.payment">jQuery.payment library</a>,                 and <a href="https://stripe.com/docs/stripe.js">Stripe.js</a>             </p>         </div>              </div> </div>  

CSS Code

 body { margin-top:20px; }   .credit-card-box .panel-heading img {     min-width: 180px; } 

Preview

Online Payment Form Validation Preview

You might also like

CSS Shapes Forest Collection Spring Summer 2020

CSS Button Concept for Remove and Success

Three Pure different CSS Button effects

Easy customizable simple CSS buttons

Rounded CSS buttons with mouseover effect

Collection of CSS3 animated buttons to spice up your site

Tags: ajaxcredit cardcss animated dialogcss bouncingcss card animationcss debit cardcss demo designscss dialog animationcss dialog boxcss examplecss form validationcss frontendcss html animation examplecss javascript animationcss viewcss3 animationdebit cardform validationformsfrontend animationfrontend examplehtml animationhtml css animationinputsjqueryonline payment
Previous Post

CSS3 3D Button Effects

Next Post

CSS Animated Modal Window

Related Stories

CSS Shapes Forest Collection Spring Summer 2020
CSS Code Demos

CSS Shapes Forest Collection Spring Summer 2020

October 11, 2020
CSS Button Concept for Remove and Success
CSS Code Demos

CSS Button Concept for Remove and Success

August 21, 2019
Three Pure different CSS Button effects
CSS Code Demos

Three Pure different CSS Button effects

September 25, 2019
Easy customizable simple CSS buttons
CSS Code Demos

Easy customizable simple CSS buttons

September 8, 2019
Rounded CSS buttons with mouseover effect
CSS Code Demos

Rounded CSS buttons with mouseover effect

September 8, 2019
Collection of CSS3 animated buttons to spice up your site
CSS Code Demos

Collection of CSS3 animated buttons to spice up your site

September 8, 2019
Next Post
CSS Animated Modal Window

CSS Animated Modal Window

Discussion about this post

You might also like

CSS Cards

100 Creative CSS Cards

November 13, 2022
Multi step html form

44 Free Multi step HTML forms

March 7, 2023
CSS & HTML Dashboard Templates

13 Free HTML & CSS Dashboard Template Designs

December 29, 2021
49 CSS Tables

49 CSS Tables

November 13, 2019
HTML & CSS pricing tables

20 HTML & CSS pricing tables

May 2, 2020
CSS Dark Mode

14 Best CSS Dark Mode

October 13, 2021
w3tweaks

Unleash your front-end development potential by exploring the ultimate collection of UI designs and patterns, and play with them to create stunning websites through our tutorials.

Tags

Angularjs AngularJS Tutorials animation animation examples Button button hover effect Buttons Calendar calendars cards click buttons CSS css3 css buttons css calendar css calendars css effects css hover effects demo effect effects essentials forms free Free Tool hover hover animation Hover effects html inputs Javascript jquery js learn loaders menu mouse hover effects navigation php script text effects tool tutorial tutorials YouTube

Stay Connected

  • Effects
    • Scroll Effects
    • Text Effects
    • Shadow
  • Essentials
    • Arrows
    • Buttons
    • Background Patterns
    • Border Examples
    • Cards
    • Color Palettes
    • Dividers
    • Link styles
    • Loaders
    • Modal Windows
    • Notifications
    • Progress bar
    • Quote styles
    • Spinner
    • Tooltips
  • Media
    • Calendars
    • Carousels
    • Clocks
    • Gallery
    • Music Players
    • Sliders
    • Slideshows
    • Tables
    • Thumbnails
  • Navigation
  • Inputs
    • Range Sliders
    • Checkboxes
    • Toggle Switches
  • Script
    • Angularjs
    • Backbone.js
    • bootstrap
    • jQuery
    • ReactJs
    • JavaScript
    • Syntax Highlighters
    • tryit editor
    • PHP
  • API’s
    • Facebook
    • Google
    • Indeed
    • Twitter
    • YouTube
  • Tools

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
x
x