List what I must change to move my Yuno Web SDK integration to v2, following this file.It works as
CLAUDE.md, AGENTS.md or a pasted prompt, with Claude Code, Cursor, Codex or Copilot. It is
read-only: it scans your code and reports, and it changes nothing unless you ask.
The target. v2 is the sdk-web 2.x line (“Yuno SDK 2.x”, the unified Transaction API). The latest release is
version 2.2.0 (2026-10-27). It is served at
https://sdk-web.y.uno/v2.2.0/main.js, and v2.0.0, v2.1.0, v2.1.2 are also live. There is no rolling
folder: /v2/, /v2.0/ and /v2.2/ return 404, so you pin a full version and bump it by hand. The EU host
sdk-web.prod.eu.y.uno serves up to v2.1.2 and returns 404 for v2.2.0 (at the time of writing). The SRI path is
https://prod.y.uno/sdk-static-bundles-ms/sdk-web/v2.2.0/main.js. Public docs: the “SDK” tab
(docs/yuno-sdk/*, migration series in docs/yuno-sdk/migration/web/*). The “SDKs” tab is the 1.x line.
v1.x stays supported side by side until 2027.
The source. v1.11 (window.Yuno, rolling /v1.11/main.js), the current 1.x line.
What v2 keeps (do not report these as blocking)
- v2 keeps no v1 alias. It sets only
window.SdkPaymentsand dispatches onlysdk-payments-ready. It does not setwindow.Yunoand never firesyuno-sdk-ready. Everywindow.Yunoandyuno-sdk-readyuse must change. - v1.11 already exposes the v2 names. It sets both globals and fires both events. So
window.SdkPaymentsandsdk-payments-readyin a v1.11 repo are already correct. That rename can ship on 1.11 first, before the script switch. - Unchanged on v2: the
sdk-payments-*CSS prefix; theinitializeoptions keys (cookies,sdkType,apiUrl,assetUrl,plugin);clearApiCache()andsetCanaryMode()on the instance;onChange(state); the optionsonPromotionQuoteUpdated,externalButtons,texts,issuersFormEnable,showPayButton,deviceFingerprints,paymentListConfig,savePaymentMethodEnabled; thecardkeysstyles,type(except'step'),vaultOnSuccess,texts,documentEnable,isCreditCardProcessingOnly,fonts,onChange,onGetInstallments,onInstallmentSelected. - Silent keys. v2 forwards unknown or v1-only config keys without any error. Most are never read: the
feature they controlled just disappears. Mark those rows SILENT. Three v1 keys are still read on 2.2.0:
onLoadingis still called when noshowLoadingfunction is set;paymentMethodSelectedandyunoPaymentMethodSelectedstill fire on every list selection, so keeping one next toonPaymentSelectedgives two calls per selection;yunoCreatePaymentis merged intocreatePaymentin state. Rename them anyway. - CSS. v2 renders
yuno-container-spinner-contentandyuno-container-spinner-ring(the loading spinner of every mount) and setsdata-yuno-placeholder. These are v2 names: never report selectors on them.
How to use
- Find the v1 surface. Run over source, server templates, tag-manager snippets and
package.json:
- Find any v2 surface already present:
grep -rnE "SdkPayments\.initialize|\.transaction\(|\.start\(\{|getPaymentMethodsViews|transactionStatus|\.antifraud\(|onStatus|saveCardEnabled|showStatusScreen|sdk-web\.[a-z.]*y\.uno/v2". A repo with both is mid-migration: report the v1 leftovers on every page that loads the v2 script. At runtime,typeof sdk.transaction === 'function'means v2; a v1 instance hasstartCheckoutand notransaction. - Classify each flow (Lite, Full, Seamless, Seamless Lite, external buttons, headless, Secure Fields, enrollment, fraud, status screen) as manual (merchant creates the payment) or managed (SDK creates it).
- Map every hit with the table below, run checks M1 to M25, and write the report.
Mapping
Sections follow the research table 3.A to 3.H. Kind: KEEP, RENAME, MOVE, BEHAVIOUR, NEW REQUIRED, REMOVED (no replacement), SILENT (v2 accepts and ignores the old key), BLOCKED (parity gap: report “blocked: parity gap, do not migrate this flow yet”, not as a change).3.A Bootstrap and globals
3.B Entry points and flow modes
3.C Option and callback names
3.D Required or new behaviour
3.E CSS, DOM and white label
3.F card option and nested config
3.G Behaviour that differs and is easy to miss
3.H Features in v1 and absent from v2 (BLOCKED: parity gap)
Checks
Report each as PASS / FAIL / N/A with file:line, and quote the line. Each title ends with the research check id and a severity: B blocking (no payment or no result), H high (feature silently lost or wrong outcome), M medium (degraded UX), L low (hygiene), P parity gap (report as blocked, never as a change to make).1. Global and ready event (M1, B)
Look:window.Yuno, Yuno.initialize, yuno-sdk-ready. Still v1: any hit. Change: window.SdkPayments, sdk-payments-ready, check the global before listening. Symptom: Yuno is not defined, init never runs.
2. Script URL and loader (M2, B)
Look: script tags,loadScript, sdk-static-bundles-ms. Still v1: /v1.11/, loadScript() without baseUrl, sri: true; also wrong: /v2/, /v2.2/. Change: full v2.x.y URL; EU pages check the EU host has the version. A v2.0.0 pin that matches the public docs sample is valid, not a finding. Symptom: sdk.transaction is not a function, or 404.
3. v1 entry points (M3, B)
Look: the second grep. Still v1: any call. Change: per Mapping; REMOVED rows say “no replacement”. Symptom:yuno.startCheckout is not a function.
4. Mode and session workflow (M4, B)
Look: v1 mode (Seamless = managed;startCheckout with yunoCreatePayment = manual) and the backend POST /v1/checkout/sessions body. Change: managed has no createPayment and uses workflow: "SDK_SEAMLESS"; manual has createPayment and the default workflow. Symptom: onStatus INTERNAL_ERROR.
5. createPayment signature (M5, B)
Look: (yuno)?[cC]reatePayment, continuePayment. Still v1: two or three parameters, the first used as a string, the config session used, continuePayment(), notifyError(). Change: one token; send token.token and token.checkout_session; return a Promise that settles on every path; reject on failure. Rename yunoCreatePayment: the 2.2.0 code keeps an alias, but mode selection reads only createPayment (verify at runtime). Symptom: Create Payment 4xx, stale-session payment, form stuck.
6. Result callbacks and statuses (M6, B)
Look:yunoPaymentResult, paymentResult, yunoError, enrollmentStatus, the v1 status strings. Change: one onStatus(result) on backend statuses plus INTERNAL_ERROR and USER_CANCEL; SDK error codes (FORM_INVALID, MERCHANT_CREATE_PAYMENT_FAILED, ELEMENT_NOT_FOUND) are in message.code and substatus is null, so never branch on substatus for them; FORM_INVALID and retryable declines are not final. Symptom: no result handled, console warns ...created without an onStatus function....
7. Rendering model (M7, H)
Look:renderMode, viewContainer, overlay CSS. Change: a sized container and elementSelector on transaction(). Symptom: form inline instead of modal; Wrong element selector. Blocked if the merchant requires a modal.
8. Status screen option (M8, H)
Look:showPaymentStatus. Change: showStatusScreen. Symptom: the SDK result screen shows anyway and onStatus waits for the shopper to dismiss it. The public v2.1.0 changelog still says showPaymentStatus (doc drift).
9. Loading (M9, M)
Look:onLoading, showLoading, showLoader, hideLoader. Change: showLoading: (isLoading) => void, drop type; a boolean must go. Symptom: a kept onLoading still runs, so nothing breaks until both are set; showLoading: true throws a minified TypeError; showLoading: false silently shows the SDK loader. Blocked where the loader is driven by hand with showLoader/hideLoader.
10. List selection and Pay (M10, B)
Look:paymentMethodSelected, startPayment, mountCheckout. Change: getPaymentMethodsViews, store onPaymentSelected, Pay calls start({paymentMethod: selected}), ignore selectionSource: 'auto'. Symptom: the list shows and nothing pays.
11. External buttons (M11, H)
Look:mount(Seamless)?ExternalButtons, unmount*ExternalButton*. Change: one view mount per wallet, awaited or caught. Symptom: wallet missing, unhandled rejection. The non-seamless family is blocked.
12. card keys (M12, H)
Look: cardSaveEnable, requiredFieldsOrderedEnabled, type: 'step'. Change: saveCardEnabled; drop the other. Symptom: save-card checkbox silently gone. 'step' is blocked.
13. Removed options (M13, H)
Look:onlyExpressPaymentMethods, stickyPayButton, __internal, renderMode. Change: report each; decide with the merchant. Symptom: behaviour silently missing. onLoading is not in this list: it is still called (M9). The parity-gap items are blocked.
14. Secure Fields (M14, B)
Look:secureFields(, .render(, generateToken*, enableV2, enableMultiplesCard. Change: tx.secureFields(), .mount, pay with start and only non-PCI keys in data.card (holderName, type, installment, customer, vaultOnSuccess); gate Pay on !error && isDirty. Symptom: render is not a function, PCI-keys error.
15. Headless (M15, B)
Look:apiClientPayment, generateToken, getThreeDSecureChallenge, payment_method.card.detail, holder_name. Change: camelCase data.card plus createPayment; delete 3DS code; one headless start() per transaction. Symptom: tokenization error, empty fields.
16. Enrollment (M16, B)
Look:mountEnrollmentLite, apiClientEnroll, continueEnrollment, vaultedToken in callbacks. Change: transaction({customerSession}).start(...); success is ENROLLED (UI) or CREATED (headless); vaulted token from the backend. Symptom: undefined token stored.
17. Fraud and status screen (M17, H)
Look:executeFraudCheck, mountFraud, mountStatusPayment. Change: executeFraudCheck becomes sdk.antifraud, checked on status === 'success'; mountFraud is a card payment UI, so it becomes a normal transaction({...}) plus start({paymentMethod:{type:'CARD'}}) with its yunoCreatePayment moved to createPayment(token), per the public fraud migration page; transactionStatus with elementSelector. Symptom: undefined fingerprints sent; not a function; a deleted mountFraud removes a payment flow.
18. Utility calls (M18, H)
Look:isPaymentMethodAvailable, updateCheckoutSession, refreshPromotionQuote, unmountSdk on the instance. Change: move them to the transaction; keep clearApiCache, setCanaryMode. Symptom: ... is not a function.
19. initialize lifecycle (M19, H)
Look: where and how often initialize runs (render bodies, effects, per checkout, changing applicationSession). Change: one instance per page with stable args, one transaction per checkout. Symptom: This SdkPayments instance is no longer active: a later initialize() replaced it... and the form vanishes. Two calls on a superseded instance do not throw: antifraud() resolves {status:'error'} and isPaymentMethodAvailable() resolves false.
20. Unmount (M20, M)
Look:unmountSdk(, effect cleanups. Change: await tx.unmount(); treat the USER_CANCEL it delivers as teardown, not abandonment. Symptom: error screen on navigation. React StrictMode remounts are untested in v2: verify at runtime.
21. Retry (M21, H)
Look:isRetrying, newCheckoutSession, custom retry code. Change: manual mode keeps the form after a retryable decline (session in token.checkout_session); after a final result, new session and new transaction. Symptom: retry broken; The payment on this checkout session already finished....
22. CSS, DOM, white label (M22, M)
Look: CSS and JS selectors on SDK class names and attributes. Still v1: a selector on a v1.11 name that v2 does not render. Exempt:yuno-container-spinner-content, yuno-container-spinner-ring and data-yuno-placeholder, which v2 renders. Change: keep sdk-payments-; re-check each override visually (only three classes were compared); give an HTMLElement container an id, or v2 adds yuno-view-<random>. A white-label page on v2 always contains the spinner yuno names; report that as a note, not a failure. Symptom: lost styling.
23. TypeScript types (M23, L)
Look:@yuno-payments/sdk-web-types, YunoSDK types. Change: a local v2 declaration written from the public v2 migration pages. Symptom: compile errors or silent any.
24. Parity-gap review (M24, P)
Look: every BLOCKED row. Report the flow as “blocked: parity gap, do not migrate this flow yet” and keep it on v1.11. Ask your Yuno contact for the current parity-gap list and cross-check it.25. Rollout and rollback (M25, M)
Look: a flag or per-environment switch for the script URL. Change: keep the v1.11 path, roll v2 by flag, test on sandbox first. Symptom: no way back.Report format
Diagnostics to capture
- The script URL actually loaded (Network tab) and the value of
typeof sdk.transaction(functionon v2 only). - The checkout session id, its
workflow, and the UTC time of the attempt. - Every
onStatuspayload received (status,substatus,message.code,message.reason). - Console lines starting with
SdkPayments, and any thrown message fromtransaction(),start()ormount(). - The
createPaymentrequest your backend sent (token field and session, personal data removed).
Verify at runtime
These could not be confirmed by reading code; test them before relying on them: what a loneyunoCreatePayment (v1 signature) does once merged into createPayment; what
card.type: 'step' renders; transaction.unmount() under a React StrictMode remount; the full CSS class list;
EU availability of v2.2.0. Part of this was read from unreleased v2 code, so some behaviour
may not be in the 2.2.0 bundle yet.
Sources: the Web SDK 1.11.47 and 2.2.0 source code, the v2 API report, the npm loader
@yuno-payments/sdk-web, @yuno-payments/sdk-web-types and the public Yuno docs (the “SDK” tab, its migration
guides and changelog, and the white-label page); CDN probes. Research date 2026-10-29.