Skip to content

feat: add Apple Pay support to Checkout Components (ACC-6923)#374

Closed
OnurVar wants to merge 2 commits into
ov/feat/ACC-6923-google-pay-componentfrom
ov/feat/ACC-6923-apple-pay-component
Closed

feat: add Apple Pay support to Checkout Components (ACC-6923)#374
OnurVar wants to merge 2 commits into
ov/feat/ACC-6923-google-pay-componentfrom
ov/feat/ACC-6923-apple-pay-component

Conversation

@OnurVar

@OnurVar OnurVar commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Apple Pay flows through the generic usePrimerPaymentMethod('APPLE_PAY') — no bespoke useApplePay hook. It rides the same nativeUi path as Google Pay: the prebuilt method row (or your own button) calls start(), the native Headless SDK presents the sheet, and the outcome arrives on the shared paymentOutcome. Second step of the APM hook unification (after Google Pay, #376).

  • Apple Pay is iOS-only: isAvailable is false on Android even if the SDK lists APPLE_PAY — the one Apple-Pay-specific rule, in internal/applePay.ts (mirror of internal/googlePay.ts).
  • startNativeUI('APPLE_PAY') rejects when unavailable (e.g. on Android), so a custom layout that skips the isAvailable check still fails safely instead of making a native call.
  • No native-bridge or provider re-architecture — the existing Headless NATIVE_UI path already drives Apple Pay. Apple Pay renders as a standard method row (no dedicated native button).

Breaking change

useApplePay and the ApplePayController / ApplePayAvailabilityError types are removed — use usePrimerPaymentMethod('APPLE_PAY') and narrow on kind: 'nativeUi'.

Base

ov/feat/ACC-6923-google-pay-component (#376) — the generic-hook foundation.

Jira

ACC-6923

Test plan

  • yarn typecheck / yarn lint — clean
  • yarn jest — green; new usePrimerPaymentMethod Apple Pay cases cover iOS availability + start, and the Android guard (unavailable + start() rejects, no native call)
  • Manual iOS — Apple Pay in the method list → native sheet → onCheckoutComplete (sandbox payment succeeded)

@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch from 2827fb2 to 427bd77 Compare May 25, 2026 02:09
@OnurVar OnurVar force-pushed the ov/feat/components-split branch 2 times, most recently from 8373640 to 977e7c7 Compare May 25, 2026 23:40
@OnurVar OnurVar self-assigned this May 26, 2026
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch from 427bd77 to 99b5845 Compare June 1, 2026 13:18
@OnurVar OnurVar changed the base branch from ov/feat/components-split to ov/feat/components June 1, 2026 13:18
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch from 99b5845 to f158619 Compare June 1, 2026 22:13
@OnurVar OnurVar changed the base branch from ov/feat/components to ov/feat/ACC-6923-google-pay-component June 1, 2026 22:13
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-google-pay-component branch from 7bf9224 to 11780ee Compare June 10, 2026 13:57
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch from f158619 to bfa1508 Compare June 10, 2026 15:05
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-google-pay-component branch from 11780ee to 6416d4c Compare June 10, 2026 23:18
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch 2 times, most recently from 13c6404 to 67e4ba4 Compare June 15, 2026 12:08
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-google-pay-component branch from 55a7105 to 5444ed8 Compare June 15, 2026 12:08
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-google-pay-component branch from 5444ed8 to a3e37a7 Compare June 17, 2026 19:52
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch from 67e4ba4 to 0b10a55 Compare June 17, 2026 19:52
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-google-pay-component branch from a3e37a7 to bc561f2 Compare June 17, 2026 20:49
@OnurVar OnurVar force-pushed the ov/feat/ACC-6923-apple-pay-component branch from 0b10a55 to 163c626 Compare June 23, 2026 10:42
@OnurVar

OnurVar commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the consolidated APM-unification stack — #392 (native-UI) → #393 (bank) → #394 (raw-data) → #395 (QR) → #396 (Klarna). Closing in favor of those; the new stack carries the same work plus the review fixes.

@OnurVar OnurVar closed this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant