From 3ef413a10e71189664798e1d6fd183e70612da5c Mon Sep 17 00:00:00 2001 From: Mohamed S Abdrabou <38924585+moesaid@users.noreply.github.com> Date: Tue, 26 Sep 2023 15:04:58 -0400 Subject: [PATCH] Update sheet.mdx (#1401) --- docs/sheet.mdx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/sheet.mdx b/docs/sheet.mdx index 8b7e6727c..5703d094d 100644 --- a/docs/sheet.mdx +++ b/docs/sheet.mdx @@ -175,15 +175,31 @@ Add the Apple Pay capability to your app. In Xcode, open your project settings, #### Add Apple Pay -To add Apple Pay to PaymentSheet, set `applePay: true` with your Apple merchant ID and the country code of your business. +To add Apple Pay to PaymentSheet, +Make sure to set your Apple merchant ID `Stripe.merchantIdentifier` when you init stripe instance in your `main.dart` + +[Check stripe docs](https://support.stripe.com/questions/enable-apple-pay-on-your-stripe-account) for enabling Apple Pay on your Stripe account & create merchantIdentifier + + +```dart + Stripe.publishableKey = stripePublishableKey; + Stripe.merchantIdentifier = 'merchant.flutter.stripe.test'; + Stripe.urlScheme = 'flutterstripe'; + await Stripe.instance.applySettings(); +``` + + +then add `applePay: PaymentSheetApplePay()` with your and the country code of your business. ```dart Stripe.instance.initPaymentSheet( paymentSheetParameters: SetupPaymentSheetParameters( merchantDisplayName: 'Flutter Stripe Store Demo', //... - merchantId: "merchant.com.your_app_name", - merchantCountryCode: "US + applePay: const PaymentSheetApplePay( + buttonType: PlatformButtonType.buy, + merchantCountryCode: 'US', + ), ), ); ```