iOS SDK Common Reference

Parameters, customizations, and advanced features for all Yuno iOS SDK flows. For integration setup, see Payment flows (iOS), Enrollment flows (iOS), and integration modes.

Key parameters (checkout session creation)

When creating a checkout session on your backend for payment flows, the following parameters are commonly used across iOS SDKs:

ParameterRequiredDescription
amountYesThe primary transaction amount object containing currency (ISO 4217 code) and value (numeric amount in that currency).
alternative_amountNoAn alternative currency representation of the transaction amount with the same structure as amount (currency and value). Useful for multi-currency scenarios, such as displaying prices to customers in their preferred currency (e.g., USD) while processing the payment in the local currency (e.g., COP).

Payment parameters (full reference)

Parameters for payment flows (Full, Seamless, Lite, Headless). All parameters used in Payment flows (iOS) are listed here with full detail.

ParameterTypeRequiredDescription
checkoutSessionstringYesCheckout session ID from your backend (Create checkout session API). Required for all payment flows.
countryCodestringYesISO country code where the payment runs (e.g. BR, US). Determines available payment methods and compliance.
languagestringNoLanguage code for the SDK UI (e.g. en, pt-BR). Optional. See Supported languages when available.
viewControllerUIViewControllerYes*The view controller that presents the payment flow. Required when using delegate-based flow (Full/Lite). The SDK uses it to present modals and capture result. *Headless may not require it depending on integration.
yunoCreatePayment(with:)delegateYesDelegate method: create the payment on your backend using the one-time token provided by the SDK. After creating the payment via the API, inform the SDK so it can continue the flow.
yunoPaymentResult(_:)delegateNoDelegate method: invoked when the payment flow finishes. Receives the result (e.g. success, failure). Use for UI updates or navigation.

YunoConfig options (initialize)

Runtime behavior and appearance are configured via YunoConfig when calling Yuno.initialize(apiKey:config:). All parameters used across iOS payment and enrollment flows are listed below. For visual styling (fonts, colors, buttons), see SDK customizations (iOS).

ParameterTypeRequiredDescription
cardFormTypeenumNoConfigures the card form type or layout (e.g. step vs extended). Allowed values may vary by SDK version.
appearanceAppearanceNoCustom appearance (fonts, colors, buttons). Use Yuno.Appearance(...) to set fontFamily, accentColor, buttonBackgroundColor, buttonTitleColor, and related fields. See SDK customizations (iOS) for all options.
saveCardEnabledbooleanNoWhen true, allows the user to save or enroll the card during payment. Requires backend support for vaulting.
keepLoaderbooleanNoWhen true, keeps the loader visible until explicitly dismissed or until the flow completes. Use to control loading UX.
hideCardholderNamebooleanNoWhen true, hides the cardholder name field in the card form. Default false.
cardNumberPlaceholderstringNoPlaceholder text for the card number field. If not set, the SDK uses a default. Does not affect formatting or validation.

Enrollment parameters (full reference)

Parameters for enrollment flows (Lite, Headless). All parameters used in Enrollment flows (iOS) are listed here with full detail.

ParameterTypeRequiredDescription
customerSessionstringYesCustomer session ID from Create customer session API. Required. Associates the enrolled payment method with a specific customer.
countryCodestringYesISO country code (e.g. BR, US). Required for enrollment.
languagestringNoLanguage code for the SDK UI. Optional.
viewControllerUIViewControllerYes*The view controller that presents the enrollment flow. Required for delegate-based enrollment.
yunoEnrollmentResult(_:)delegateNoDelegate method: invoked when enrollment finishes. Receives the result (e.g. vaulted token, status). Use for UI updates or navigation.
YunoConfigYunoConfigNoSame options as payment (e.g. cardFormType, appearance, saveCardEnabled, keepLoader, hideCardholderName). See YunoConfig options (initialize) above.

Enrolling payment methods

You can enroll payment methods (store cards for future use) during the payment flow or via dedicated enrollment flows. For payment flows, enable save card in YunoConfig and set payment_method.vault_on_success (or equivalent) when creating the checkout session where supported. For dedicated enrollment, see Enrollment flows (iOS).