← All articles

Use Stripe on Mobile Too — Capacitor Stripe Plugin Updates in 2024

A 2024 recap of the Capacitor Stripe plugins I maintain: Capacitor v6, Stripe Terminal RC, Swift Package Manager support, and a full Kotlin migration on Android.

Published
Use Stripe on Mobile Too — Capacitor Stripe Plugin Updates in 2024 cover image

Introducing the Capacitor Stripe plugins

Since around 2021, I have maintained the Capacitor Stripe plugins.

https://github.com/capacitor-community/stripehttps://github.com/capacitor-community/stripe

Capacitor is a library that turns web apps into iOS and Android apps so you can publish on the App Store and Google Play. Combined with the Capacitor Stripe plugins, native APIs let you do things like this from a web app:

@capacitor-community/stripe

Internet payments with Stripe. Digital services must use in-app purchases, but physical goods and similar cases can use your own payment service. That applies to your own storefront apps and, if you build the platform well, Amazon-like services on a web-app base.

@capacitor-community/stripe-identity

Identity verification with Stripe Identity. Beyond finance, lending and similar services benefit from identity checks to avoid trouble. You can ship SNS with verification, bike-sharing apps, and more.

@capacitor-community/stripe-terminal

In-person payments—not supported in Japan yet. The simplest no-hardware option is Tap to Pay. On its own in Japan, PayPay is convenient and multi-payment terminals like stera terminal exist. Combined with online payments and identity verification, though, you can tie in-person payments to individual users. That matters—for example hold items for pickup or charge after a reservation linked to the user. It is popular in regions where the service is already live.

At the moment I maintain these three plugins, and npm weekly downloads show steady, wide adoption even if not explosive growth.

How these plugins evolved in 2024

In general I add features gradually, tidy things up, and keep up with official SDK updates. Here are the biggest changes.

Capacitor v6 support

Capacitor v6 shipped in January. I had been waiting for it. On Capacitor v5, Android compileSdkVersion was 33. From Stripe Identity Android SDK 20.35 onward, SDK 34 was required, which made Capacitor v5 support awkward. You could change compileSdkVersion and the Android SDK version in variables.gradle, but with Capacitor defaulting to 33, I wanted to keep that default.

With v6, Android compileSdkVersion became 34. That let me default to the latest Stripe Identity Android SDK. Great!

Capacitor Stripe Terminal reached RC

I had been developing `@capacitor-community/stripe-terminal in small steps since last year. Core APIs were done, but Stripe Terminal has a lot of APIs. Because it drives external payment terminals, it is not just "take payment"—you also cancel after payment and customize on-screen messages during checkout. Up to that point, fine—but there is also:

  • Check for terminal firmware updates, run updates, track update progress
  • Check battery level
  • Simulator APIs for debugging when the user has no physical terminal
  • Fetch messages from the terminal when there is no built-in display, so the app can show them

I implemented these and brought the plugin to RC—that was probably my biggest push this year. Users are growing steadily, so I plan to stabilize it soon. Japan is still unsupported, though (second time I mention that).

Swift Package Manager support

From Capacitor v6, Swift Package Manager support is experimental. The iOS plugin structure was refreshed and became much simpler. Even the folder layout changed like this:

移行前
ios/
├── Plugin.xcodeproj/
├── Plugin.xcworkspace/
├── Plugin/
├── PluginTests/
└── Podfile
移行後
ios/
├── Sources/
├── Tests/
└── .gitignore

Simple. And without Xcode-generated project files, unexpected diffs disappeared—much cleaner. That helps plugin authors and, when you publish plugin code on GitHub and welcome contributions, makes the repo far easier for others to read. I am glad I did this.

Migration to Kotlin

Capacitor itself and its plugin template are written in Java. In Capacitor 1, Kotlin was not even at v1 yet, so I never considered it and kept the Capacitor Stripe plugins in Java for a long time. Years later, the Capacitor docs also explain how to use Kotlin in plugins.

https://capacitorjs.jp/docs/next/plugins/android#kotlin-%E3%82%92%E4%BD%BF%E3%81%86https://capacitorjs.jp/docs/next/plugins/android#kotlin-を使う

Kotlin v2 shipped too—fast, stable, and I noticed Stripe Android SDK types are all Kotlin now. I had used Kotlin partially for enums, but it is almost 2025, so why not—I migrated the entire Capacitor Stripe Android base to Kotlin. Much cleaner!!

https://github.com/capacitor-community/stripe/releases/tag/v6.4.1https://github.com/capacitor-community/stripe/releases/tag/v6.4.1

Summary

The Capacitor Stripe plugins kept evolving in 2024: Capacitor v6 support, Stripe Terminal RC, Swift Package Manager support, and a Kotlin migration, among other changes. They are easier to use and easier to develop against. I hope they continue to improve.

Try the latest Capacitor Stripe plugins!