Type Alias EmbeddedFormSheetAction

EmbeddedFormSheetAction:
    | {
        type: "confirm";
        onFormSheetConfirmComplete?: (
            result: EmbeddedPaymentElementResult,
        ) => void;
    }
    | { type: "continue" }

Describes the action performed when the bottom button in the embedded payment form sheet is tapped. The embedded view may show payment method options such as "Card". When selected, a form sheet appears for customers to input their payment details. At the bottom of that form sheet is a button. This type determines what tapping that button does:

  • In the confirm case, the button says “Pay” or “Set up” and triggers confirmation of the payment or setup intent inside the sheet.
  • In the continue case, the button says “Continue” and simply dismisses the sheet. The payment or setup is then confirmed outside the sheet, typically in your app.

Type declaration

  • {
        type: "confirm";
        onFormSheetConfirmComplete?: (result: EmbeddedPaymentElementResult) => void;
    }
    • type: "confirm"

      The button says “Pay” or “Set up”. When tapped, it confirms the payment or setup directly within the form sheet.

      Callback invoked with the result of the confirmation. You can use this to show a success message or handle errors.

    • OptionalonFormSheetConfirmComplete?: (result: EmbeddedPaymentElementResult) => void
  • { type: "continue" }
    • type: "continue"

      The button says “Continue”. When tapped, the form sheet closes without confirming anything. Use this when you want to handle confirmation elsewhere in your app after the customer has filled in their details.

MMNEPVFCICPMFPCPTTAAATR