This page documents a legacy SDK. Starting a new integration? Use the Yuno SDK. Already on a legacy SDK? Follow the migration guide.The new Yuno SDK (Web v2.x, iOS v3.x, Android v3.x, React Native v2.x) replaces the Full, Lite, Seamless, Render, Headless, and Secure Fields SDKs with one API across every platform. Legacy SDKs remain supported side by side during the transition and are scheduled for deprecation in 2027. Contact your Account Manager for migration planning.
onCardInfoChanged callback to receive the card’s brand, type, category, issuer and country while the shopper types the card number in the card form. You get these details before the shopper submits the form, so you can adapt your checkout in real time: show the card brand or issuing bank in your order summary, explain a promotion that applies only to credit cards, or adapt a message to the country of the issuing bank.
The callback is informational and optional: if you don’t register it, the SDK behavior is unchanged. The SDK already looks up the card details from the sixth digit to show the brand and load installments, and the callback hands you the result of that same lookup. It makes no extra network call and never includes the full card number, the security code, the expiry date or the cardholder name.
The callback fires in every card form the SDK shows for a new card, in payments and in enrollments. It is not called for saved (enrolled) cards, because the shopper does not type a number, or in headless integrations, because the SDK shows no card form there.
What you receive
A card info object, ornull (nil on iOS) as described in When it is called.
- Values are passed exactly as the card lookup returns them. The SDK does not translate or normalize them.
- A value the lookup does not return is
null(nilon iOS). Some fields, such asissuerCode, are often empty, so do not make them required in your logic. - On iOS,
iinis always present. Every other field is optional on both platforms. - The length of
iinvaries between 6 and 8 digits. Do not rely on it. - Each value is also available by key:
rawDataon iOS andtoMap()on Android always return the nine keys above, with the same names on both platforms. On iOS, a missing value inrawDataisNSNull.
When it is called
- After the card lookup answers, once the shopper has typed at least 6 digits.
- Again only when the result changes. Typing more digits of the same card does not call it again unless the lookup returns different details. On iOS, a new call can also arrive when the lookup matches a longer prefix of the same card, with only
iinchanged. - With
null(nilon iOS) when a card you already received no longer applies: the number drops below 6 digits, the field is cleared, or the lookup fails. The first call is nevernull. - On the main thread, so you can update your UI directly.
Implementation
- iOS
- Android
Implement the optional The method receives a To read the values by key, use For Seamless, set In Objective-C:
onCardInfoChanged(_:) method on the delegate you pass to the SDK: YunoPaymentDelegate for payments (Full, Lite and Render) and YunoEnrollmentDelegate for enrollments. The method is the same in both.YunoCardInfo? payload, also available from Objective-C:rawData:SeamlessParams.onCardInfoChanged instead, because Seamless does not take a delegate. Set the closure before you call startPaymentSeamlessLite: it is read once, when the payment starts.Best practices
- Keep the handler light. It runs on the main thread while the shopper is typing, so move any slow work, such as a call to your backend, off the main thread.
- Handle
null(nilon iOS): clear or hide whatever you showed for the previous card. - Treat each call as the current state of the form, not a final value. The shopper can still change the number before paying.
- Do not block or delay the payment based on these values. The SDK validates the card on its own.
Testing
- In sandbox, open a card form from your app with the callback registered.
- Type a test card number. After the sixth digit you receive the card details.
- Delete digits until fewer than 6 remain. You receive
null(nilon iOS). - Type the number of a card from another brand. You receive the new details.
- Pay with a saved card. The callback is not called.
Related
- Installments. A similar callback for the installment option the shopper picks.
onCardInfoChangedin the Yuno SDK. The same information in the Yuno SDK (iOS and Android v3.x).