@wirexapp/card-sdk-core 1.1.0-beta.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -132,12 +132,14 @@ export interface PciAppearanceVariables {
132
132
  colorDivider?: string;
133
133
  /** Wallet review screen: emphasis colour of the total ("you pay") value. */
134
134
  colorEmphasis?: string;
135
- /** Reveal frame: square size of the copy-button glyph (e.g. `24px`).
136
- * Default `20px`. */
135
+ /** Square size of the in-frame icon controls (e.g. `24px`): the reveal
136
+ * frame's copy button and show/hide eye, and the collect CVV field's
137
+ * show/hide eye. Default `20px`. */
137
138
  copyIconSize?: string;
138
- /** Reveal frame: copy-button glyph colour. Defaults to `colorLabel`. */
139
+ /** Colour of the same controls (icon or text shape). Defaults to
140
+ * `colorLabel`. */
139
141
  colorCopyIcon?: string;
140
- /** Reveal frame: copy-button glyph colour on hover. Defaults to `colorText`. */
142
+ /** Their colour on hover. Defaults to `colorText`. */
141
143
  colorCopyIconHover?: string;
142
144
  /** Reveal frame: glyph colour of the transient "copied" checkmark.
143
145
  * Defaults to `colorFocus`. */
@@ -195,12 +197,65 @@ export interface PciFrameAuth {
195
197
  userEmail?: string;
196
198
  userWallet?: string;
197
199
  }
198
- export interface PciCollectInitConfig {
200
+ /**
201
+ * Optional diagnostics passthrough, shared by every init mode
202
+ * (docs/ERROR-TRACKING.md §5, §7). Additive within protocol v1: older frames
203
+ * ignore it, older hosts never send it.
204
+ */
205
+ export interface PciDiagnosticsInit {
206
+ /** An OPAQUE, host-chosen id so Wirex can answer "user X could not top up
207
+ * at 10:03" — the same id the host gives its own error tracker. Never an
208
+ * email, phone number or wallet address: the frame validates
209
+ * (`[A-Za-z0-9_\-:.]{1,128}`, no `@`, not digits only, not an EVM or
210
+ * Bitcoin address) and DROPS a value that fails, without echoing it.
211
+ * Sent as `user.id` and nothing
212
+ * else; held in memory for the document's lifetime only. */
213
+ userId?: string;
214
+ }
215
+ /** The in-frame show/hide control of the collect CVV input — see
216
+ * `PciCollectMaskInit.maskToggle`. The reveal's shapes minus `'row'`: a tap
217
+ * on an input must focus it, so the field itself is never the control. */
218
+ export type PciCollectMaskToggleMode = 'button' | 'text' | 'none';
219
+ /** Why a `collect-masked-changed` happened: the init option (`'init'`), the
220
+ * user's in-frame toggle (`'user'`), the host's `collect-set-masked`
221
+ * (`'host'`) or the frame's own `maskAfter` timer (`'timeout'`). The same
222
+ * reasons as the reveal's. */
223
+ export type PciCollectMaskedReason = 'init' | 'user' | 'host' | 'timeout';
224
+ /**
225
+ * Masking of the CVV INPUT while the user types — the three init options the
226
+ * collect frames share (the combined form applies them to its CVV control,
227
+ * the per-field frame only when it renders `cvv`; the card number is never
228
+ * masked). Mirrors the reveal's model: the state lives in the frame, the
229
+ * user's in-frame toggle and the host's `collect-set-masked` change it, and
230
+ * `collect-masked-changed` reports it. Differences, all by design: the
231
+ * masked rendering is the browser's own password bullet (the input flips
232
+ * between `type="password"` and `type="text"`), so there is no
233
+ * `maskedPlaceholder`; and there is no reveal gate — the value is what the
234
+ * user is typing, there is nothing to authorise. Every option is re-validated
235
+ * in the frame; an older frame ignores all three and keeps the CVV masked.
236
+ */
237
+ export interface PciCollectMaskInit {
238
+ /** Start with the CVV masked. Default `true` — the behaviour before this
239
+ * option existed. Only a literal `false` starts it shown. */
240
+ masked?: boolean;
241
+ /** The user's control inside the field, at its right edge. `'button'` — the
242
+ * reveal's eye / eye-off icon, themed by the same `copyIcon*` tokens;
243
+ * `'text'` — a text button from the `show` / `hide` strings, sized to the
244
+ * wider word; `'none'` (default) — no control, the host drives the state
245
+ * through `collect-set-masked` or not at all. */
246
+ maskToggle?: PciCollectMaskToggleMode;
247
+ /** Re-mask a SHOWN CVV after this many milliseconds, counted from the
248
+ * moment typed digits are visible; masking it earlier cancels the timer.
249
+ * `0` / absent = never. Reported with reason `'timeout'`. */
250
+ maskAfter?: number;
251
+ }
252
+ export interface PciCollectInitConfig extends PciCollectMaskInit {
199
253
  mode: 'collect';
200
254
  profile: PciCollectProfile;
201
255
  auth: PciFrameAuth;
202
256
  appearance?: PciAppearance;
203
257
  strings?: PciFrameStrings;
258
+ diagnostics?: PciDiagnosticsInit;
204
259
  }
205
260
  /**
206
261
  * Per-field (split) Collect frame — one iframe renders a single card field,
@@ -209,20 +264,45 @@ export interface PciCollectInitConfig {
209
264
  * tokenization over a same-origin BroadcastChannel — the value never reaches
210
265
  * the host page. Only the aggregator field (`number`) POSTs; the target URL is
211
266
  * the frame service's own `window.__WX_ENDPOINTS__`, not host-supplied. It
212
- * receives the fresh bearer with the `tokenize` message.
267
+ * receives the fresh bearer with the `tokenize` message. The masking options
268
+ * (`PciCollectMaskInit`) apply to the `cvv` field only; every other field
269
+ * ignores them.
213
270
  */
214
- export interface PciCollectFieldInitConfig {
271
+ export interface PciCollectFieldInitConfig extends PciCollectMaskInit {
215
272
  mode: 'collect-field';
216
273
  field: PciCollectFieldName;
217
274
  /** Shared BroadcastChannel group id; siblings aggregate values under it. */
218
275
  groupId: string;
219
276
  appearance?: PciAppearance;
220
277
  strings?: PciFrameStrings;
278
+ diagnostics?: PciDiagnosticsInit;
221
279
  }
222
280
  /** A reveal row. Used to render one field per iframe (`fields`). */
223
281
  export type PciRevealField = 'cardholder' | 'number' | 'expiry' | 'cvv' | 'pin';
224
282
  /** How a reveal row's value gets copied — see `PciRevealInitConfig.copy`. */
225
- export type PciRevealCopyMode = 'button' | 'row' | 'none';
283
+ export type PciRevealCopyMode = 'button' | 'text' | 'row' | 'none';
284
+ /** Per-row copy modes — see `PciRevealInitConfig.copyByField`. */
285
+ export type PciRevealCopyByField = Partial<Record<PciRevealField, PciRevealCopyMode>>;
286
+ /** How a reveal row's masked state gets toggled by the USER — the in-frame
287
+ * control, see `PciRevealInitConfig.maskToggle`. Same shapes as the copy
288
+ * control: an icon button (eye / eye-off), a text button (`show` / `hide`
289
+ * strings), the row itself, or nothing. */
290
+ export type PciRevealMaskToggleMode = 'button' | 'text' | 'row' | 'none';
291
+ /** Per-row mask-toggle modes — see `PciRevealInitConfig.maskToggleByField`. */
292
+ export type PciRevealMaskToggleByField = Partial<Record<PciRevealField, PciRevealMaskToggleMode>>;
293
+ /** A masked state PER ROW, as the host sends it: `true` masks the row,
294
+ * `false` shows it, an absent row is left as it is. The cardholder row is
295
+ * never masked (it is not sensitive): an entry for it is ignored. */
296
+ export type PciRevealMaskedFields = Partial<Record<PciRevealField, boolean>>;
297
+ /** The masked state of every RENDERED row, as the frame reports it. */
298
+ export type PciRevealMaskedState = Partial<Record<PciRevealField, boolean>>;
299
+ /** Why a `reveal-masked-changed` happened: the init option (`'init'`), the
300
+ * user's in-frame toggle (`'user'`), the host's `reveal-set-masked`
301
+ * (`'host'`) or the frame's own `maskAfter` timer (`'timeout'`). */
302
+ export type PciRevealMaskedReason = 'init' | 'user' | 'host' | 'timeout';
303
+ /** Who may REVEAL a masked row from the in-frame toggle — see
304
+ * `PciRevealInitConfig.revealGate`. Hiding is never gated. */
305
+ export type PciRevealGate = 'frame' | 'host';
226
306
  /** How a reveal row is drawn — see `PciRevealInitConfig.rowStyle`. */
227
307
  export type PciRevealRowStyle = 'plain' | 'boxed';
228
308
  /** How a reveal frame arranges its rows — see `PciRevealInitConfig.layout`. */
@@ -245,7 +325,9 @@ export interface PciRevealInitConfig {
245
325
  appearance?: PciAppearance;
246
326
  strings?: PciFrameStrings;
247
327
  /** Copy affordance per row. `'button'` (default) — the icon button beside
248
- * the value, as today; `'row'` — the whole row is the copy control (a real
328
+ * the value, as today; `'text'` — a text button drawn from the `copy` /
329
+ * `copied` strings (sized to the wider of the two, so the row never
330
+ * shifts); `'row'` — the whole row is the copy control (a real
249
331
  * `<button>`: click, Enter, Space), no icon and no reserved width, with the
250
332
  * copied state shown on the value and announced to assistive tech;
251
333
  * `'none'` — no copy affordance at all, the value stays selectable text.
@@ -283,6 +365,60 @@ export interface PciRevealInitConfig {
283
365
  * (one field full-width above a row of others) is two frames. Enumerated
284
366
  * and re-validated in the frame; older frames ignore it and stack. */
285
367
  layout?: PciRevealLayout;
368
+ /** Copy affordance per ROW, overriding `copy` for the named fields only —
369
+ * e.g. `{ pin: 'none' }` keeps the icon button on every row but the PIN.
370
+ * Each entry is validated in the frame against the same closed set as
371
+ * `copy` (`'button' | 'row' | 'none'`); an entry that fails, or names an
372
+ * unknown row, is dropped and that row follows `copy`. Older frames
373
+ * ignore the whole map and render every row in the `copy` mode. */
374
+ copyByField?: PciRevealCopyByField;
375
+ /** Start with the values MASKED. `true` masks every sensitive row, a
376
+ * `PciRevealMaskedFields` map masks the named rows only (default: nothing
377
+ * masked, rendered as today). While masked the frame replaces the value
378
+ * TEXT in its DOM — the card number shows the masked glyph for every
379
+ * digit but the last four, the expiry `••/••`, CVV and PIN one glyph per
380
+ * character; the cardholder row is never masked (it is not sensitive).
381
+ * The values are still fetched at mount, under the same step-up, and the
382
+ * copy control still copies the real value: masking is a shoulder-surfing
383
+ * measure, not a second authorisation. The state lives in the frame, per
384
+ * row; two things change it: the user's in-frame toggle (`maskToggle`)
385
+ * and the host's `reveal-set-masked` (`PciRevealElement.setMasked`) — no
386
+ * refetch, no new action token either way. The glyph is the
387
+ * `maskedPlaceholder` string (default `•`). Re-validated in the frame
388
+ * (only booleans count); an older frame ignores it and shows the values —
389
+ * hosts that depend on masking must run against frames that carry it
390
+ * (`reveal-masked-changed` confirms the applied state). */
391
+ masked?: boolean | PciRevealMaskedFields;
392
+ /** The in-frame show/hide control of every sensitive row (default
393
+ * `'none'`: no control, the host drives masking through
394
+ * `reveal-set-masked`). `'button'` — an eye / eye-off icon button beside
395
+ * the value, before the copy button, themed by the same `copyIcon*`
396
+ * tokens; `'text'` — a text button from the `show` / `hide` strings,
397
+ * sized to the wider word; `'row'` — tapping the value toggles it (when
398
+ * the row is ALSO the copy control — `copy: 'row'` — copying wins and the
399
+ * toggle for that row renders as `'none'`). Enumerated and re-validated
400
+ * in the frame; older frames ignore it. */
401
+ maskToggle?: PciRevealMaskToggleMode;
402
+ /** `maskToggle` per ROW, overriding it for the named rows only, validated
403
+ * entry by entry like `copyByField`. */
404
+ maskToggleByField?: PciRevealMaskToggleByField;
405
+ /** Re-mask a SHOWN row after this many milliseconds, counted from the
406
+ * moment its value is visible (at load, after a toggle, after a host
407
+ * `reveal-set-masked`); masking it earlier cancels the timer. A number
408
+ * applies to every sensitive row, a map names rows; `0` / absent = never
409
+ * (the default — a display timeout is the operator's policy, see
410
+ * PCI SSC FAQ 1071). The frame reports the re-mask with reason
411
+ * `'timeout'`. Hosts with their own policy need none of this: they re-mask
412
+ * through `reveal-set-masked`. Validated in the frame (finite, ≥ 0). */
413
+ maskAfter?: number | Partial<Record<PciRevealField, number>>;
414
+ /** Who may reveal a masked row from the in-frame toggle. `'frame'`
415
+ * (default): the toggle shows the value in place. `'host'`: the toggle
416
+ * leaves the row masked and the frame posts `reveal-requested` with the
417
+ * field name — the host decides (its own step-up, biometrics, …) and
418
+ * reveals with `reveal-set-masked`. Hiding is never gated. Mirrors the
419
+ * mobile SDK's controlled `masked` + `revealRequested`. */
420
+ revealGate?: PciRevealGate;
421
+ diagnostics?: PciDiagnosticsInit;
286
422
  }
287
423
  /** Availability probe — no transaction context, no backend calls. The `init`
288
424
  * request's result carries `PciWalletAvailability`. */
@@ -293,11 +429,61 @@ export interface PciWalletProbeInitConfig {
293
429
  * values (auth methods, networks) are used verbatim so the availability
294
430
  * answer reflects the real tokenization path instead of built-in defaults. */
295
431
  config?: PciWalletProviderConfig;
432
+ diagnostics?: PciDiagnosticsInit;
296
433
  }
297
434
  export interface PciWalletAvailability {
298
435
  applePay: boolean;
299
436
  googlePay: boolean;
300
- }
437
+ /** Google Pay cannot tokenize HERE (no cryptogram cards — desktop, iOS), but
438
+ * this context can show the desktop QR handoff: the user scans a code with
439
+ * an Android phone, which opens the same checkout top-level and pays there
440
+ * (token mode only — see `PciWalletCheckoutAuth`). Absent on frames that
441
+ * predate WPAY-4431. */
442
+ googlePayHandoff?: boolean;
443
+ /** One summary of Google Pay for this context; the states are mutually
444
+ * exclusive. `googlePay` stays the "can pay HERE" boolean, so a host that
445
+ * ignores this field behaves exactly as before. Absent on frames that
446
+ * predate it (`checkWalletAvailability` derives it from the booleans).
447
+ * - `ready`: tokenizes here (= `googlePay: true`)
448
+ * - `handoff`: no native Google Pay here; the desktop QR can finish it
449
+ * (token mode only, exactly like `googlePayHandoff`)
450
+ * - `needs_card`: Android, Google Pay works, but no card in Google Wallet
451
+ * on this phone is one the top-up accepts (CRYPTOGRAM_3DS). A host may
452
+ * keep the row and send the user to Google Wallet instead of checkout.
453
+ * Never reported when the provider block passed to the probe omits
454
+ * `google_pay` (the provider does not offer it)
455
+ * - `unavailable`: hide the row */
456
+ googlePayState?: PciGooglePayState;
457
+ }
458
+ export type PciGooglePayState = 'ready' | 'handoff' | 'needs_card' | 'unavailable';
459
+ /** Google Pay with no transaction (WPAY-4115) — for the probe's `needs_card`:
460
+ * Google's own sheet with no price (`totalPriceStatus: NOT_CURRENTLY_KNOWN`),
461
+ * so a user whose Google Wallet holds no usable card sees what Google Pay
462
+ * offers here. No quote, no Wirex backend call: whatever the sheet returns is
463
+ * dropped in the frame, and only the outcome reaches the host
464
+ * (`wallet-preview-closed`). The `init` result is empty; it fails when the
465
+ * block has no `google_pay` or Google Pay JS cannot load. Hosted by native
466
+ * WebView shells (Android). */
467
+ export interface PciWalletPreviewInitConfig {
468
+ mode: 'wallet-preview';
469
+ /** The DEFAULT provider block, pre-quote; its `google_pay` values are used
470
+ * verbatim, exactly as the checkout would use them. */
471
+ config?: PciWalletProviderConfig;
472
+ /** ISO 4217 — Google wants one even with no price. Default `EUR`. */
473
+ currency?: string;
474
+ /** Open the sheet straight away instead of waiting for a tap on the frame's
475
+ * Google Pay button. Android WebView allows it; where the platform wants a
476
+ * user gesture the button stays (`wallet-preview-auto` says which). */
477
+ autoOpen?: boolean;
478
+ /** The button preset (see `PciWalletButtonAppearance`). Default white, plain. */
479
+ buttons?: Pick<PciWalletButtonAppearance, 'googlePay'>;
480
+ }
481
+ /** How a preview sheet closed: `continued` — the user pressed the sheet's
482
+ * action (nothing is charged; the result is dropped); `cancelled` — the user
483
+ * dismissed it; `failed` — it never opened. `statusCode` says why: Google's
484
+ * status code, or for a launch the platform refused the DOMException name
485
+ * (`NotAllowedError` …), which pay.js would otherwise report as `CANCELED`. */
486
+ export type PciWalletPreviewOutcome = 'continued' | 'cancelled' | 'failed';
301
487
  /**
302
488
  * Wallet-button presentation presets. Both wallets brand-control their buttons,
303
489
  * so only their allowed presets are exposed — validated in-frame like every
@@ -418,6 +604,73 @@ export interface PciWalletBrandingConfig {
418
604
  * privacy policy. */
419
605
  privacyUrl?: string;
420
606
  }
607
+ /**
608
+ * TOKEN MODE (WPAY-4431) — the frame EXECUTES the top-up itself instead of
609
+ * handing the wallet payment token back to the host. The host passes a
610
+ * short-lived top-up token minted by the backend (`POST
611
+ * /api/v1/cards/topup/token`: a user token restricted to the estimate/execute
612
+ * paths); after the sheet authorizes, the frame calls
613
+ * `POST /api/v1/cards/topup/execute` with it and reports `wallet-executed` /
614
+ * `wallet-execute-failed`. The encrypted wallet payment token never leaves the
615
+ * frame. Without `auth` the frame keeps the legacy tokenize-and-return
616
+ * behaviour (`wallet-token`) unchanged.
617
+ *
618
+ * Why: partner Android apps cannot run Google Pay in a WebView (Google
619
+ * validates the hosting app's package against the merchant profile), so the
620
+ * checkout must run TOP-LEVEL (Chrome Custom Tabs, our desktop QR) where no
621
+ * host channel exists to hand a token back to — the page has to finish the
622
+ * top-up on its own. The token rides postMessage for hosted documents and
623
+ * the URL FRAGMENT for top-level launches (never a query string; stripped
624
+ * from the address bar on load).
625
+ */
626
+ export interface PciWalletCheckoutAuth {
627
+ /** The backend's short-lived top-up token (`token` of the
628
+ * `/cards/topup/token` response). Opaque to the SDK — sent as the
629
+ * `Authorization: Bearer` of the execute call and nothing else. Never log
630
+ * it; never pass a full user session token in production. */
631
+ checkoutToken: string;
632
+ /** Mirrors of the host's own `X-User-Email` / `X-User-Wallet` request
633
+ * headers — only for backends that still resolve the caller from them;
634
+ * the token itself identifies the user. Optional, never logged. */
635
+ userEmail?: string;
636
+ userWallet?: string;
637
+ }
638
+ /** Where Google Pay goes on a device that cannot tokenize natively (desktop):
639
+ * `qr` (default in token mode) shows a code the user scans with an Android
640
+ * phone. The code carries the checkout itself — the top-up token, the quote
641
+ * and the estimate's `provider` name (`buildWalletLaunchFragment`); the phone
642
+ * opens this checkout top-level, resolves the provider block from the public
643
+ * BaaS config, pays natively and executes. Nothing is stored anywhere and
644
+ * this document never learns the outcome: the host reconciles by its own
645
+ * status reads after `wallet-state: handoff-pending`. Requires `provider`
646
+ * in the init. `none` hides Google Pay on such devices, as before WPAY-4431. */
647
+ export type PciWalletGooglePayHandoff = 'qr' | 'none';
648
+ /** Token mode: the execute call succeeded — the top-up exists. `status` is
649
+ * the execute response's status (`Completed` | `Pending` | `Failed` | …):
650
+ * treat it exactly like the card top-up flow's; the status feed owns the
651
+ * final truth. */
652
+ export interface PciWalletExecuteResult {
653
+ /** The top-up transaction id. */
654
+ id: string;
655
+ status: string;
656
+ method: 'apple_pay' | 'google_pay';
657
+ cardNetwork?: string;
658
+ panLast4?: string;
659
+ displayName?: string;
660
+ }
661
+ /** Token mode: the execute call did not succeed. `reason` is a stable slug
662
+ * for messaging/analytics: `execute_rejected` (4xx — token rejected,
663
+ * validation), `already_executed` (409 — a second execute on the same
664
+ * estimation; reconcile by status), `estimation_expired` (422),
665
+ * `execute_unauthorized` (401/403 — token expired or wrong scope),
666
+ * `execute_failed` (5xx), `network_error`. */
667
+ export interface PciWalletExecuteError {
668
+ reason: string;
669
+ /** HTTP status of the execute response, when there was one. */
670
+ status?: number;
671
+ /** Sanitized backend message — diagnostics and toasts, never the token. */
672
+ message?: string;
673
+ }
421
674
  export interface PciWalletCheckoutInitConfig {
422
675
  mode: 'wallet-checkout';
423
676
  /** `full` (default) renders the review card (top-up / fee / total).
@@ -442,22 +695,54 @@ export interface PciWalletCheckoutInitConfig {
442
695
  buttons?: PciWalletButtonAppearance;
443
696
  branding?: PciWalletBrandingConfig;
444
697
  strings?: PciFrameStrings;
698
+ /** TOKEN MODE — see {@link PciWalletCheckoutAuth}. Present: the frame
699
+ * executes the top-up itself and reports `wallet-executed` /
700
+ * `wallet-execute-failed`; `wallet-token` is never sent. Absent: legacy
701
+ * tokenize-and-return. */
702
+ auth?: PciWalletCheckoutAuth;
703
+ /** Token mode only — see {@link PciWalletGooglePayHandoff}. Default `qr`. */
704
+ googlePayHandoff?: PciWalletGooglePayHandoff;
705
+ /** The estimate's `provider` name — required for the desktop Google Pay QR
706
+ * (the phone resolves the provider block by name); harmless otherwise. */
707
+ provider?: string;
708
+ /** STANDALONE launches only (a partner app opening this document
709
+ * top-level in Chrome Custom Tabs with `#init=` or the launch fragment):
710
+ * the link the result screen offers as "Return to the app" — an `https`
711
+ * App Link / Universal Link (OS-verified for the partner's package,
712
+ * preferred) or the app's own scheme (`com.partner.app:/wallet/return`;
713
+ * any installed app may claim a scheme) — with `estimation_id` and
714
+ * `outcome` (`completed` | `pending` | `failed` | `already_executed`)
715
+ * appended as query parameters — never the token, never the wallet
716
+ * payload. Validated in-frame after URL parsing: the schemes a browser
717
+ * would execute in the frame's origin (`javascript:`, `data:`, `blob:`,
718
+ * …), browser-internal ones and `http:` are ignored
719
+ * (`resolveWalletReturnUrl`); hosted documents (iframe, popup, native
720
+ * WebView) ignore it entirely. The app reconciles by estimation status —
721
+ * the link is a UX signal only. */
722
+ returnUrl?: string;
445
723
  /** DEV ONLY: arm the frame's `wallet-debug` channel — in-frame JS errors,
446
724
  * unhandled rejections and console output stream to the host as
447
725
  * `wallet-debug` events (native WebViews have no reachable console).
448
726
  * Wallet frames only — the PCI collect/reveal frames never forward
449
727
  * console output (cardholder data risk). Never enable in production. */
450
728
  debug?: boolean;
451
- }
452
- export type PciWalletCheckoutState = 'loading' | 'ready' | 'sheet-open';
729
+ diagnostics?: PciDiagnosticsInit;
730
+ }
731
+ /** Wallet checkout lifecycle. `sheet-open` = the OS wallet sheet is up;
732
+ * token mode adds `executing` (the frame is calling execute) and
733
+ * `handoff-pending` (the desktop QR is on screen — the phone pays and
734
+ * executes; this frame never learns the outcome, the host reconciles by its
735
+ * own status reads). */
736
+ export type PciWalletCheckoutState = 'loading' | 'ready' | 'sheet-open' | 'executing' | 'handoff-pending';
453
737
  /**
454
738
  * One authorized payment sheet's output. `walletPaymentToken` is the sheet's
455
- * payment token serialized for the wire — Apple: the whole PKPaymentToken JSON
456
- * (encrypted `paymentData` verbatim + `paymentMethod` + `transactionIdentifier`,
457
- * i.e. the PSP's `mobileToken` shape); Google: `tokenizationData.token` as
458
- * issued — relay it VERBATIM as the execute call's `wallet_payment_token`
459
- * (never parse, reshape or log it; max 16384 chars server-side). The rest is
460
- * non-sensitive display
739
+ * payment token serialized for the wire, in the PSP's `mobileToken` shape —
740
+ * Apple: the whole PKPaymentToken JSON (encrypted `paymentData` verbatim +
741
+ * `paymentMethod` + `transactionIdentifier`); Google: the whole
742
+ * `paymentMethodData` JSON (`type` + `description` + `info` +
743
+ * `tokenizationData`, the gateway-encrypted token inside). Relay it VERBATIM
744
+ * as the execute call's `wallet_payment_token` (never parse, reshape or log
745
+ * it; max 16384 chars server-side). The rest is non-sensitive display
461
746
  * metadata. The sheet has already closed successfully when this arrives —
462
747
  * sheet success means "tokenized", not "money moved"; the execute response
463
748
  * and the status feed own the top-up outcome, and `three_ds_state` is never
@@ -489,7 +774,7 @@ export interface PciWalletPaymentTokenDto {
489
774
  /** Apple's `transactionIdentifier` — absent on Google Pay (no analogue). */
490
775
  walletTransactionId?: string;
491
776
  }
492
- export type PciInitConfig = PciCollectInitConfig | PciCollectFieldInitConfig | PciRevealInitConfig | PciWalletProbeInitConfig | PciWalletCheckoutInitConfig;
777
+ export type PciInitConfig = PciCollectInitConfig | PciCollectFieldInitConfig | PciRevealInitConfig | PciWalletProbeInitConfig | PciWalletPreviewInitConfig | PciWalletCheckoutInitConfig;
493
778
  /** Extra non-sensitive data merged into the tokenize call by the frame. */
494
779
  export interface PciTokenizeTopUpRequest {
495
780
  kind: 'topup';
@@ -535,9 +820,24 @@ export interface PciTokenizeOctResult {
535
820
  bin: string;
536
821
  last4: string;
537
822
  }
823
+ /**
824
+ * How a failed collect request is classified: the mobile SDK's codes. A FROZEN set of six, safe to
825
+ * switch over exhaustively.
826
+ */
827
+ export type PciFrameErrorCode = 'unauthorized' | 'actionRequired' | 'updateRequired' | 'invalidInput' | 'temporary' | 'failed';
538
828
  export interface PciFrameError {
539
829
  message: string;
540
830
  status?: number;
831
+ /** Absent from a frame that predates the classification. */
832
+ code?: PciFrameErrorCode;
833
+ retryable?: boolean;
834
+ /**
835
+ * Why, when `code` alone cannot say. `invalidInput` covers both `cardAlreadyLinked` (enter another
836
+ * card) and `cardLimitReached` (remove one first).
837
+ *
838
+ * GROWABLE. Always handle the unknown case.
839
+ */
840
+ reason?: string;
541
841
  }
542
842
  interface Envelope {
543
843
  v: typeof PCI_PROTOCOL_VERSION;
@@ -552,6 +852,28 @@ export type PciHostToFrameMessage = Envelope & ({
552
852
  requestId: string;
553
853
  payload: PciTokenizeRequest;
554
854
  }
855
+ /** Reveal: mask or show the values in place (see
856
+ * `PciRevealInitConfig.masked`). An EVENT, not a request — no
857
+ * `requestId`, no reply, no timeout: the frame answers with
858
+ * `reveal-masked-changed` when the state actually changed. Sent only
859
+ * after init (the bridge drops anything earlier); older frames ignore it. */
860
+ | {
861
+ type: 'reveal-set-masked';
862
+ masked: boolean | PciRevealMaskedFields;
863
+ }
864
+ /** Collect: mask or show the CVV input in place (see
865
+ * `PciCollectMaskInit`). The collect twin of `reveal-set-masked` — an
866
+ * EVENT with no `requestId` and no reply; the frame answers with
867
+ * `collect-masked-changed` when the state actually changed. A frame
868
+ * without a CVV control (the OCT profile, a non-CVV field) and an older
869
+ * frame both ignore it. Its own type rather than a shared `set-masked`:
870
+ * the deployed reveal frames already answer to `reveal-set-masked`,
871
+ * each frame document handles only its own event, and the payloads
872
+ * differ (a boolean here, a boolean or a per-row map there). */
873
+ | {
874
+ type: 'collect-set-masked';
875
+ masked: boolean;
876
+ }
555
877
  /** Re-arm a mounted wallet checkout frame with a fresh quote (typically
556
878
  * after expiry) — re-renders in place, no remount. `config` rides along
557
879
  * because the fresh estimate's `provider` may differ from the last one. */
@@ -560,12 +882,27 @@ export type PciHostToFrameMessage = Envelope & ({
560
882
  requestId: string;
561
883
  quote: PciWalletQuote;
562
884
  config: PciWalletProviderConfig;
885
+ /** Token mode: a fresh top-up token for the fresh quote (the old one
886
+ * may have expired with it). Omitted = keep the mounted token. */
887
+ auth?: PciWalletCheckoutAuth;
888
+ /** The fresh estimate's `provider` (the desktop QR needs it). */
889
+ provider?: string;
563
890
  });
564
891
  export type PciFrameToHostMessage = Envelope & ({
565
892
  type: 'ready';
566
893
  } | {
567
894
  type: 'change';
568
895
  state: PciCollectChangeState;
896
+ }
897
+ /** The collect CVV input's masked state as applied: once at init (an
898
+ * older frame never sends it — that is how a host tells) and after every
899
+ * change, whoever made it (`reason`). Sent only by a frame that renders
900
+ * a CVV control. A boolean and a reason — never the value, its length
901
+ * or anything derived from it. */
902
+ | {
903
+ type: 'collect-masked-changed';
904
+ masked: boolean;
905
+ reason: PciCollectMaskedReason;
569
906
  } | {
570
907
  type: 'resize';
571
908
  height: number;
@@ -581,6 +918,27 @@ export type PciFrameToHostMessage = Envelope & ({
581
918
  type: 'reveal-copied';
582
919
  field: PciRevealField;
583
920
  }
921
+ /** The reveal frame's masked state as applied — the state of every
922
+ * rendered MASKABLE row (number, expiry, cvv, pin; the cardholder row is
923
+ * never masked and is not listed, so "every value true" means all
924
+ * hidden): once at init (confirming the `masked` option was honoured)
925
+ * and after every change, whoever made it (`reason`). `field`
926
+ * names the one row the user toggled or the timer re-masked; a host
927
+ * `reveal-set-masked` and the init report carry no `field`. Metadata
928
+ * only: field names, booleans, a reason. */
929
+ | {
930
+ type: 'reveal-masked-changed';
931
+ masked: PciRevealMaskedState;
932
+ field?: PciRevealField;
933
+ reason: PciRevealMaskedReason;
934
+ }
935
+ /** `revealGate: 'host'` only: the user asked to reveal a masked row with
936
+ * the in-frame toggle. The row stays masked until the host answers with
937
+ * `reveal-set-masked`. Field name only. */
938
+ | {
939
+ type: 'reveal-requested';
940
+ field: PciRevealField;
941
+ }
584
942
  /** Wallet checkout lifecycle. `sheet-open` = the OS wallet sheet is up. */
585
943
  | {
586
944
  type: 'wallet-state';
@@ -614,6 +972,32 @@ export type PciFrameToHostMessage = Envelope & ({
614
972
  | {
615
973
  type: 'wallet-token';
616
974
  token: PciWalletPaymentTokenDto;
975
+ }
976
+ /** TOKEN MODE: the frame executed the top-up itself — the host shows the
977
+ * outcome (and reconciles by status). Never sent alongside `wallet-token`. */
978
+ | {
979
+ type: 'wallet-executed';
980
+ result: PciWalletExecuteResult;
981
+ }
982
+ /** TOKEN MODE: the execute call failed — see `PciWalletExecuteError`. The
983
+ * frame keeps its buttons disabled until a `wallet-update` re-arms it. */
984
+ | {
985
+ type: 'wallet-execute-failed';
986
+ error: PciWalletExecuteError;
987
+ }
988
+ /** PREVIEW: the sheet closed. `trigger` — opened by `autoOpen` or by a tap. */
989
+ | {
990
+ type: 'wallet-preview-closed';
991
+ outcome: PciWalletPreviewOutcome;
992
+ trigger: 'auto' | 'button';
993
+ statusCode?: string;
994
+ }
995
+ /** PREVIEW, with `autoOpen`: whether the sheet opened without a tap, sent
996
+ * once the attempt settles. `false` leaves the frame's Google Pay button
997
+ * as the way in. */
998
+ | {
999
+ type: 'wallet-preview-auto';
1000
+ opened: boolean;
617
1001
  } | {
618
1002
  type: 'result';
619
1003
  requestId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;8DAE8D;AAC9D,eAAO,MAAM,oBAAoB,EAAE,MAAwB,CAAC;AAE5D,8DAA8D;AAC9D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,iBAAiB,CA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AAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,wBAAwB,CAAA;CAAE;AAC3D;+EAC+E;GAC7E;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE;AAC7D;2EAC2E;GACzE;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,KAAK,EAAE,qBAAqB,CAAA;CAAE;AACjE,+EAA+E;GAC7E;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,uBAAuB,CAAC;IACjC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACH;;qBAEqB;GACnB;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CACzE,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { PciWalletQuote } from './protocol.js';
2
+ /**
3
+ * DIRECT standalone launch (WPAY-4431, store-less variant): everything the
4
+ * checkout needs rides the URL fragment of `wallet-checkout.html` — the
5
+ * top-up token, the quote, the provider NAME and an optional return link.
6
+ * No session on the frames service: the page resolves the provider block
7
+ * itself from the public BaaS config (`GET /api/v1/config` →
8
+ * `topup.providers[name]`), so a QR or a Custom Tab URL stays short. The
9
+ * token dominates the length; a shorter backend token shrinks the code.
10
+ *
11
+ * The fragment never reaches a server, but a browser keeps the URL it opened
12
+ * in its history — use this form only with a token that is bound to the
13
+ * estimation and single-use, or in a dev build.
14
+ */
15
+ export interface PciWalletLaunchParams {
16
+ checkoutToken: string;
17
+ quote: PciWalletQuote;
18
+ /** The estimate's `provider` — selects the block in the public config. */
19
+ provider: string;
20
+ /** The link the result screen offers as "Return to the app": an `https`
21
+ * App Link / Universal Link (preferred) or the app's own scheme — see
22
+ * {@link resolveWalletReturnUrl} for what is refused. */
23
+ returnUrl?: string;
24
+ }
25
+ /** Fragment keys (single letters: the fragment is QR payload). */
26
+ export declare const PCI_WALLET_LAUNCH_KEYS: {
27
+ readonly token: "t";
28
+ readonly estimationId: "e";
29
+ readonly sourceAmount: "s";
30
+ readonly destinationAmount: "d";
31
+ readonly fee: "f";
32
+ readonly expiresAt: "x";
33
+ readonly provider: "p";
34
+ readonly returnUrl: "r";
35
+ };
36
+ /** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<return link>]`
37
+ * (no leading `#`). Throws a `TypeError` for a `returnUrl` the frame would
38
+ * refuse (the frame ignores such a link silently — fail here, at build
39
+ * time, instead). The raw value is encoded, never a normalised form, so the
40
+ * fragment stays byte-identical across the SDKs. */
41
+ export declare const buildWalletLaunchFragment: (params: PciWalletLaunchParams) => string;
42
+ /** The full URL to open top-level (Custom Tab) or to encode in a QR. */
43
+ export declare const buildWalletLaunchUrl: (frameOrigin: string, params: PciWalletLaunchParams, client?: string) => string;
44
+ //# sourceMappingURL=walletLaunch.d.ts.map