• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
docs.
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.userPaymentMethodsOrder()

Description

This function allows you to manage the display order of the payment methods available in the shop.

Prerequisite: availability of the payment method

Pour gérer l'ordre d'affichage, vérifiez la disponibilité du moyen de paiement (en fonction de la devise, du montant minimum ou maximum, des contraintes techniques...) :

  • If it is on the list of compatible payment methods (see List of compatible payment methods ).
  • If its contract is associated with th shop via the Merchant Back Office.
  • It is present in thepaymentMethodsfield, optional field (seeSelect payment methods).

If you use a payment method that is not available, a warning message appears in the browser console.

Use the KR.getPaymentMethods() function to view the available payment methods.

Display rules

By default, the order is defined in the Merchant Back Office.

Payment by cards

If payment by card is available, it always appears first.

Example
  • Payment by card is absent from the function.
// function
smartForm.userPaymentMethodsOrder = ['PAYPAL', 'APPLE_PAY']
// result
Result = ['CARDS', 'PAYPAL', 'APPLE_PAY']
  • Payment by card is not first on the list.
// function
smartForm.userPaymentMethodsOrder = ['PAYPAL', 'APPLE_PAY']

// result
Result = ['CARDS', 'PAYPAL', 'APPLE_PAY']

Other payment methods

If the other payment methods are available and not listed in the function, they are displayed last.

Example
  • For Apple Pay
// your shop
SHOP = ['CARDS', 'PAYPAL', 'APPLE_PAY']

// function without APPLE_PAY
smartForm.userPaymentMethodsOrder = ['CARDS', 'PAYPAL']

// result
Result = ['CARDS', 'PAYPAL', 'APPLE_PAY']
  • For PayPal
// your shop
SHOP = ['CARDS', 'PAYPAL', 'APPLE_PAY' ]

// function without APPLE_PAY
smartForm.userPaymentMethodsOrder = ['CARDS', 'APPLE_PAY']

// result
Result = ['CARDS', 'APPLE_PAY', 'PAYPAL']

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.



KR.setFormConfig({ 
  smartForm: 
  { userPaymentMethodsOrder: ['PAYPAL', 'APPLE_PAY', 'CARDS'] } 
  }
  );
Jobs
Legal
GDPR
25.18-1.11