Skip to content

Pin the Apple Pay merchant identifier per sample app - #578

Merged
kieran-osgood-shopify merged 1 commit into
mainfrom
kieran-osgood/apple-pay-merchant-identifier
Aug 12, 2026
Merged

Pin the Apple Pay merchant identifier per sample app#578
kieran-osgood-shopify merged 1 commit into
mainfrom
kieran-osgood/apple-pay-merchant-identifier

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Why

Apple Pay requires a merchant identifier, our samples got that value from multiple locations (react native had both a dynamic runtime value and a static value in the entitlements, leading to confusion)
Swift used a dynamic value, but used a name that sounds like storefront configuration

What

Updated all samples to use APPLE_PAY_MERCHANT_IDENTIFIER from the .env
Propagate the value to entitlements via xcconfig and xcodegen
Going forwards updating this value is a single line update for each app respectively

How

One part that was tricky was the react-native one as we dont use xcodegen the ios files are committed, which means xcode expects a file reference to the xcconfig in the pbxproject, but we generate the xcconfig from .env

To workaround this I used an empty Config.xcconfig committed, and inside of it use an include directive to pull in an optional Storefront.xcconfig

image.png

This gives us the benefit of compilation working from a clean clone for CI and matching the react-native/swift DX

Additional

To avoid breaking peoples dev up on the next pull, the existing STOREFRONT_MERCHANT_IDENTIFIER .env value will be temporarily mapped to the new values

(it'll become moot once the PR's above merge to generate the .env)


Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Aug 5, 2026
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch 2 times, most recently from 3326bed to ef9dbba Compare August 5, 2026 11:35
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from ef9dbba to 578c24e Compare August 5, 2026 11:45
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 578c24e to ff257a4 Compare August 5, 2026 12:33
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the ejson branch 2 times, most recently from 92ea555 to b9ad2ea Compare August 6, 2026 15:48
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from ff257a4 to 055b73d Compare August 6, 2026 15:48
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 055b73d to 331300f Compare August 6, 2026 17:30
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 331300f to 0b7623f Compare August 7, 2026 11:05
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch 2 times, most recently from 97b992e to 4652f31 Compare August 7, 2026 13:51
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 4652f31 to fd8babb Compare August 7, 2026 14:15
@kieran-osgood-shopify
kieran-osgood-shopify marked this pull request as ready for review August 7, 2026 15:40
@kieran-osgood-shopify
kieran-osgood-shopify requested a review from a team as a code owner August 7, 2026 15:40
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
React Native npm tarball 101.6 KiB 101.6 KiB 0 B
React Native file breakdown
File Base Head Delta
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.ts 85.4 KiB 85.4 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.d.ts 53.0 KiB 53.0 KiB 0 B
ios/AcceleratedCheckoutButtons.swift 14.1 KiB 14.1 KiB 0 B
ios/ShopifyCheckoutKit.swift 13.5 KiB 13.5 KiB 0 B
src/components/AcceleratedCheckoutButtons.tsx 13.0 KiB 13.0 KiB 0 B
android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java 12.8 KiB 12.8 KiB 0 B
lib/commonjs/index.js 12.3 KiB 12.3 KiB 0 B
src/index.ts 12.2 KiB 12.2 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js 11.4 KiB 11.4 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js.map 10.4 KiB 10.4 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js 10.2 KiB 10.2 KiB 0 B
lib/module/index.js 10.2 KiB 10.2 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.ts 9.5 KiB 9.5 KiB 0 B
src/index.d.ts 9.1 KiB 9.1 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js.map 9.1 KiB 9.1 KiB 0 B
src/present-dispatcher.ts 8.0 KiB 8.0 KiB 0 B
lib/module/index.js.map 7.9 KiB 7.9 KiB 0 B
lib/commonjs/index.js.map 7.7 KiB 7.7 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.d.ts 7.6 KiB 7.6 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolRenameMap.ts 7.2 KiB 7.2 KiB 0 B
…and 110 smaller files

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.64% (307/335) 88.88% (176/198) 100% (81/81)

@bitrise

bitrise Bot commented Aug 7, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
React Native Install with Tophat
Swift Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
tests/shared/launch-smoke.yaml react-native ios latest iPhone 15
iOS 27 Beta
tests/shared/launch-smoke.yaml react-native android latest Google Pixel 9
Android 17.0
tests/shared/launch-smoke.yaml swift ios latest iPhone 15
iOS 27 Beta

kieran-osgood-shopify commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Aug 12, 8:19 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 12, 8:21 AM UTC: Graphite rebased this pull request as part of a merge.

@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from ejson to graphite-base/578 August 12, 2026 08:19
@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from graphite-base/578 to main August 12, 2026 08:19
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 4d12c99 to 4d99c1b Compare August 12, 2026 08:20
Comment thread platforms/swift/Samples/CheckoutKitSwiftDemo/project.yml Outdated
* storefront config. Keep it equal to ios/CheckoutKitReactNativeDemo/
* CheckoutKitReactNativeDemo.entitlements.
*/
const APPLE_PAY_MERCHANT_IDENTIFIER =

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this went the wrong direction due to entitlements, updating to use xcconfig now

@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 4d99c1b to 79bf223 Compare August 12, 2026 09:05
Apple Pay rejects a payment request whose merchant identifier is absent from
the entitlement of the app that sends it. Each sample registers a different
identifier, so a single shared storefront config key cannot be correct for
both apps at once.

Each sample now states its identifier next to its own entitlement. The Swift
demo defines it once in project.yml and the entitlement reads it back, so the
runtime value and the entitlement cannot drift. React Native uses a constant
matching its committed entitlements file.

STOREFRONT_MERCHANT_IDENTIFIER is now inert, so it leaves demo.ejson. It
still lingers in .env, .env.example and setup_storefront_env; the phase that
rewrites those code paths removes it there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/apple-pay-merchant-identifier branch from 79bf223 to c480ca8 Compare August 12, 2026 09:32
@kieran-osgood-shopify
kieran-osgood-shopify merged commit ff8a91b into main Aug 12, 2026
35 checks passed
@kieran-osgood-shopify
kieran-osgood-shopify deleted the kieran-osgood/apple-pay-merchant-identifier branch August 12, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants