The app runs fine on the device and simulator and we are able to build an archive without any issues.
The issue is when we want to upload the build to the app store using Xcode 12.5, we get the following error:
Solved this error using pod 'Stripe', '19.4.1'
So if someone faced this error using Xcode 12.5 or above then use the above pod version.