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, every time the shopper changes the selection, and 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
- Web
- iOS
- Android
Pass the callback inside the The callback receives a single object argument:
card options of startCheckout: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.