Skip to content

Commit

Permalink
DOC: add confirmPaymentSheetPayment to the docs for handling custom flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Remon committed Aug 14, 2023
1 parent 7f9a745 commit fbdc8b1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/sheet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ Future<void> initPaymentSheet() async {
// 2. initialize the payment sheet
await Stripe.instance.initPaymentSheet(
paymentSheetParameters: SetupPaymentSheetParameters(
// Enable custom flow
customFlow: true,
// Set to true for custom flow
customFlow: false,
// Main params
merchantDisplayName: 'Flutter Stripe Store Demo',
paymentIntentClientSecret: data['paymentIntent'],
Expand Down Expand Up @@ -124,6 +124,12 @@ When the customer taps a **Checkout** button, call present to present the paymen
await Stripe.instance.presentPaymentSheet();
```

When you set `customFlow` to `true`, you need to handle the payment intent confirmation manually. You can do this by calling `confirmPaymentSheetPayment`.

```dart
await Stripe.instance.confirmPaymentSheetPayment();
```

Unless your business model requires immediate payment (e.g., an on-demand service), don’t assume you have received payment at this point. Instead, inform the customer that you confirmed their order and notify them by email when you fulfill their order in the next step.

>> ADD MORE PAYMENT METHODS
Expand Down

0 comments on commit fbdc8b1

Please sign in to comment.