From fbdc8b179bcdc0c082fb5339b017211d156768af Mon Sep 17 00:00:00 2001 From: Remon <> Date: Mon, 14 Aug 2023 19:52:22 +0100 Subject: [PATCH] DOC: add confirmPaymentSheetPayment to the docs for handling custom flow --- docs/sheet.mdx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/sheet.mdx b/docs/sheet.mdx index d9a1dcc54..8b7e6727c 100644 --- a/docs/sheet.mdx +++ b/docs/sheet.mdx @@ -91,8 +91,8 @@ Future 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'], @@ -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