• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
Europe (English)
France
Spain
Europe (English)
India
Homepage
Use cases
Create a payment
Create an installment payment
Create a multi-card (split) 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
SDD mandates by REST API
Snippets
Payment methods
Plugins
Marketplace
Guides
Merchant Back Office
Back Office Expert
Functional guides

KR.onTransactionCreated()

Description

KR.onTransactionCreated() intercepts all newly created transactions, whether they are accepted or rejected. KR.onTransactionCreated() accepts either a callback or a promise as a parameter.

The callback receives an object with 2 parameters:

  • KR: Reference to the library
  • event: Object that contains the newly created transaction.

You can stop the execution string by returning false at the end of processing:

Return value Behavior
false execution is interrupted. Error handling or redirection does not take place.
true The execution continues normally when the callback is executed.

For information, there are 2 callbacks that allow to intercept a newly created transaction:

  • KR.onSubmit() : when an accepted transaction is created.
  • KR.onError() : When a rejected transaction is created.

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.

Jobs
Legal
GDPR
25.28-1.11