Skip to main content
Headless was a tokenization client: the merchant collected card data in their own UI, called generateToken(data:), received the One-Time Token, created the payment from their own backend, and then called continueCardPayment(onResult:) so the SDK ran any remaining action (such as 3DS) and delivered the result. In the unified API the same scenario maps to non-seamless headless mode: pass the pre-collected data inside transactionData on the PaymentMethodSelected, override createPayment to create the payment from your backend, and let the SDK orchestrate tokenization, 3DS, and status polling automatically. There is no second call to resume the payment: returning from createPayment does it.

Before you start

  • Replace import YunoSDK with import SdkPayments. Your public API key and the checkout sessions your backend creates do not change (Before you begin).
  • Decide who creates the payment. The checkout session’s workflow must match that decision:
A default-workflow session with no createPayment override ends in INTERNAL_ERROR: the backend rejects the SDK’s payment creation. See createPayment.

Side-by-side

What changes

Grouped in the order you edit the code. Renamed: same role, new name. Moved: same value, new owner. Removed: nothing to call. New: no legacy counterpart. The last column is the only thing you have to do beyond the rename.

Initialization and config

Controller

Entry points