apiClient.generateToken(collectedData, context), received a token, and then made their own backend call to create the payment (and, when the backend returned a 3DS-required status, continued the payment via apiClient.continueCardPayment(…)).
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. The merchant no longer has to call a separate 3DS endpoint.
Before you start
- Replace the
com.yuno.sdk.*imports with theircom.yuno.payments.sdk.api.*counterparts (the side-by-side lists them). 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.