Embedded form

The javascript client allow to integrate a billing form inside your page with 3 simple copy-paste.

1 Create a formToken

Create a formToken:

  • php
  • curl

    answer will be: (truncated)

    • javascript

      The generated token is

      Processing...

      Note

      To use your own authentication keys, see API keys and authentication.

        2 Get the payment form

        Copy-paste the following code:

        • html
        • php

          Javascript client will add form elements using classes:

          kr-pan card PAN
          kr-expiry card expiration month and year
          kr-security-code card cvv
          kr-form-error display error if any

          Payment form will looks like:

          kr-theme parameter

          kr-theme applies a minimalistic theme to the embedded form. Just remove it if you don't want any custom CSS to be applied to the form fields.

          when the user submit the form:

          1. payment method is registered
          2. the transaction is charged, then
          If the transaction is paid Form is submited (without any payment method sensitive data).
          If the transaction is refused Raise an error

          Note

          See the Javascript client reference for more details.

            3 Check payment status

            See Payment Done page to see how to check the payment status.

            Note

            It's highly recommended to define IPN callback URL. see Instant Payment Notification Usage for more details.

              Customize your form

              Do it yourself

              Embedded form supports advanced CSS customization. each form elementa has a special attribute kr-style that allow to inject custom CSS to the form element.

              Note

              See the Javascript client reference for more details.