Skip to content

Commit 36b95bd

Browse files
authored
Update sheet.mdx (#1495)
1 parent f7d4b46 commit 36b95bd

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

docs/sheet.mdx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void main() async {
4545

4646
Use your [test mode](https://stripe.com/docs/keys#obtain-api-keys) keys while you test and develop, and your [live mode](https://stripe.com/docs/keys#test-live-modes) keys when you publish your app.
4747

48-
## 2. Add an enpoint [Server Side]
48+
## 2. Add an endpoint [Server Side]
4949

5050
First, you need a Stripe account. [Register now](https://dashboard.stripe.com/register).
5151

@@ -100,11 +100,14 @@ Future<void> initPaymentSheet() async {
100100
customerEphemeralKeySecret: data['ephemeralKey'],
101101
customerId: data['customer'],
102102
// Extra options
103-
testEnv: true,
104-
applePay: true,
105-
googlePay: true,
103+
applePay: const PaymentSheetApplePay(
104+
merchantCountryCode: 'US',
105+
),
106+
googlePay: const PaymentSheetGooglePay(
107+
merchantCountryCode: 'US',
108+
testEnv: true,
109+
),
106110
style: ThemeMode.dark,
107-
merchantCountryCode: 'DE',
108111
),
109112
);
110113
setState(() {
@@ -189,7 +192,7 @@ Make sure to set your Apple merchant ID `Stripe.merchantIdentifier` when you ini
189192
```
190193

191194

192-
then add `applePay: PaymentSheetApplePay()` with your and the country code of your business.
195+
then add `applePay: PaymentSheetApplePay()` with the country code of your business.
193196

194197
```dart
195198
Stripe.instance.initPaymentSheet(
@@ -234,15 +237,17 @@ For more details, see Google Pay’s Set up Google Pay API for Android.
234237

235238
#### Add Google Pay
236239

237-
To add Google Pay to your integration, set `googlePay: true` with your Google Pay environment (production or test) and the country code of your business.
240+
To add Google Pay to your integration, set `googlePay: PaymentSheetGooglePay()` and specify the country code of your business within that.
238241

239242
```dart
240243
Stripe.instance.initPaymentSheet(
241244
paymentSheetParameters: SetupPaymentSheetParameters(
242245
merchantDisplayName: 'Flutter Stripe Store Demo',
243246
//...
244-
testEnv: true,
245-
merchantCountryCode: "US",
247+
googlePay: const PaymentSheetGooglePay(
248+
merchantCountryCode: 'US',
249+
testEnv: true,
250+
),
246251
),
247252
);
248253
```

0 commit comments

Comments
 (0)