The following is a set of guidelines for contributing to this project. Please take a moment to read through them before submitting your first PR.
This is a monorepo containing the Swift, Android, React Native, and Web implementations of the Shopify Checkout Kit. Each platform has its own conventions, tooling, and release process; the shared guidelines below apply to all of them.
This project and everyone participating in it are governed by the Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to opensource@shopify.com.
- Reporting issues with existing features
- Bug fixes
- Performance improvements
- Documentation
- Usability improvements
- Additional dependencies that limit SDK use (e.g. unnecessary Swift or Android dependencies)
- Any changes that break existing tests
- Any changes without sufficient tests
When in doubt about whether we will be interested in including a new feature, please open an issue to propose the feature so we can confirm scope before it is implemented.
NOTE: Issues that have not been active for 30 days will be marked as stale, and subsequently closed after a further 7 days of inactivity.
- Fork the repo and branch off of
main. - Create a feature branch in your fork.
- Make changes and add any relevant tests.
- Run the platform-specific formatter / linter (see below).
- Verify the changes locally (e.g. via the platform's sample app).
- Commit your changes and push.
- Ensure all checks (tests, lint) are passing in GitHub.
- Open a pull request with a detailed description of what is changing and why.
Shopify employees can use the root dev.yml from the repo root or any platform
directory:
dev up
dev checkdev up performs full DevHub provisioning, then runs Checkout Kit's repo-owned
setup steps. Those repo-owned steps are summarized at the end so a Swift,
Android, React Native, or Web setup failure is visible without hiding later
platform results. If a setup step fails, fix it and rerun dev up.
Setup creates or syncs sample app storefront configuration from the repo-root
.env. If .env is missing, setup prompts for required storefront values and
then generates the Android, Swift, and React Native sample config files.
Optional Apple Pay and Customer Account API values are preserved if already set,
but dev up leaves missing optional values blank instead of prompting.
Platform-scoped commands are available as dev android <command>, dev swift <command>, dev react-native <command> (or dev rn), and dev web <command> after setup. Protocol schema/model commands are available as dev protocol <command>. For cross-platform changes, use dev lint, dev test, dev check, dev format, and dev build.
React Native sample apps can be run against local in-repo SDK sources with
dev rn ios --local or dev rn android --local. The Web sample accepts a
checkout URL directly and does not use the shared storefront credential files.
Sample app storefront configuration is generated from the repo-root .env.
Shopify employees get this through dev up. External contributors can copy
.env.example to .env, fill in local storefront values, then run
scripts/setup_storefront_env from the repo root.
This project uses Mint to manage Swift linting tools (SwiftLint and SwiftFormat) at pinned versions via platforms/swift/Mintfile. This ensures consistent formatting across all contributors and CI.
Shopify employees (from the repo root):
dev upExternal contributors:
brew install mint
cd platforms/swift && mint bootstrapcd platforms/swift && ./Scripts/lint fixThe library's public API is tracked via committed baselines under platforms/swift/api/, one JSON file per module (EmbeddedCheckoutProtocol.json, ShopifyCheckoutKit.json, ShopifyAcceleratedCheckouts.json). They are produced by xcrun swift-api-digester -dump-sdk against the built .swiftmodule files. The unified Breaking Changes CI workflow runs dev swift api check on every PR that touches Swift sources and fails if the digester output for any module diverges from its committed baseline.
If your change intentionally modifies the public API:
- Run
dev swift api dumpfrom the repo root to regenerate the baselines. - Review the diff in
platforms/swift/api/*.jsonalongside your code changes. - Commit the updated JSON files in the same PR.
When dev swift api check fails, it prints both the unified diff and a swift-api-digester -diagnose-sdk summary categorizing the changes (removed, renamed, type/protocol/inheritance changes). Use the diagnose summary to decide whether the diff is intentional.
Open a pull request with the following changes:
- Bump the package version in
platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift. - Bump the metadata version in
platforms/swift/Sources/ShopifyCheckoutKit/MetaData.swift. - Bump the podspec version in
ShopifyCheckoutKit.podspec(at the repo root).
All Swift version declarations must match exactly. Supported release versions are X.Y.Z and prerelease versions are X.Y.Z-{alpha|beta|rc}.N.
Once merged, run the Release package workflow:
- Select
iOSas the platform. - Enter the expected version. The workflow reads the SDK version from the checked-in files and fails if the typed version does not match.
- Select
Dry runfirst to review the release plan without creating a release. - Rerun with
Draft releaseto create a draft GitHub Release with generated release notes and the bare semver tag (e.g.4.0.1) for human review. - Publish the draft release when ready. Publishing the draft kicks off the Swift publish workflow, which publishes the new version to CocoaPods.
This project uses detekt for Kotlin linting and formatting. From platforms/android/:
./gradlew detekt --auto-correctTo check for lint issues without auto-correcting:
./gradlew detektThe Android-facing public APIs are tracked via committed baselines managed by the binary-compatibility-validator Gradle plugin:
platforms/android/lib/api/lib.apiforcom.shopify:checkout-kit.protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiforcom.shopify:embedded-checkout-protocol.
The unified Breaking Changes CI workflow runs ./gradlew :lib:apiCheck from platforms/android and ./gradlew :embedded-checkout-protocol:apiCheck from protocol/languages/kotlin on every PR that touches Android or Kotlin protocol sources. It fails if either compiled public API diverges from the committed baselines.
If your change intentionally modifies the public API:
- Run
dev android api dumpfrom the repo root to regenerate both baselines. For project-scoped updates, run./gradlew :lib:apiDumpfromplatforms/android/or./gradlew :embedded-checkout-protocol:apiDumpfromprotocol/languages/kotlin/. - Review the relevant
.apidiff alongside your code changes. - Commit the updated
.apifile in the same PR.
If you did not intend to change public API and apiCheck is failing, the diff shows what your change inadvertently affected — treat it as a signal that something in your PR has consumer-visible impact.
Open a pull request with the following changes:
- Bump
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.toml. - Update
protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public protocol API changed.
Supported protocol release versions are YYYY.MM.DD.PATCH and prerelease versions are YYYY.MM.DD.PATCH-{alpha|beta|rc}.N.
Once merged, run the Release package workflow:
- Select
Embedded Checkout Protocolas the platform. - Enter the expected version. The workflow reads the protocol version from
platforms/android/gradle/libs.versions.tomland fails if the typed version does not match. - Select
Dry runfirst to review the release plan without creating a release. - Rerun with
Draft releaseto create a draft GitHub Release with theembedded-checkout-protocol/-prefixed tag (e.g.embedded-checkout-protocol/2026.04.08.1-alpha.1) for human review. - Publish the draft release when ready. Publishing the draft kicks off the Embedded Checkout Protocol publish workflow. A manual approval by a maintainer is required before publication to Maven Central.
Open a pull request with the following changes:
- Bump
checkoutKitAndroidinplatforms/android/gradle/libs.versions.toml. - If the Android Kit release depends on a new protocol version, release
embeddedCheckoutProtocolAndroidfirst.
Supported release versions are X.Y.Z and prerelease versions are X.Y.Z-{alpha|beta|rc}.N.
Once merged, run the Release package workflow:
- Select
Androidas the platform. - Enter the expected version. The workflow reads the SDK version from
platforms/android/gradle/libs.versions.tomland fails if the typed version does not match. - Select
Dry runfirst to review the release plan without creating a release. - Rerun with
Draft releaseto create a draft GitHub Release with generated release notes and theandroid/-prefixed tag (e.g.android/4.0.1) for human review. - Publish the draft release when ready. Publishing the draft kicks off the Android publish workflow. The workflow verifies that
com.shopify:embedded-checkout-protocolis already available on Maven Central before publishingcom.shopify:checkout-kit. A manual approval by a maintainer is required before publication to Maven Central.
The React Native package reads its published native SDK dependency versions from platforms/react-native/modules/@shopify/checkout-kit-react-native/package.json:
"checkoutKit": {
"nativeSdkVersions": {
"ios": "4.0.0-alpha.1",
"android": "4.0.0-alpha.1"
}
}When updating the Swift or Android SDK version that React Native should consume, update the matching checkoutKit.nativeSdkVersions entry in this package file after the native SDK version has been published. These values drive RNShopifyCheckoutKit.podspec for iOS and the module/sample Gradle dependencies for Android, so they must stay aligned with the published native SDK versions used by the React Native release. Android CI uses the published Maven artifact by default, so nativeSdkVersions.android must reference a com.shopify:checkout-kit version that is already available from Maven Central.
For coordinated native and React Native releases, publish Android and Swift first, then update these React Native native SDK version pointers and publish React Native.
The library's public API is tracked via a committed report at platforms/react-native/modules/@shopify/checkout-kit-react-native/api/checkout-kit-react-native.api.md, generated by @microsoft/api-extractor from the bob-produced .d.ts files. The unified Breaking Changes CI workflow runs dev rn api check on every PR that touches React Native sources and fails if the regenerated report diverges from the committed one.
If your change intentionally modifies the public API:
- Run
dev rn api dumpfrom the repo root to regenerate the report. - Review the diff in
platforms/react-native/modules/@shopify/checkout-kit-react-native/api/checkout-kit-react-native.api.mdalongside your code changes. - Commit the updated
.api.mdfile in the same PR.
If you did not intend to change public API and api:check is failing, the diff shows what your change inadvertently affected — treat it as a signal that something in your PR has consumer-visible impact.
Open a pull request with the following changes:
- Bump the
versioninplatforms/react-native/modules/@shopify/checkout-kit-react-native/package.json. - Update
checkoutKit.nativeSdkVersions.iosandcheckoutKit.nativeSdkVersions.androidinplatforms/react-native/modules/@shopify/checkout-kit-react-native/package.jsonto the published native SDK versions React Native should consume.
Supported release versions are X.Y.Z and prerelease versions are X.Y.Z-{alpha|beta|rc}.N.
Once merged, run the Release package workflow:
- Select
React Nativeas the platform. - Enter the expected version. The workflow reads the SDK version from
platforms/react-native/modules/@shopify/checkout-kit-react-native/package.jsonand fails if the typed version does not match. - Select
Dry runfirst to review the release plan without creating a release. - From the dry-run job summary, copy the generated
gh workflow runcommand to create aDraft releasewithout retyping the validated version. Running it creates a draft GitHub Release with generated release notes and thereact-native/-prefixed tag (e.g.react-native/4.0.1) for human review. - Publish the draft release when ready. Publishing the draft kicks off the React Native publish workflow, which publishes
@shopify/checkout-kit-react-nativeto npm.