Skip to main content
Register the optional onInstallmentSelected callback to keep your cart total in sync with the installment plan the shopper picks in the card form. The SDK notifies you when a default installment is pre-selected and every time the shopper changes the selection. It also notifies you when the plan is recalculated (for example, after a BIN change). The callback is optional on all platforms: if you don’t register it, the SDK behavior is unchanged. Exceptions thrown inside your callback are caught by the SDK and never interrupt the payment flow.

Implementation

Supply your own installment options with onGetInstallments

Available from Web SDK 1.6.7. Pass onGetInstallments inside the card options; the SDK calls it once it knows the card’s BIN and renders whatever you return in the installments selector. The callback has a 10-second timeout; if it times out, throws an error, or returns an empty array, undefined, or nothing, the SDK falls back to the installment plans configured in Yuno.
The callback receives a single object argument and may be async:
The SDK calls onGetInstallments again whenever the BIN or the amount changes, and ignores a stale response if a newer call has started. Options you return are reported to onInstallmentSelected with isMerchantInstallment: true.

React to the shopper’s choice with onInstallmentSelected

Pass the callback inside the card options of startCheckout:
The callback receives a single object argument:
Firing semantics:
  • Fires with the current selection as soon as the plan renders and a default installment is pre-selected, so your total is correct from first paint.
  • Fires on every selection the shopper makes.
  • Re-fires the current selection when the available options change (for example, a BIN change recalculates the plan).
  • Does not fire when installments stop being available. There is no clear notification on Web.
  • Works across all card flows, including secure fields and Click to Pay.