@stripe/stripe-react-native 0.56.0 → 0.57.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +76 -118
- package/android/gradle.properties +1 -1
- package/android/settings.gradle +2 -0
- package/android/spotless.gradle +1 -1
- package/android/src/main/java/com/reactnativestripesdk/AuBECSDebitFormView.kt +24 -20
- package/android/src/main/java/com/reactnativestripesdk/CardFieldView.kt +20 -17
- package/android/src/main/java/com/reactnativestripesdk/CardFormView.kt +28 -32
- package/android/src/main/java/com/reactnativestripesdk/{CollectBankAccountLauncherFragment.kt → CollectBankAccountLauncherManager.kt} +23 -44
- package/android/src/main/java/com/reactnativestripesdk/CustomPaymentMethodActivity.kt +2 -0
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementView.kt +4 -11
- package/android/src/main/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManager.kt +52 -132
- package/android/src/main/java/com/reactnativestripesdk/EventEmitterCompat.kt +0 -8
- package/android/src/main/java/com/reactnativestripesdk/FakeOnrampSdkModule.kt +154 -0
- package/android/src/main/java/com/reactnativestripesdk/{FinancialConnectionsSheetFragment.kt → FinancialConnectionsSheetManager.kt} +43 -92
- package/android/src/main/java/com/reactnativestripesdk/GooglePayButtonView.kt +1 -1
- package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherManager.kt +107 -0
- package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherManager.kt +37 -0
- package/android/src/main/java/com/reactnativestripesdk/GooglePayRequestHelper.kt +7 -5
- package/android/src/main/java/com/reactnativestripesdk/NavigationBarManager.kt +31 -0
- package/android/src/main/java/com/reactnativestripesdk/NavigationBarView.kt +120 -0
- package/android/src/main/java/com/reactnativestripesdk/PaymentElementConfig.kt +228 -0
- package/android/src/main/java/com/reactnativestripesdk/{PaymentLauncherFragment.kt → PaymentLauncherManager.kt} +40 -77
- package/android/src/main/java/com/reactnativestripesdk/PaymentMethodCreateParamsFactory.kt +11 -20
- package/android/src/main/java/com/reactnativestripesdk/PaymentOptionDisplayDataMapper.kt +4 -6
- package/android/src/main/java/com/reactnativestripesdk/PaymentSheetAppearance.kt +409 -483
- package/android/src/main/java/com/reactnativestripesdk/{PaymentSheetFragment.kt → PaymentSheetManager.kt} +65 -300
- package/android/src/main/java/com/reactnativestripesdk/StripeAbstractComposeView.kt +53 -17
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt +227 -232
- package/android/src/main/java/com/reactnativestripesdk/StripeSdkPackage.kt +21 -2
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherManager.kt +78 -0
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetView.kt +52 -39
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressSheetViewManager.kt +2 -2
- package/android/src/main/java/com/reactnativestripesdk/customersheet/{CustomerSheetFragment.kt → CustomerSheetManager.kt} +64 -99
- package/android/src/main/java/com/reactnativestripesdk/customersheet/ReactNativeCustomerSessionProvider.kt +2 -3
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonManager.kt +5 -10
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/AddToWalletButtonView.kt +90 -77
- package/android/src/main/java/com/reactnativestripesdk/pushprovisioning/TapAndPayProxy.kt +6 -4
- package/android/src/main/java/com/reactnativestripesdk/utils/Errors.kt +13 -3
- package/android/src/main/java/com/reactnativestripesdk/utils/Extensions.kt +87 -11
- package/android/src/main/java/com/reactnativestripesdk/utils/KeepJsAwakeTask.kt +1 -1
- package/android/src/main/java/com/reactnativestripesdk/utils/Mappers.kt +178 -185
- package/android/src/main/java/com/reactnativestripesdk/utils/StripeUIManager.kt +62 -0
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java +118 -0
- package/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java +4 -0
- package/android/src/onramp/java/com/reactnativestripesdk/OnrampSdkModule.kt +922 -0
- package/android/src/test/java/com/facebook/testutils/shadows/ShadowArguments.kt +29 -0
- package/android/src/test/java/com/reactnativestripesdk/EmbeddedPaymentElementViewManagerTest.kt +163 -0
- package/android/src/test/java/com/reactnativestripesdk/PaymentElementConfigTest.kt +976 -0
- package/android/src/test/java/com/reactnativestripesdk/PaymentSheetAppearanceTest.kt +801 -0
- package/android/src/test/java/com/reactnativestripesdk/PaymentSheetManagerTest.kt +523 -0
- package/android/src/test/java/com/reactnativestripesdk/addresssheet/AddressSheetViewTest.kt +551 -0
- package/android/src/test/java/com/reactnativestripesdk/mappers/MappersTest.kt +567 -0
- package/android/src/test/java/com/reactnativestripesdk/mappers/PaymentOptionDisplayDataMapperTest.kt +456 -0
- package/android/src/test/java/com/reactnativestripesdk/pushprovisioning/PushProvisioningProxyTest.kt +43 -0
- package/android/src/test/resources/robolectric.properties +2 -0
- package/ios/AddressSheet/AddressSheetUtils.swift +3 -3
- package/ios/AddressSheet/AddressSheetView.swift +26 -26
- package/ios/AddressSheet/AddressSheetViewManager.swift +2 -2
- package/ios/ApplePayButtonManager.swift +1 -1
- package/ios/ApplePayButtonView.swift +9 -10
- package/ios/ApplePayUtils.swift +51 -51
- package/ios/ApplePayViewController.swift +25 -29
- package/ios/AuBECSDebitFormManager.swift +1 -1
- package/ios/AuBECSDebitFormView.swift +13 -15
- package/ios/CardFieldManager.swift +4 -4
- package/ios/CardFieldView.swift +9 -9
- package/ios/CardFormManager.swift +3 -3
- package/ios/CardFormView.swift +28 -28
- package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingView.swift +97 -0
- package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewController.swift +133 -0
- package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewManager.m +16 -0
- package/ios/ConnectAccountOnboarding/ConnectAccountOnboardingViewManager.swift +17 -0
- package/ios/CustomerSheet/CustomerSheetUtils.swift +15 -16
- package/ios/CustomerSheet/ReactNativeCustomerAdapter.swift +19 -19
- package/ios/EmbeddedPaymentElementView.swift +2 -2
- package/ios/Errors.swift +22 -23
- package/ios/FinancialConnections.swift +37 -37
- package/ios/Mappers.swift +212 -75
- package/ios/NavigationBarManager.m +13 -0
- package/ios/NavigationBarManager.swift +17 -0
- package/ios/NavigationBarView.swift +65 -0
- package/ios/NewArch/NavigationBarComponentView.h +10 -0
- package/ios/NewArch/NavigationBarComponentView.mm +86 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.h +1 -0
- package/ios/OldArch/StripeSdkEventEmitterCompat.m +7 -1
- package/ios/PaymentMethodFactory.swift +24 -41
- package/ios/PaymentOptionDisplayData+ReactNative.swift +4 -4
- package/ios/PaymentPassFinder.swift +9 -10
- package/ios/PaymentSheetAppearance.swift +137 -138
- package/ios/PushProvisioning/AddToWalletButtonManager.swift +2 -2
- package/ios/PushProvisioning/AddToWalletButtonView.swift +16 -18
- package/ios/PushProvisioning/PushProvisioningUtils.swift +11 -11
- package/ios/StripeContainerManager.swift +1 -1
- package/ios/StripeContainerView.swift +3 -3
- package/ios/StripeOnrampSdk.h +17 -0
- package/ios/StripeOnrampSdk.mm +158 -0
- package/ios/StripeSdk.mm +8 -0
- package/ios/StripeSdkEmitter.swift +4 -0
- package/ios/StripeSdkImpl+CustomerSheet.swift +31 -26
- package/ios/StripeSdkImpl+Embedded.swift +11 -9
- package/ios/StripeSdkImpl+PaymentSheet.swift +51 -42
- package/ios/StripeSdkImpl.swift +919 -191
- package/ios/UIColorExtension.swift +72 -0
- package/lib/commonjs/components/AddToWalletButton.js +1 -1
- package/lib/commonjs/components/AddToWalletButton.js.map +1 -1
- package/lib/commonjs/components/AddressSheet.js +1 -1
- package/lib/commonjs/components/AddressSheet.js.map +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js +1 -1
- package/lib/commonjs/components/AuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/components/CardField.js +1 -1
- package/lib/commonjs/components/CardField.js.map +1 -1
- package/lib/commonjs/components/CardForm.js +1 -1
- package/lib/commonjs/components/CardForm.js.map +1 -1
- package/lib/commonjs/components/PlatformPayButton.js +1 -1
- package/lib/commonjs/components/PlatformPayButton.js.map +1 -1
- package/lib/commonjs/components/StripeContainer.js +1 -1
- package/lib/commonjs/components/StripeContainer.js.map +1 -1
- package/lib/commonjs/components/StripeProvider.js +1 -1
- package/lib/commonjs/components/StripeProvider.js.map +1 -1
- package/lib/commonjs/connect/Components.js +2 -0
- package/lib/commonjs/connect/Components.js.map +1 -0
- package/lib/commonjs/connect/ConnectComponentsProvider.js +2 -0
- package/lib/commonjs/connect/ConnectComponentsProvider.js.map +1 -0
- package/lib/commonjs/connect/EmbeddedComponent.js +19 -0
- package/lib/commonjs/connect/EmbeddedComponent.js.map +1 -0
- package/lib/commonjs/connect/ModalCloseButton.js +2 -0
- package/lib/commonjs/connect/ModalCloseButton.js.map +1 -0
- package/lib/commonjs/connect/NavigationBar.js +2 -0
- package/lib/commonjs/connect/NavigationBar.js.map +1 -0
- package/lib/commonjs/connect/connectTypes.js +2 -0
- package/lib/commonjs/connect/connectTypes.js.map +1 -0
- package/lib/commonjs/events.js +1 -1
- package/lib/commonjs/events.js.map +1 -1
- package/lib/commonjs/helpers.js +1 -1
- package/lib/commonjs/helpers.js.map +1 -1
- package/lib/commonjs/hooks/useOnramp.js +2 -0
- package/lib/commonjs/hooks/useOnramp.js.map +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/plugin/withStripe.js +1 -1
- package/lib/commonjs/plugin/withStripe.js.map +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js +1 -1
- package/lib/commonjs/specs/NativeAddToWalletButton.js.map +1 -1
- package/lib/commonjs/specs/NativeAddressSheet.js +1 -1
- package/lib/commonjs/specs/NativeAddressSheet.js.map +1 -1
- package/lib/commonjs/specs/NativeApplePayButton.js +1 -1
- package/lib/commonjs/specs/NativeApplePayButton.js.map +1 -1
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/commonjs/specs/NativeAuBECSDebitForm.js.map +1 -1
- package/lib/commonjs/specs/NativeCardField.js +1 -1
- package/lib/commonjs/specs/NativeCardField.js.map +1 -1
- package/lib/commonjs/specs/NativeCardForm.js +1 -1
- package/lib/commonjs/specs/NativeCardForm.js.map +1 -1
- package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js +2 -0
- package/lib/commonjs/specs/NativeConnectAccountOnboardingView.js.map +1 -0
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/specs/NativeGooglePayButton.js +1 -1
- package/lib/commonjs/specs/NativeGooglePayButton.js.map +1 -1
- package/lib/commonjs/specs/NativeNavigationBar.js +2 -0
- package/lib/commonjs/specs/NativeNavigationBar.js.map +1 -0
- package/lib/commonjs/specs/NativeOnrampSdkModule.js +2 -0
- package/lib/commonjs/specs/NativeOnrampSdkModule.js.map +1 -0
- package/lib/commonjs/specs/NativeStripeContainer.js +1 -1
- package/lib/commonjs/specs/NativeStripeContainer.js.map +1 -1
- package/lib/commonjs/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js +1 -1
- package/lib/commonjs/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/commonjs/types/Errors.js +1 -1
- package/lib/commonjs/types/Errors.js.map +1 -1
- package/lib/commonjs/types/Onramp.js +2 -0
- package/lib/commonjs/types/Onramp.js.map +1 -0
- package/lib/commonjs/types/PaymentIntent.js.map +1 -1
- package/lib/commonjs/types/PaymentSheet.js.map +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/module/components/AddToWalletButton.js +1 -1
- package/lib/module/components/AddToWalletButton.js.map +1 -1
- package/lib/module/components/AddressSheet.js +1 -1
- package/lib/module/components/AddressSheet.js.map +1 -1
- package/lib/module/components/AuBECSDebitForm.js +1 -1
- package/lib/module/components/AuBECSDebitForm.js.map +1 -1
- package/lib/module/components/CardField.js +1 -1
- package/lib/module/components/CardField.js.map +1 -1
- package/lib/module/components/CardForm.js +1 -1
- package/lib/module/components/CardForm.js.map +1 -1
- package/lib/module/components/PlatformPayButton.js +1 -1
- package/lib/module/components/PlatformPayButton.js.map +1 -1
- package/lib/module/components/StripeContainer.js +1 -1
- package/lib/module/components/StripeContainer.js.map +1 -1
- package/lib/module/components/StripeProvider.js +1 -1
- package/lib/module/components/StripeProvider.js.map +1 -1
- package/lib/module/connect/Components.js +2 -0
- package/lib/module/connect/Components.js.map +1 -0
- package/lib/module/connect/ConnectComponentsProvider.js +2 -0
- package/lib/module/connect/ConnectComponentsProvider.js.map +1 -0
- package/lib/module/connect/EmbeddedComponent.js +19 -0
- package/lib/module/connect/EmbeddedComponent.js.map +1 -0
- package/lib/module/connect/ModalCloseButton.js +2 -0
- package/lib/module/connect/ModalCloseButton.js.map +1 -0
- package/lib/module/connect/NavigationBar.js +2 -0
- package/lib/module/connect/NavigationBar.js.map +1 -0
- package/lib/module/connect/connectTypes.js +2 -0
- package/lib/module/connect/connectTypes.js.map +1 -0
- package/lib/module/events.js +1 -1
- package/lib/module/events.js.map +1 -1
- package/lib/module/helpers.js +1 -1
- package/lib/module/helpers.js.map +1 -1
- package/lib/module/hooks/useOnramp.js +2 -0
- package/lib/module/hooks/useOnramp.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/plugin/withStripe.js +1 -1
- package/lib/module/plugin/withStripe.js.map +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js +1 -1
- package/lib/module/specs/NativeAddToWalletButton.js.map +1 -1
- package/lib/module/specs/NativeAddressSheet.js +1 -1
- package/lib/module/specs/NativeAddressSheet.js.map +1 -1
- package/lib/module/specs/NativeApplePayButton.js +1 -1
- package/lib/module/specs/NativeApplePayButton.js.map +1 -1
- package/lib/module/specs/NativeAuBECSDebitForm.js +1 -1
- package/lib/module/specs/NativeAuBECSDebitForm.js.map +1 -1
- package/lib/module/specs/NativeCardField.js +1 -1
- package/lib/module/specs/NativeCardField.js.map +1 -1
- package/lib/module/specs/NativeCardForm.js +1 -1
- package/lib/module/specs/NativeCardForm.js.map +1 -1
- package/lib/module/specs/NativeConnectAccountOnboardingView.js +2 -0
- package/lib/module/specs/NativeConnectAccountOnboardingView.js.map +1 -0
- package/lib/module/specs/NativeEmbeddedPaymentElement.js +1 -1
- package/lib/module/specs/NativeEmbeddedPaymentElement.js.map +1 -1
- package/lib/module/specs/NativeGooglePayButton.js +1 -1
- package/lib/module/specs/NativeGooglePayButton.js.map +1 -1
- package/lib/module/specs/NativeNavigationBar.js +2 -0
- package/lib/module/specs/NativeNavigationBar.js.map +1 -0
- package/lib/module/specs/NativeOnrampSdkModule.js +2 -0
- package/lib/module/specs/NativeOnrampSdkModule.js.map +1 -0
- package/lib/module/specs/NativeStripeContainer.js +1 -1
- package/lib/module/specs/NativeStripeContainer.js.map +1 -1
- package/lib/module/specs/NativeStripeSdkModule.js.map +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js +1 -1
- package/lib/module/types/EmbeddedPaymentElement.js.map +1 -1
- package/lib/module/types/Errors.js +1 -1
- package/lib/module/types/Errors.js.map +1 -1
- package/lib/module/types/Onramp.js +2 -0
- package/lib/module/types/Onramp.js.map +1 -0
- package/lib/module/types/PaymentIntent.js.map +1 -1
- package/lib/module/types/PaymentSheet.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/typescript/src/components/StripeProvider.d.ts.map +1 -1
- package/lib/typescript/src/connect/Components.d.ts +23 -0
- package/lib/typescript/src/connect/Components.d.ts.map +1 -0
- package/lib/typescript/src/connect/ConnectComponentsProvider.d.ts +22 -0
- package/lib/typescript/src/connect/ConnectComponentsProvider.d.ts.map +1 -0
- package/lib/typescript/src/connect/EmbeddedComponent.d.ts +18 -0
- package/lib/typescript/src/connect/EmbeddedComponent.d.ts.map +1 -0
- package/lib/typescript/src/connect/ModalCloseButton.d.ts +7 -0
- package/lib/typescript/src/connect/ModalCloseButton.d.ts.map +1 -0
- package/lib/typescript/src/connect/NavigationBar.d.ts +8 -0
- package/lib/typescript/src/connect/NavigationBar.d.ts.map +1 -0
- package/lib/typescript/src/connect/connectTypes.d.ts +464 -0
- package/lib/typescript/src/connect/connectTypes.d.ts.map +1 -0
- package/lib/typescript/src/events.d.ts +3 -0
- package/lib/typescript/src/events.d.ts.map +1 -1
- package/lib/typescript/src/functions.d.ts.map +1 -1
- package/lib/typescript/src/helpers.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useOnramp.d.ts +158 -0
- package/lib/typescript/src/hooks/useOnramp.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/plugin/withStripe.d.ts +15 -0
- package/lib/typescript/src/plugin/withStripe.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeConnectAccountOnboardingView.d.ts +14 -0
- package/lib/typescript/src/specs/NativeConnectAccountOnboardingView.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeNavigationBar.d.ts +11 -0
- package/lib/typescript/src/specs/NativeNavigationBar.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts +28 -0
- package/lib/typescript/src/specs/NativeOnrampSdkModule.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts +3 -0
- package/lib/typescript/src/specs/NativeStripeSdkModule.d.ts.map +1 -1
- package/lib/typescript/src/types/Errors.d.ts +5 -0
- package/lib/typescript/src/types/Errors.d.ts.map +1 -1
- package/lib/typescript/src/types/Onramp.d.ts +275 -0
- package/lib/typescript/src/types/Onramp.d.ts.map +1 -0
- package/lib/typescript/src/types/PaymentIntent.d.ts +1 -9
- package/lib/typescript/src/types/PaymentIntent.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentMethod.d.ts +2 -8
- package/lib/typescript/src/types/PaymentMethod.d.ts.map +1 -1
- package/lib/typescript/src/types/PaymentSheet.d.ts +7 -0
- package/lib/typescript/src/types/PaymentSheet.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +7 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/package.json +24 -12
- package/src/components/StripeProvider.tsx +5 -0
- package/src/connect/Components.tsx +279 -0
- package/src/connect/ConnectComponentsProvider.tsx +93 -0
- package/src/connect/EmbeddedComponent.tsx +407 -0
- package/src/connect/ModalCloseButton.tsx +44 -0
- package/src/connect/NavigationBar.tsx +29 -0
- package/src/connect/connectTypes.ts +626 -0
- package/src/events.ts +22 -0
- package/src/hooks/useOnramp.tsx +334 -0
- package/src/index.tsx +13 -0
- package/src/plugin/withStripe.ts +104 -7
- package/src/specs/NativeConnectAccountOnboardingView.ts +19 -0
- package/src/specs/NativeNavigationBar.ts +16 -0
- package/src/specs/NativeOnrampSdkModule.ts +47 -0
- package/src/specs/NativeStripeSdkModule.ts +5 -0
- package/src/types/Errors.ts +6 -0
- package/src/types/Onramp.ts +317 -0
- package/src/types/PaymentIntent.ts +0 -10
- package/src/types/PaymentMethod.ts +0 -9
- package/src/types/PaymentSheet.ts +7 -0
- package/src/types/index.ts +8 -0
- package/stripe-react-native.podspec +21 -8
- package/android/.idea/AndroidProjectSystem.xml +0 -6
- package/android/.idea/caches/deviceStreaming.xml +0 -703
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -18
- package/android/.idea/migrations.xml +0 -10
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/runConfigurations.xml +0 -17
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
- package/android/src/main/java/com/reactnativestripesdk/GooglePayLauncherFragment.kt +0 -146
- package/android/src/main/java/com/reactnativestripesdk/GooglePayPaymentMethodLauncherFragment.kt +0 -68
- package/android/src/main/java/com/reactnativestripesdk/addresssheet/AddressLauncherFragment.kt +0 -102
- package/android/src/main/java/com/reactnativestripesdk/utils/StripeFragment.kt +0 -52
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { Onramp, OnrampError, StripeError } from '../types';
|
|
2
|
+
import type { Address, PlatformPay } from '../types';
|
|
3
|
+
import { CryptoPaymentToken } from '../types/Onramp';
|
|
4
|
+
/**
|
|
5
|
+
* useOnramp hook
|
|
6
|
+
*/
|
|
7
|
+
export declare function useOnramp(): {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a `CryptoOnrampCoordinator` to facilitate authentication, identity verification, payment collection, and checkouts.
|
|
10
|
+
*
|
|
11
|
+
* @param config Configuration object containing merchant display name and appearance settings
|
|
12
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
13
|
+
*/
|
|
14
|
+
configure: (config: Onramp.Configuration) => Promise<{
|
|
15
|
+
error?: StripeError<OnrampError>;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Whether or not the provided email is associated with an existing Link consumer.
|
|
19
|
+
*
|
|
20
|
+
* @param email The email address to look up
|
|
21
|
+
* @returns Promise that resolves to an object with hasLinkAccount boolean or error
|
|
22
|
+
*/
|
|
23
|
+
hasLinkAccount: (email: string) => Promise<Onramp.HasLinkAccountResult>;
|
|
24
|
+
/**
|
|
25
|
+
* Registers a new Link user with the provided details.
|
|
26
|
+
*
|
|
27
|
+
* @param info User information including email, phone, country, and optional full name
|
|
28
|
+
* @returns Promise that resolves to an object with customerId or error
|
|
29
|
+
*/
|
|
30
|
+
registerLinkUser: (info: Onramp.LinkUserInfo) => Promise<Onramp.RegisterLinkUserResult>;
|
|
31
|
+
/**
|
|
32
|
+
* Registers the given crypto wallet address to the current Link account.
|
|
33
|
+
* Requires an authenticated Link user.
|
|
34
|
+
*
|
|
35
|
+
* @param walletAddress The crypto wallet address to register
|
|
36
|
+
* @param network The crypto network for the wallet address
|
|
37
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
38
|
+
*/
|
|
39
|
+
registerWalletAddress: (walletAddress: string, network: Onramp.CryptoNetwork) => Promise<{
|
|
40
|
+
error?: StripeError<OnrampError>;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Attaches the specific KYC info to the current Link user. Requires an authenticated Link user.
|
|
44
|
+
*
|
|
45
|
+
* @param kycInfo The KYC info to attach to the Link user
|
|
46
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
47
|
+
*/
|
|
48
|
+
attachKycInfo: (kycInfo: Onramp.KycInfo) => Promise<{
|
|
49
|
+
error?: StripeError<OnrampError>;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* Presents UI to verify KYC information for the current Link user.
|
|
53
|
+
* Requires the user to be authenticated with prior calls to either `authenticateUser` or `authorize`, and also requires prior KYC info attachement via `attachKycInfo`.
|
|
54
|
+
*
|
|
55
|
+
* @param updatedAddress: An optional updated address. Specify this parameter if the user has elected to change the address after a prior call to this API returned `UpdateAddress`. Otherwise, specify `null` to show the user's existing KYC information on the presented flow.
|
|
56
|
+
*
|
|
57
|
+
* @returns Promise that resolves to an instance of `VerifyKycResult` indicating whether the user confirmed their address, elected to update their address, cancelled the flow, or an error occurred.
|
|
58
|
+
*/
|
|
59
|
+
presentKycInfoVerification: (updatedAddress: Address | null) => Promise<Onramp.VerifyKycResult>;
|
|
60
|
+
/**
|
|
61
|
+
* Updates the user's phone number in their Link account.
|
|
62
|
+
*
|
|
63
|
+
* @param phone The new phone number to set for the user in E.164 format (e.g., +12125551234)
|
|
64
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
65
|
+
*/
|
|
66
|
+
updatePhoneNumber: (phone: string) => Promise<{
|
|
67
|
+
error?: StripeError<OnrampError>;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Presents Link UI to authenticate an existing Link user.
|
|
71
|
+
* `hasLinkAccount` must be called before this.
|
|
72
|
+
*
|
|
73
|
+
* @returns Promise that resolves to an object with customerId or error
|
|
74
|
+
*/
|
|
75
|
+
authenticateUser: () => Promise<Onramp.AuthenticateUserResult>;
|
|
76
|
+
/**
|
|
77
|
+
* Authenticates the user with an encrypted Link auth token.
|
|
78
|
+
* This token can be obtained by exchanging a previously consented Link OAuth token from your backend using Stripe's /v1/link/auth_token API. The response of this backend API includes information on token expiry.
|
|
79
|
+
*
|
|
80
|
+
* @param linkAuthTokenClientSecret An encrypted one-time-use auth token that, upon successful validation, leaves the Link account’s consumer session in an already-verified state, allowing the client to skip verification.
|
|
81
|
+
* @returns Promise that resolves to an object with an optional error property if authentication fails due to an invalid token that is expired, already used, revoked, or not found, or if a network error occurs.
|
|
82
|
+
*/
|
|
83
|
+
authenticateUserWithToken: (linkAuthTokenClientSecret: string) => Promise<{
|
|
84
|
+
error?: StripeError<OnrampError>;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Creates an identity verification session and launches the document verification flow.
|
|
88
|
+
* Requires an authenticated Link user.
|
|
89
|
+
*
|
|
90
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
91
|
+
*/
|
|
92
|
+
verifyIdentity: () => Promise<{
|
|
93
|
+
error?: StripeError<OnrampError>;
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* Presents UI to collect/select a payment method of the given type.
|
|
97
|
+
*
|
|
98
|
+
* @param paymentMethod The payment method type to collect.
|
|
99
|
+
* - 'Card' and 'BankAccount' present Link for collection.
|
|
100
|
+
* - 'PlatformPay' presents Apple Pay / Google Pay using the provided parameters.
|
|
101
|
+
* @param platformPayParams Platform-specific parameters (required when `paymentMethod` is 'PlatformPay').
|
|
102
|
+
* - iOS: provide `applePay` params
|
|
103
|
+
* - Android: provide `googlePay` params
|
|
104
|
+
* @returns Promise that resolves to an object with displayData or error
|
|
105
|
+
*/
|
|
106
|
+
collectPaymentMethod: {
|
|
107
|
+
(paymentMethod: "Card" | "BankAccount", platformPayParams?: undefined): Promise<Onramp.CollectPaymentMethodResult>;
|
|
108
|
+
(paymentMethod: "PlatformPay", platformPayParams: PlatformPay.PaymentMethodParams): Promise<Onramp.CollectPaymentMethodResult>;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Creates a crypto payment token for the payment method currently selected on the coordinator.
|
|
112
|
+
* Call after a successful `collectPaymentMethod(...)`.
|
|
113
|
+
*
|
|
114
|
+
* @returns Promise that resolves to an object with cryptoPaymentToken or error
|
|
115
|
+
*/
|
|
116
|
+
createCryptoPaymentToken: () => Promise<Onramp.CreateCryptoPaymentTokenResult>;
|
|
117
|
+
/**
|
|
118
|
+
* Performs the checkout flow for a crypto onramp session, handling any required authentication steps.
|
|
119
|
+
*
|
|
120
|
+
* @param onrampSessionId The onramp session identifier
|
|
121
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
122
|
+
*/
|
|
123
|
+
performCheckout: (onrampSessionId: string, provideCheckoutClientSecret: () => Promise<string | null>) => Promise<{
|
|
124
|
+
error?: StripeError<OnrampError>;
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* Authorizes a Link auth intent and authenticates the user if necessary.
|
|
128
|
+
*
|
|
129
|
+
* @param linkAuthIntentId The Link auth intent ID to authorize
|
|
130
|
+
* @returns Promise that resolves to an object with status and customerId or error
|
|
131
|
+
*/
|
|
132
|
+
authorize: (linkAuthIntentId: string) => Promise<Onramp.AuthorizeResult>;
|
|
133
|
+
/**
|
|
134
|
+
* Retrieves display data (icon, label, sublabel) for the given payment method details.
|
|
135
|
+
* Suitable for rendering in the UI to summarize the selected payment method.
|
|
136
|
+
*
|
|
137
|
+
* @param token The token containing payment method details (card or bank account) to get display data for
|
|
138
|
+
* @returns Promise that resolves to an object with displayData or error
|
|
139
|
+
*/
|
|
140
|
+
getCryptoTokenDisplayData: (token: CryptoPaymentToken) => Promise<Onramp.PaymentDisplayDataResult>;
|
|
141
|
+
/**
|
|
142
|
+
* Logs out the current user from their Link account.
|
|
143
|
+
*
|
|
144
|
+
* @returns Promise that resolves to an object with an optional error property
|
|
145
|
+
*/
|
|
146
|
+
logOut: () => Promise<{
|
|
147
|
+
error?: StripeError<OnrampError>;
|
|
148
|
+
}>;
|
|
149
|
+
/**
|
|
150
|
+
* Determines whether an error is an authentication-related error that requires re-authentication.
|
|
151
|
+
* Useful for implementing automatic re-authentication flows when sessions expire or become invalid.
|
|
152
|
+
*
|
|
153
|
+
* @param error The error object to check, typically from onramp method calls
|
|
154
|
+
* @returns True if the error indicates an authentication issue, false otherwise
|
|
155
|
+
*/
|
|
156
|
+
isAuthError: (error: any) => boolean;
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=useOnramp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnramp.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useOnramp.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAKrD;;GAEG;AACH,wBAAgB,SAAS;IA4KrB;;;;;OAKG;wBA9KO,MAAM,CAAC,aAAa,KAC3B,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC;IAgLhD;;;;;OAKG;4BA9KW,MAAM,KAAG,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAiL3D;;;;;OAKG;6BA9KK,MAAM,CAAC,YAAY,KACxB,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC;IAgLzC;;;;;;;OAOG;2CA/Kc,MAAM,WACZ,MAAM,CAAC,aAAa,KAC5B,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAA;KAAE,CAAC;IAgLhD;;;;;OAKG;6BA7KQ,MAAM,CAAC,OAAO,KACtB,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,WAAW,CAA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C;IAwJA;;;;;;OAMG;yBA1JwB,GAAG,KAAG,OAAO;EA6J3C"}
|
|
@@ -4,6 +4,7 @@ export { useStripe } from './hooks/useStripe';
|
|
|
4
4
|
export { usePlatformPay } from './hooks/usePlatformPay';
|
|
5
5
|
export { usePaymentSheet } from './hooks/usePaymentSheet';
|
|
6
6
|
export { useFinancialConnectionsSheet } from './hooks/useFinancialConnectionsSheet';
|
|
7
|
+
export { useOnramp } from './hooks/useOnramp';
|
|
7
8
|
export { initStripe, StripeProvider } from './components/StripeProvider';
|
|
8
9
|
export type { Props as StripeProviderProps } from './components/StripeProvider';
|
|
9
10
|
export { CardField } from './components/CardField';
|
|
@@ -27,4 +28,7 @@ export type { Props as CustomerSheetProps } from './components/CustomerSheet';
|
|
|
27
28
|
export * from './types/EmbeddedPaymentElement';
|
|
28
29
|
export * from './types/PaymentSheet';
|
|
29
30
|
export * from './types/ConfirmationToken';
|
|
31
|
+
export { ConnectComponentsProvider, loadConnectAndInitialize, } from './connect/ConnectComponentsProvider';
|
|
32
|
+
export type { StripeConnectInstance, StripeConnectInitParams, StripeConnectUpdateParams, } from './connect/connectTypes';
|
|
33
|
+
export * from './connect/Components';
|
|
30
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/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iB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,KAAK,IAAI,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAEtF,cAAc,aAAa,CAAC;AAE5B,cAAc,eAAe,CAAC;AAE9B,cAAc,4BAA4B,CAAC;AAC3C,YAAY,EAAE,KAAK,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE9E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAG1C,OAAO,EACL,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
@@ -6,6 +6,13 @@ type StripePluginProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
merchantIdentifier: string | string[];
|
|
8
8
|
enableGooglePay: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether to include Onramp functionality in the build.
|
|
11
|
+
* When true, adds StripeSdk_includeOnramp=true to gradle.properties for Android
|
|
12
|
+
* and includes the Onramp pod for iOS.
|
|
13
|
+
* Defaults to false.
|
|
14
|
+
*/
|
|
15
|
+
includeOnramp?: boolean;
|
|
9
16
|
};
|
|
10
17
|
/**
|
|
11
18
|
* Adds the following to the entitlements:
|
|
@@ -31,6 +38,14 @@ export declare const withNoopSwiftFile: ConfigPlugin;
|
|
|
31
38
|
* </application>
|
|
32
39
|
*/
|
|
33
40
|
export declare function setGooglePayMetaData(enabled: boolean, modResults: AndroidConfig.Manifest.AndroidManifest): AndroidConfig.Manifest.AndroidManifest;
|
|
41
|
+
/**
|
|
42
|
+
* Adds or removes the StripeSdk_includeOnramp property in gradle.properties.
|
|
43
|
+
*
|
|
44
|
+
* @param includeOnramp Whether to include Onramp functionality
|
|
45
|
+
* @param modResults The current gradle.properties as PropertiesItem array
|
|
46
|
+
* @returns Modified PropertiesItem array
|
|
47
|
+
*/
|
|
48
|
+
export declare function setOnrampGradleProperty(includeOnramp: boolean, modResults: AndroidConfig.Properties.PropertiesItem[]): AndroidConfig.Properties.PropertiesItem[];
|
|
34
49
|
declare const _default: ConfigPlugin<StripePluginProps>;
|
|
35
50
|
export default _default;
|
|
36
51
|
//# sourceMappingURL=withStripe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withStripe.d.ts","sourceRoot":"","sources":["../../../../src/plugin/withStripe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,
|
|
1
|
+
{"version":3,"file":"withStripe.d.ts","sourceRoot":"","sources":["../../../../src/plugin/withStripe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EAOb,MAAM,sBAAsB,CAAC;AAW9B,KAAK,iBAAiB,GAAG;IACvB;;;OAGG;IACH,kBAAkB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtC,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAuDF;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,mBAAmB,EAAE,MAAM,GAAG,MAAM,EAAE,EACtC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAChC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAmBrB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAW/B,CAAC;AA2BF;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC,eAAe,GACjD,aAAa,CAAC,QAAQ,CAAC,eAAe,CAiBxC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,OAAO,EACtB,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,GACpD,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,CA+B3C;;AAED,wBAAsE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
type OnExitActionEvent = Readonly<{}>;
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
onExitAction: DirectEventHandler<OnExitActionEvent>;
|
|
10
|
+
}
|
|
11
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
12
|
+
declare const _default: ComponentType;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=NativeConnectAccountOnboardingView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeConnectAccountOnboardingView.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeConnectAccountOnboardingView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAGpF,KAAK,iBAAiB,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEtC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;CACrD;AAED,KAAK,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;wBAI3C,aAAa;AAFlB,wBAEmB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export type CloseButtonPressEvent = Readonly<{}>;
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
onCloseButtonPress?: DirectEventHandler<CloseButtonPressEvent>;
|
|
7
|
+
}
|
|
8
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
9
|
+
declare const _default: ComponentType;
|
|
10
|
+
export default _default;
|
|
11
|
+
//# sourceMappingURL=NativeNavigationBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeNavigationBar.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeNavigationBar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAGpF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEjD,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,qBAAqB,CAAC,CAAC;CAChE;AAED,KAAK,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;wBAI3C,aAAa;AAFlB,wBAEmB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';
|
|
2
|
+
import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import type { Address, InitialiseParams, Onramp } from '../types';
|
|
4
|
+
import type { UnsafeObject } from './utils';
|
|
5
|
+
export interface Spec extends TurboModule {
|
|
6
|
+
initialise(params: UnsafeObject<InitialiseParams>): Promise<void>;
|
|
7
|
+
configureOnramp(config: UnsafeObject<Onramp.Configuration>): Promise<Onramp.VoidResult>;
|
|
8
|
+
hasLinkAccount(email: string): Promise<Onramp.HasLinkAccountResult>;
|
|
9
|
+
registerLinkUser(info: UnsafeObject<Onramp.LinkUserInfo>): Promise<Onramp.RegisterLinkUserResult>;
|
|
10
|
+
registerWalletAddress(walletAddress: string, network: string): Promise<Onramp.VoidResult>;
|
|
11
|
+
attachKycInfo(kycInfo: UnsafeObject<Onramp.KycInfo>): Promise<Onramp.VoidResult>;
|
|
12
|
+
presentKycInfoVerification: (updatedAddress: UnsafeObject<Address> | null) => Promise<Onramp.VerifyKycResult>;
|
|
13
|
+
updatePhoneNumber(phone: string): Promise<Onramp.VoidResult>;
|
|
14
|
+
authenticateUser(): Promise<Onramp.AuthenticateUserResult>;
|
|
15
|
+
authenticateUserWithToken(linkAuthTokenClientSecret: string): Promise<Onramp.VoidResult>;
|
|
16
|
+
verifyIdentity(): Promise<Onramp.VoidResult>;
|
|
17
|
+
collectPaymentMethod(paymentMethod: string, platformPayParams: UnsafeObject<any>): Promise<Onramp.CollectPaymentMethodResult>;
|
|
18
|
+
provideCheckoutClientSecret(clientSecret: string | null): void;
|
|
19
|
+
onCheckoutClientSecretRequested: EventEmitter<UnsafeObject<any>>;
|
|
20
|
+
createCryptoPaymentToken(): Promise<Onramp.CreateCryptoPaymentTokenResult>;
|
|
21
|
+
performCheckout(onrampSessionId: string): Promise<Onramp.VoidResult>;
|
|
22
|
+
onrampAuthorize(linkAuthIntentId: string): Promise<Onramp.AuthorizeResult>;
|
|
23
|
+
getCryptoTokenDisplayData(token: UnsafeObject<Onramp.CryptoPaymentToken>): Promise<Onramp.PaymentDisplayDataResult>;
|
|
24
|
+
logout(): Promise<Onramp.VoidResult>;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: Spec;
|
|
27
|
+
export default _default;
|
|
28
|
+
//# sourceMappingURL=NativeOnrampSdkModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeOnr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AAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAC3D,yBAAyB,CACvB,yBAAyB,EAAE,MAAM,GAChC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC7C,oBAAoB,CAClB,aAAa,EAAE,MAAM,EACrB,iBAAiB,EAAE,YAAY,CAAC,GAAG,CAAC,GACnC,OAAO,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;IAC9C,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/D,+BAA+B,EAAE,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjE,wBAAwB,IAAI,OAAO,CAAC,MAAM,CAAC,8BAA8B,CAAC,CAAC;IAC3E,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACrE,eAAe,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IAC3E,yBAAyB,CACvB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,kBAAkB,CAAC,GAC7C,OAAO,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAC5C,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;CACtC;;AAED,wBAAmE"}
|
|
@@ -67,6 +67,9 @@ export interface Spec extends TurboModule {
|
|
|
67
67
|
updateEmbeddedPaymentElement(intentConfig: UnsafeObject<IntentConfiguration>): Promise<void>;
|
|
68
68
|
clearEmbeddedPaymentOption(viewTag: Int32): Promise<void>;
|
|
69
69
|
setFinancialConnectionsForceNativeFlow(enabled: boolean): Promise<void>;
|
|
70
|
+
openAuthenticatedWebView(id: string, url: string): Promise<{
|
|
71
|
+
url?: string;
|
|
72
|
+
} | null>;
|
|
70
73
|
addListener: (eventType: string) => void;
|
|
71
74
|
removeListeners: (count: number) => void;
|
|
72
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeStripeSdkModule.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeStripeSdkModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,2BAA2B,EAC3B,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,EACX,WAAW,EACX,KAAK,EACL,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,mCAAmC,EACnC,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,KAAK,uBAAuB,GAAG,YAAY,CAAC;IAC1C,KAAK,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;CACzC,CAAC,CAAC;AAEH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,mBAAmB,CACjB,MAA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AC/D,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,6BAA6B,CAC3B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACzC,4BAA4B,CAC1B,YAAY,EAAE,YAAY,CAAC,mBAAmB,CAAC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,0BAA0B,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,sCAAsC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeStripeSdkModule.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeStripeSdkModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvE,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,2BAA2B,EAC3B,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,8BAA8B,EAC9B,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,WAAW,EACX,WAAW,EACX,KAAK,EACL,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,mCAAmC,EACnC,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAA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;IACjB,mDAAmD,CACjD,uBAAuB,EAAE,MAAM,GAC9B,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,uDAAuD,CACrD,2BAA2B,EAAE,YAAY,CAAC,2BAA2B,CAAC,GACrE,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,4BAA4B,CAC1B,YAAY,EAAE,YAAY,CAAC,mBAAmB,CAAC,EAC/C,aAAa,EAAE,YAAY,CAAC,mCAAmC,CAAC,GAC/D,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,6BAA6B,CAC3B,OAAO,EAAE,KAAK,GACb,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACzC,4BAA4B,CAC1B,YAAY,EAAE,YAAY,CAAC,mBAAmB,CAAC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,0BAA0B,CAAC,OAAO,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,sCAAsC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE,wBAAwB,CACtB,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAGpC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;;AAED,wBAAmE"}
|
|
@@ -35,6 +35,11 @@ export declare enum PaymentSheetError {
|
|
|
35
35
|
Canceled = "Canceled",
|
|
36
36
|
Timeout = "Timeout"
|
|
37
37
|
}
|
|
38
|
+
export declare enum OnrampError {
|
|
39
|
+
Failed = "Failed",
|
|
40
|
+
Canceled = "Canceled",
|
|
41
|
+
Unknown = "Unknown"
|
|
42
|
+
}
|
|
38
43
|
export type ErrorType = 'api_connection_error' | 'api_error' | 'authentication_error' | 'card_error' | 'idempotency_error' | 'invalid_request_error' | 'rate_limit_error';
|
|
39
44
|
export interface StripeError<T> {
|
|
40
45
|
code: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/types/Errors.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,MAAM,WAAW;CAClB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;CAClB;AAED,oBAAY,0BAA0B;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,OAAO,YAAY;CACpB;AAED,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,SAAS,GACjB,sBAAsB,GACtB,WAAW,GACX,sBAAsB,GACtB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,oBAAoB;;;CAIhC,CAAC;AAEF,oBAAY,wBAAwB;IAClC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,gBAAgB;IAC1B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../src/types/Errors.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,MAAM,WAAW;CAClB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;CAClB;AAED,oBAAY,0BAA0B;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,wBAAwB;IAClC,OAAO,YAAY;CACpB;AAED,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,SAAS,GACjB,sBAAsB,GACtB,WAAW,GACX,sBAAsB,GACtB,YAAY,GACZ,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC;IACR,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,oBAAoB;;;CAIhC,CAAC;AAEF,oBAAY,wBAAwB;IAClC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,uBAAuB;IACjC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,oBAAY,gBAAgB;IAC1B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import type { Address } from './Common';
|
|
2
|
+
import type { OnrampError, StripeError } from './Errors';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration used to initialize and customize the crypto onramp experience.
|
|
5
|
+
*
|
|
6
|
+
* - `merchantDisplayName` is shown in Stripe-provided UI (e.g., Link, Identity).
|
|
7
|
+
* - `appearance` customizes colors and primary button styling for Stripe UI.
|
|
8
|
+
*/
|
|
9
|
+
export type Configuration = {
|
|
10
|
+
/** Merchant name to display in Stripe-provided UI. */
|
|
11
|
+
merchantDisplayName: string;
|
|
12
|
+
/** Appearance overrides for Stripe-provided UI used during onramp. */
|
|
13
|
+
appearance: LinkAppearance;
|
|
14
|
+
/** The identifier of the Stripe crypto customer object. */
|
|
15
|
+
cryptoCustomerId?: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Customization options for Link/Stripe-provided UI.
|
|
19
|
+
*/
|
|
20
|
+
export type LinkAppearance = {
|
|
21
|
+
/** Color overrides used when the device is in light mode. */
|
|
22
|
+
lightColors?: LinkColors;
|
|
23
|
+
/** Color overrides used when the device is in dark mode. */
|
|
24
|
+
darkColors?: LinkColors;
|
|
25
|
+
/** UI style preference for Stripe UI. */
|
|
26
|
+
style?: LinkStyle;
|
|
27
|
+
/** Primary button appearance overrides. */
|
|
28
|
+
primaryButton?: LinkPrimaryButton;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Color tokens used by Link/Stripe-provided UI.
|
|
32
|
+
*/
|
|
33
|
+
export type LinkColors = {
|
|
34
|
+
/** Primary brand color. */
|
|
35
|
+
primary: string;
|
|
36
|
+
/** Foreground content color to render on top of the primary color. */
|
|
37
|
+
contentOnPrimary: string;
|
|
38
|
+
/** Color used for selected borders and outlines. */
|
|
39
|
+
borderSelected: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* UI style preference for Stripe UI.
|
|
43
|
+
* - `AUTOMATIC`: Follow the system appearance.
|
|
44
|
+
* - `ALWAYS_LIGHT`: Always render a light appearance.
|
|
45
|
+
* - `ALWAYS_DARK`: Always render a dark appearance.
|
|
46
|
+
*/
|
|
47
|
+
export type LinkStyle = 'AUTOMATIC' | 'ALWAYS_LIGHT' | 'ALWAYS_DARK';
|
|
48
|
+
/**
|
|
49
|
+
* Primary button appearance overrides.
|
|
50
|
+
*/
|
|
51
|
+
export type LinkPrimaryButton = {
|
|
52
|
+
/** Corner radius in dp/points. */
|
|
53
|
+
cornerRadius?: number;
|
|
54
|
+
/** Button height in dp/points. */
|
|
55
|
+
height?: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Information used to register a new Link user for crypto onramp.
|
|
59
|
+
*
|
|
60
|
+
* Notes:
|
|
61
|
+
* - `phone` must be in E.164 format (e.g., +12125551234).
|
|
62
|
+
* - `country` must be a two-letter ISO 3166-1 alpha-2 code.
|
|
63
|
+
* - `fullName` should be collected for users outside the US; otherwise optional.
|
|
64
|
+
*/
|
|
65
|
+
export type LinkUserInfo = {
|
|
66
|
+
/** The user's email address. */
|
|
67
|
+
email: string;
|
|
68
|
+
/** The user's phone in E.164 format (e.g., +12125551234). */
|
|
69
|
+
phone: string;
|
|
70
|
+
/** Two-letter country code (ISO 3166-1 alpha-2). */
|
|
71
|
+
country: string;
|
|
72
|
+
/** Full name of the user. Recommended for non-US users. */
|
|
73
|
+
fullName?: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Supported crypto networks for wallet address registration.
|
|
77
|
+
*/
|
|
78
|
+
export declare enum CryptoNetwork {
|
|
79
|
+
bitcoin = "bitcoin",
|
|
80
|
+
ethereum = "ethereum",
|
|
81
|
+
solana = "solana",
|
|
82
|
+
polygon = "polygon",
|
|
83
|
+
stellar = "stellar",
|
|
84
|
+
avalanche = "avalanche",
|
|
85
|
+
base = "base",
|
|
86
|
+
aptos = "aptos",
|
|
87
|
+
optimism = "optimism",
|
|
88
|
+
worldchain = "worldchain",
|
|
89
|
+
xrpl = "xrpl"
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Represents a calendar date using day, month, and year components.
|
|
93
|
+
* Example: March 31st, 1975 -> { day: 31, month: 3, year: 1975 }
|
|
94
|
+
*/
|
|
95
|
+
export type DateOfBirth = {
|
|
96
|
+
/** Day of month. */
|
|
97
|
+
day: number;
|
|
98
|
+
/** Month of year (1-12). */
|
|
99
|
+
month: number;
|
|
100
|
+
/** Full year (e.g., 1975). */
|
|
101
|
+
year: number;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Know Your Customer (KYC) information required for crypto operations.
|
|
105
|
+
*
|
|
106
|
+
* Notes:
|
|
107
|
+
* - `idNumber` may be required depending on region/regulatory requirements (for US, this is SSN).
|
|
108
|
+
* - `address` fields are optional at the field level, but the object is required.
|
|
109
|
+
*/
|
|
110
|
+
export type KycInfo = {
|
|
111
|
+
/** Customer’s first name. */
|
|
112
|
+
firstName: string;
|
|
113
|
+
/** Customer’s last name. */
|
|
114
|
+
lastName: string;
|
|
115
|
+
/** Government ID number (e.g., SSN for US). May be required by region. */
|
|
116
|
+
idNumber?: string;
|
|
117
|
+
/** Customer’s date of birth. */
|
|
118
|
+
dateOfBirth: DateOfBirth;
|
|
119
|
+
/** Customer’s address. */
|
|
120
|
+
address: Address;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Result of KYC verification.
|
|
124
|
+
*/
|
|
125
|
+
export type VerifyKycResult = {
|
|
126
|
+
/** Verification was confirmed by the user. */
|
|
127
|
+
status: 'Confirmed';
|
|
128
|
+
error?: undefined;
|
|
129
|
+
} | {
|
|
130
|
+
/** An updated address is required. */
|
|
131
|
+
status: 'UpdateAddress';
|
|
132
|
+
error?: undefined;
|
|
133
|
+
} | {
|
|
134
|
+
status?: undefined;
|
|
135
|
+
/** Present if the verification failed with an error. */
|
|
136
|
+
error: StripeError<OnrampError>;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Common result for void-returning operations. Contains an optional error.
|
|
140
|
+
*/
|
|
141
|
+
export type VoidResult = {
|
|
142
|
+
/** Present if the operation failed. */
|
|
143
|
+
error?: StripeError<OnrampError>;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Result of Link authorization.
|
|
147
|
+
*
|
|
148
|
+
* - `Consented`: The user consented; includes `customerId`.
|
|
149
|
+
* - `Denied`: The user denied authorization.
|
|
150
|
+
* - Error variant: Contains a Stripe error.
|
|
151
|
+
*/
|
|
152
|
+
export type AuthorizeResult = {
|
|
153
|
+
/** Authorization was consented by the user. */
|
|
154
|
+
status: 'Consented';
|
|
155
|
+
/** The crypto customer ID associated with the Link user. */
|
|
156
|
+
customerId: string;
|
|
157
|
+
error?: undefined;
|
|
158
|
+
} | {
|
|
159
|
+
/** Authorization was denied by the user. */
|
|
160
|
+
status: 'Denied';
|
|
161
|
+
customerId?: undefined;
|
|
162
|
+
error?: undefined;
|
|
163
|
+
} | {
|
|
164
|
+
status?: undefined;
|
|
165
|
+
customerId?: undefined;
|
|
166
|
+
/** Present if the authorization failed with an error. */
|
|
167
|
+
error: StripeError<OnrampError>;
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Result of checking whether an email corresponds to an existing Link account.
|
|
171
|
+
*/
|
|
172
|
+
export type HasLinkAccountResult = {
|
|
173
|
+
/** True if the email is associated with an existing Link consumer. */
|
|
174
|
+
hasLinkAccount: boolean;
|
|
175
|
+
error?: undefined;
|
|
176
|
+
} | {
|
|
177
|
+
hasLinkAccount?: undefined;
|
|
178
|
+
/** Present if the lookup failed with an error. */
|
|
179
|
+
error: StripeError<OnrampError>;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Result of registering a new Link user.
|
|
183
|
+
*/
|
|
184
|
+
export type RegisterLinkUserResult = {
|
|
185
|
+
/** The crypto customer ID for the newly registered Link user. */
|
|
186
|
+
customerId: string;
|
|
187
|
+
error?: undefined;
|
|
188
|
+
} | {
|
|
189
|
+
customerId?: undefined;
|
|
190
|
+
/** Present if registration failed with an error. */
|
|
191
|
+
error: StripeError<OnrampError>;
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Result of authenticating an existing Link user.
|
|
195
|
+
*/
|
|
196
|
+
export type AuthenticateUserResult = {
|
|
197
|
+
/** The crypto customer ID after successful authentication. */
|
|
198
|
+
customerId: string;
|
|
199
|
+
error?: undefined;
|
|
200
|
+
} | {
|
|
201
|
+
customerId?: undefined;
|
|
202
|
+
/** Present if authentication failed with an error. */
|
|
203
|
+
error: StripeError<OnrampError>;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Describes the payment method currently selected by the user.
|
|
207
|
+
*/
|
|
208
|
+
export type PaymentMethodDisplayData = {
|
|
209
|
+
/**
|
|
210
|
+
* Payment method icon as a data URI PNG string (e.g., "data:image/png;base64,<...>").
|
|
211
|
+
* Suitable for rendering directly in an <Image> component.
|
|
212
|
+
*/
|
|
213
|
+
icon: string;
|
|
214
|
+
/** Payment method label, e.g., "Link" or "Apple Pay". */
|
|
215
|
+
label: string;
|
|
216
|
+
/** Details about the underlying payment method, e.g., "Visa Credit •••• 4242". */
|
|
217
|
+
sublabel?: string;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Result of collecting or selecting a payment method to use for checkout.
|
|
221
|
+
*/
|
|
222
|
+
export type CollectPaymentMethodResult = {
|
|
223
|
+
/** Display data for the selected payment method. */
|
|
224
|
+
displayData: PaymentMethodDisplayData;
|
|
225
|
+
error?: undefined;
|
|
226
|
+
} | {
|
|
227
|
+
displayData?: undefined;
|
|
228
|
+
/** Present if collection/selection failed with an error. */
|
|
229
|
+
error: StripeError<OnrampError>;
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Result of creating a crypto payment token for the currently selected payment method.
|
|
233
|
+
*/
|
|
234
|
+
export type CreateCryptoPaymentTokenResult = {
|
|
235
|
+
/** The crypto payment token ID. */
|
|
236
|
+
cryptoPaymentToken: string;
|
|
237
|
+
error?: undefined;
|
|
238
|
+
} | {
|
|
239
|
+
cryptoPaymentToken?: undefined;
|
|
240
|
+
/** Present if token creation failed with an error. */
|
|
241
|
+
error: StripeError<OnrampError>;
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* A representation of the crypto payment token, which contains details about the payment method used.
|
|
245
|
+
*/
|
|
246
|
+
export type CryptoPaymentToken = {
|
|
247
|
+
card: {
|
|
248
|
+
/** The card brand (e.g., "visa", "mastercard"). Used to determine the visual brand. */
|
|
249
|
+
brand: string;
|
|
250
|
+
/** The funding source of the card (e.g., "credit", "debit"). */
|
|
251
|
+
funding: string;
|
|
252
|
+
/** The last four digits of the card number. */
|
|
253
|
+
last4: string;
|
|
254
|
+
};
|
|
255
|
+
} | {
|
|
256
|
+
us_bank_account: {
|
|
257
|
+
/** The name of the bank (e.g., "Chase", "Bank of America"). */
|
|
258
|
+
bank_name?: string | null | undefined;
|
|
259
|
+
/** The last four digits of the bank account number. */
|
|
260
|
+
last4: string;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Result of retrieving information about a payment method for display.
|
|
265
|
+
*/
|
|
266
|
+
export type PaymentDisplayDataResult = {
|
|
267
|
+
/** Display data for the selected payment method. */
|
|
268
|
+
displayData: PaymentMethodDisplayData;
|
|
269
|
+
error?: undefined;
|
|
270
|
+
} | {
|
|
271
|
+
displayData?: undefined;
|
|
272
|
+
/** Present if collection/selection failed with an error. */
|
|
273
|
+
error: StripeError<OnrampError>;
|
|
274
|
+
};
|
|
275
|
+
//# sourceMappingURL=Onramp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Onramp.d.ts","sourceRoot":"","sources":["../../../../src/types/Onramp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,UAAU,EAAE,cAAc,CAAC;IAC3B,2DAA2D;IAC3D,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,6DAA6D;IAC7D,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,yCAAyC;IACzC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2C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