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 YunoSDKwithimport 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
workflowmust match that decision:
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
Related
createPayment. The controller that receives the token.TransactionData. The shape of the pre-collected data.PaymentMethodSelected. WheretransactionDatalives.- Migration / Lite. For the simpler “SDK shows the form” case.