Skip to main content
Headless was a pure-tokenization client: the merchant collected card data in their own UI, called 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 their com.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 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