Flutter SDK - Card entry giving unexpected error in IOS

Error: Something went wrong. Please contact the developer of this application and provide them with this error code: unexpected.
I am using min ios deployment version 13.0 and testing on an IOS 16.4.
I know the appID is right; I didn’t supply the flutter project anywhere the access token.
The card I am supplying is valid and I tried multiple ones.

I am using latest SDK 1.7.8.

I have included this script in the runner:


:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Flutter Plugin: In-App Payments SDK
In-App Payments SDK Quickstart
Square Developer Documentation

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The error message you’re seeing typically indicates that there’s an issue with the initialization of the In-App Payments SDK. Here are a few things you can check:

  1. Make sure you’ve correctly set your Square application ID in your application delegate. This should be done before initializing the In-App Payments SDK. If you don’t set your Square application ID before initializing the SDK, your application may terminate with an uncaught exception.

  2. Ensure that your Square application ID is active and correctly configured in the Square Developer Dashboard.

  3. If you’re testing in the Square Sandbox, make sure you’ve set the Developer Dashboard to Sandbox mode before initializing the SDK.

  4. Check that you’ve correctly implemented the necessary methods for handling payment tokens and completing transactions.

  5. Make sure you’ve correctly configured your project for Apple Pay if you’re using it, including uploading the correct Apple Pay certificate to the Developer Dashboard and updating your Apple Pay merchant ID in Xcode.

If you’ve checked all of these and are still encountering the issue, it may be helpful to check the logs for any additional error messages or warnings that could indicate what’s going wrong.

This answer was reviewed by @Bryan-Square.