Samsung Pay SDK for Flutter sample app

Sample apps aid you in understanding the SDK and implementing it in your app. Sample source code and APKs are included in the Samsung Pay SDK for Flutter, which can be downloaded from Downloads and resources.

The Samsung Pay SDK for Flutter sample app shows how to implement the payment sheet’s dynamic controls. You can leverage additional customer order and payment data, and create a more customized UI look and feel.

The following payment sheet controls are available:

  • AddressControl
  • PlainTextControl
  • AmountBoxControl
  • SpinnerControl

You can apply controls to suit a particular purpose or need. For details on each control, see Samsung Pay SDK for Android sample app.

Samsung Pay SDK for Flutter sample app

To display a custom error message on the payment sheet to inform the customer of any foreseen error scenarios, use the updateSheet() method with a customErrorMessage value:

void updateSheet(CustomSheet customSheet, {int? customErrorCode, String? customErrorMessage})

// Update sheet with customErrorCode error code
samsungPaySdkFlutterPlugin?.updateSheet(customSheet, customErrorCode: 1, customErrorMessage:  "Phone number entered is not valid. Please change your phone number.");