• France
Merchant Back Office
assistance
FAQContact support
Search
Categories
Tags
English
French
English
Homepage
Use cases
Create a payment
Create an installment payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
Snippets
Payment methods
Plugins
Guides
Merchant Back Office
Functional guides

KR.onFormValid()

Description

The callback defined in KR.onFormValid() is called once all the required fields are filled in and the data is valid.

Example of integration

You must implement the function described in the header of your payment page, after loading our main JavaScript library (kr-payment-form.min.js), as well as the associated style sheets.

<!-- code Jquery -->
<script type="text/javascript">
  $(document).ready(function() {
    KR.onFormValid( function({KR, cardInfo}) {
    var myMessage = "Selected brand: " + cardInfo.brand + ", and bin: " + cardInfo.bin;
    $("#custommessage").html(myMessage);
    });
  });
</script>

The cardInfo object contains the brand property which can take the following values:

  • Amex
  • cb
  • mastercard
  • maestro
  • visa_electron
  • Visa

It also contains the bin of the card entered.

To view the complete list, see the reference documentation of the effectiveBrand parameter here: Payment.

© 2025 {'|'} All rights reserved to PayZen by OSB
25.22-1.11