Awesome Open Source
Awesome Open Source


This plugin is a basic implementation of Stripe and Apple Pay with the purpose of returning a useable stripe token.


  1. Follow the steps on to get your certs generated
  2. In your Xcode project, go to Capabilities and enable Apple Pay
  3. Install the plugin
cordova plugin add  \
	--variable STRIPE_PUBLISHABLE_KEY="pk_test_stripekey" \
	--variable APPLE_PAY_MERCHANT=""

Supported Platforms

  • iOS


  • ApplePay.getAllowsApplePay
  • ApplePay.setMerchantId
  • ApplePay.getStripeToken


Returns successfully if the device is setup for Apple Pay (correct software version, correct hardware & has card added).

ApplePay.getAllowsApplePay(successCallback, errorCallback);


Set your Apple-given merchant ID. This overrides the value obtained from ApplePayMerchant in Info.plist.

ApplePay.setMerchantId(successCallback, errorCallback, '');


Request a stripe token for an Apple Pay card.

  • amount (string)
  • description (string)
  • currency (uppercase string)
ApplePay.getStripeToken(successCallback, errorCallback, amount, description, currency);
	"token": "sometoken",
	"card": {
		"id": "cardid",
		"brand": "Visa",
		"last4": "1234",
		"exp_month": "01",
		"exp_year": "2050"



ApplePay.getAllowsApplePay(function() {

	ApplePay.getStripeToken(function(token) {
		alert('Your token is: ' +;
	}, function() {
		alert('Error getting payment info');
	}, '10.00', 'Delicious Cake', 'USD');

}, function() {
	alert('User does not have apple pay available');

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Plugin (113,597
Objective C (57,105
String (42,115
Card (18,762
Apple (8,387
Stripe (3,423
Pay (2,696
Apple Pay (135