Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
96a9b53
Configuring successfully so far
Twigz Aug 18, 2025
b0f1483
Adds in registering crypto user
Twigz Aug 19, 2025
357b001
Additional compilation for registerWallet and collectKYC
Twigz Aug 19, 2025
e637349
No more error when trying to use the presenter, but not presenting yet
Twigz Aug 19, 2025
61fe94f
Example iOS configure implementation
Twigz Aug 19, 2025
c5de756
Fixing android side of things
Twigz Aug 19, 2025
a4352ff
Merge branch 'master' into twigz/onramp-rn-bridge
Twigz Aug 25, 2025
bcb1287
Functioning identity and payment selection
Twigz Aug 25, 2025
da3a2b9
Update coloring to be a string
Twigz Aug 25, 2025
10248d5
Update HomeScreen.tsx
Twigz Aug 25, 2025
e7e37b7
At least sometimes display the payment image
Twigz Aug 25, 2025
67b7c55
Added bank account button
Twigz Aug 25, 2025
afcf4e0
Adds in registering a wallet UI
Twigz Aug 25, 2025
1e49365
Fix string
Twigz Aug 26, 2025
5bfb074
Updates Stripe SDK to 24.21.0 and adds CryptoOnramp
Twigz Aug 26, 2025
b4616bd
Adds createCryptoPaymentToken api
Twigz Aug 26, 2025
0273ee1
Modeled perform checkout as if the clientSecret was just a string
Twigz Aug 26, 2025
8521b27
Merge branch 'twigz/update-stripe-ios-pod' into twigz/onramp-rn-bridge
Twigz Aug 26, 2025
97b7ee9
Wrap the collapsible in a StripeProvider
Twigz Aug 26, 2025
5c42c23
Updates the actual Android released version
Twigz Aug 26, 2025
f8cc15c
Stop creating a map for the isLinkUser response
Twigz Aug 26, 2025
1a9a356
Adds in emitting results for authorize and checkout callbacks
Twigz Aug 26, 2025
53a15c5
Adds in missing authorize call
Twigz Aug 26, 2025
e9f2361
handle through a promise instead of a listener
Twigz Aug 26, 2025
52b445e
Update to use promises with types
Twigz Aug 26, 2025
bcd0e9a
Remove unnecessary emitters
Twigz Aug 26, 2025
d6ec796
No need to return a map anymore
Twigz Aug 26, 2025
f85396a
Remove unnecessary type declarations
Twigz Aug 26, 2025
bb25388
update api naming
Twigz Aug 27, 2025
3f0fa5d
Rename collectPaymentMethod
Twigz Aug 27, 2025
7bdf61b
Add in code for checkout
Twigz Aug 27, 2025
eb3d15c
Implements first 5 iOS CryptoOnrampCoordinator methods
mliberatore Aug 27, 2025
67f3e08
Merge branch 'twigz/onramp-rn-bridge' of https://github.com/stripe/st…
mliberatore Aug 27, 2025
da97041
Implements onrampAuthorize
Twigz Aug 27, 2025
38275af
Implements attachKycInfo on iOS
mliberatore Aug 27, 2025
605d878
Implements createCryptoPaymentToken on iOS
mliberatore Aug 27, 2025
310d2d7
Minor refactor to reduce duplication around finding presenting view c…
mliberatore Aug 27, 2025
25530a2
Implements verifyIdentity on iOS
mliberatore Aug 27, 2025
056ddc5
Update build.gradle
Twigz Aug 27, 2025
c73b182
Moves view controller access out of Tasks
mliberatore Aug 27, 2025
4000bca
Merge branch 'twigz/onramp-rn-bridge' of https://github.com/stripe/st…
mliberatore Aug 27, 2025
67a5f76
Implements collectPaymentMethod on iOS
mliberatore Aug 27, 2025
3b4b55c
Adds in ui for creating a crypto payment token
Twigz Aug 27, 2025
223f0b6
Button for authorization, need LAI inserted
Twigz Aug 27, 2025
c135fb9
View controller access was still on a background thread (the RN bindi…
mliberatore Aug 27, 2025
10a4eae
Renames provideCheckoutClientSecret parameter
mliberatore Aug 27, 2025
e72cda8
Implements performCheckout on iOS
mliberatore Aug 27, 2025
7d9b944
Add in kyc attachment ui for testing
Twigz Aug 27, 2025
26eed25
Adds in the api for updating phone number
Twigz Aug 28, 2025
6fd3790
Adds Apple Pay support on iOS
mliberatore Aug 28, 2025
b4bfc24
Merge branch 'twigz/onramp-rn-bridge' of https://github.com/stripe/st…
mliberatore Aug 28, 2025
93a57e1
Removes unneeded structures surrounding single return values
mliberatore Aug 28, 2025
32bd009
zeros out kyc ssn
mliberatore Aug 28, 2025
b8ad64d
Propagates errors appropriately for kycInfo collection on iOS
mliberatore Aug 28, 2025
b21e84a
fix android build
lng-stripe Aug 28, 2025
b7d1ee8
Updates iOS SDK to latest
mliberatore Aug 28, 2025
cfdea91
Implements onrampAuthorize on iOS
mliberatore Aug 28, 2025
7fabe47
Adds test UI for onrampAuthorize
mliberatore Aug 28, 2025
f2218f8
Silences warning in unimplemented updatePhoneNumber on iOS
mliberatore Aug 28, 2025
49479e4
Update CryptoOnrampScreen.tsx
Twigz Aug 28, 2025
e70f290
Merge branch 'twigz/onramp-rn-bridge' of https://github.com/stripe/st…
Twigz Aug 28, 2025
cc32109
propagate configuration result
lng-stripe Aug 28, 2025
f0526dd
adds unimplemented logout api
Twigz Aug 28, 2025
98451ea
Merge branch 'twigz/onramp-rn-bridge' of https://github.com/stripe/st…
Twigz Aug 28, 2025
5133bfd
Uses appropriate emitter on iOS for checkout
mliberatore Aug 28, 2025
5f78069
Gets Check Out working in example; removes duplicate Authorize UI
mliberatore Aug 28, 2025
fbc9da3
Change emitting to use existing invocation
Twigz Aug 28, 2025
b5e38e9
Adds `StripeProvider` with publishableKey and merchantIdentifier for …
mliberatore Aug 28, 2025
5dd3e5a
Merge branch 'twigz/onramp-rn-bridge' of https://github.com/stripe/st…
mliberatore Aug 28, 2025
0b3c3ac
Silences warning in unimplemented API on iOS
mliberatore Aug 28, 2025
c492019
move functions to useOnramp() hook
lng-stripe Aug 28, 2025
9f703cd
refactor: move LinkUserInfo type to Onramp.ts and update imports
lng-stripe Aug 29, 2025
618e659
refactor: consolidate CryptoNetwork and KycInfo types in Onramp.ts
lng-stripe Aug 29, 2025
82db96e
rm idtype and kycinfo fields
lng-stripe Aug 29, 2025
58970cc
rm "onramp" from useOnramp() functions
lng-stripe Aug 29, 2025
fab4192
add OnrampConfiguration; cleanup defaults
lng-stripe Aug 29, 2025
cdadf9c
Switch iOS impl to use resolver instead of rejector in error cases
mats-stripe Aug 29, 2025
8cfbab9
Update example app to use new error handling pattern
mats-stripe Aug 29, 2025
23d1aac
inline for simplicity
lng-stripe Aug 29, 2025
b039846
update types
lng-stripe Aug 29, 2025
40ec1d5
fix codegen
lng-stripe Aug 29, 2025
fab6079
Use VoidResult type for remaining APIs on iOS
mats-stripe Aug 29, 2025
6e05bc6
update configureOnramp()
lng-stripe Aug 29, 2025
496baa1
update hasLinkAccount
lng-stripe Aug 29, 2025
872f13c
fix registerWalletAddress and registerLinkUser
lng-stripe Aug 29, 2025
b9f882f
fix rest of Android Onramp; update AuthorizeResult
lng-stripe Aug 29, 2025
cd51e12
Fix AuthorizeResult shape on iOS impl
mats-stripe Aug 29, 2025
cf32fee
fix handleOnrampAuthenticationResult
lng-stripe Aug 29, 2025
b65f09c
alert configuration success
lng-stripe Aug 29, 2025
117c0b9
set version
lng-stripe Aug 29, 2025
9e520de
improve demo UI
lng-stripe Aug 29, 2025
d2f1ee8
defaults
lng-stripe Aug 29, 2025
f13e645
more UI cleanup
lng-stripe Aug 29, 2025
f044a8f
Makes appearance specification more permissive on iOS in the case of …
mliberatore Sep 2, 2025
626ef85
[onramp][private-beta] Conditionally include Onramp; fixes & improvem…
lng-stripe Sep 8, 2025
c46aeef
logOut Android binding (#2098)
lng-stripe Sep 8, 2025
2b9051c
Merge remote-tracking branch 'origin/master' into beta/crypto-onramp
carlosmuvi-stripe Sep 8, 2025
1ca77a1
add update phone number example UX (#2100)
lng-stripe Sep 8, 2025
eb6912f
[Onramp] Bumps native versions (#2101)
carlosmuvi-stripe Sep 9, 2025
194c847
[Onramp] Implements Remaining Bindings for StripeCryptoOnramp on iOS …
mliberatore Sep 9, 2025
88a1ff4
fix: add missing await to NativeStripeSdk.initialise calls (#2113) (#…
lng-stripe Sep 11, 2025
feb04b4
Crypto Onramp Example Cleanup (#2106)
Twigz Sep 11, 2025
e718aca
Crypto Onramp Example Refactoring (#2126)
Twigz Sep 16, 2025
130ac95
[onramp] Configure with crypto customer ID (#2138)
lng-stripe Sep 22, 2025
ffde7d6
Crypto Onramp Payment Display Data (#2132)
Twigz Sep 22, 2025
7da784d
Revert "Use files instead of npmignore to cleanup npm package (#2081)…
porter-stripe Sep 8, 2025
b4aaa5d
Update package.json (#2105)
porter-stripe Sep 9, 2025
f905dad
Bump version number to 0.52.0-crypto-onramp-2-private-beta
gbirch-stripe Sep 22, 2025
4848f86
fix current version
lng-stripe Sep 23, 2025
96a771e
bump 0.52.0-crypto-onramp-2-private-beta.1
lng-stripe Sep 23, 2025
a588e9d
Update NativeOnrampSdkModuleSpec.java (#2141)
Twigz Sep 23, 2025
dd847e3
bump 0.52.0-crypto-onramp-2-private-beta.2
lng-stripe Sep 23, 2025
275c461
bump stripe-ios 24.24.1 (#2152)
lng-stripe Sep 29, 2025
85664a5
Exposes CreateRadarSession, and implements it in iOS bindings
mliberatore Oct 14, 2025
ceb4571
Implements teh createRadarSession function
Twigz Oct 14, 2025
ba1d814
lint
Twigz Oct 14, 2025
4a3f3d6
Exposes the new function via `useStripe`
mliberatore Oct 14, 2025
5242b6e
Commits the changes to Podfile.lock
mliberatore Oct 14, 2025
8092bb2
Adds test button
mliberatore Oct 14, 2025
0ae71a4
Fix return types
Twigz Oct 14, 2025
25febe8
Revert "Adds test button"
mliberatore Oct 14, 2025
11171c7
Merge branch 'mliberatore/expose-create-radar-session' of https://git…
mliberatore Oct 14, 2025
689a34a
Revert "Commits the changes to Podfile.lock"
mliberatore Oct 14, 2025
6e6a308
Merge `master` Into Beta Branch (#2202)
Twigz Nov 6, 2025
01f3f2f
CryptoOnramp: Minimal Migration to iOS SDK 25.0.0 (#2198)
mliberatore Nov 6, 2025
e68eab7
Merges `master` into Crypto Onramp Beta Branch (#2217)
mliberatore Nov 12, 2025
6dd9523
Merge branch '0.52.0-crypto-onramp-2-private-beta' into mliberatore/e…
mliberatore Nov 12, 2025
b94044f
Merge branch 'master' into mliberatore/expose-create-radar-session
mliberatore Dec 9, 2025
6b83f37
Fixes stray merge artifacts
mliberatore Dec 9, 2025
71efb91
Lint
mliberatore Dec 9, 2025
c2f912d
Adds missing import
mliberatore Dec 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.browser.customtabs.CustomTabsIntent
import androidx.fragment.app.FragmentActivity
import com.facebook.react.ReactActivity
Expand All @@ -19,6 +20,7 @@ import com.facebook.react.bridge.ReadableArray
import com.facebook.react.bridge.ReadableMap
import com.facebook.react.bridge.UiThreadUtil
import com.facebook.react.bridge.WritableMap
import com.facebook.react.bridge.WritableNativeMap
import com.facebook.react.module.annotations.ReactModule
import com.reactnativestripesdk.addresssheet.AddressLauncherManager
import com.reactnativestripesdk.customersheet.CustomerSheetManager
Expand Down Expand Up @@ -63,6 +65,7 @@ import com.stripe.android.model.ConfirmPaymentIntentParams
import com.stripe.android.model.ConfirmSetupIntentParams
import com.stripe.android.model.PaymentIntent
import com.stripe.android.model.PaymentMethod
import com.stripe.android.model.RadarSession
import com.stripe.android.model.SetupIntent
import com.stripe.android.model.Token
import com.stripe.android.payments.bankaccount.CollectBankAccountConfiguration
Expand Down Expand Up @@ -1293,6 +1296,31 @@ class StripeSdkModule(
}
}

@ReactMethod
override fun createRadarSession(promise: Promise) {
if (!::stripe.isInitialized) {
promise.resolve(createMissingInitError())
return
}

stripe.createRadarSession(
stripeAccountId = stripeAccountId,
callback =
object : com.stripe.android.ApiResultCallback<RadarSession> {
override fun onSuccess(session: RadarSession) {
val result = WritableNativeMap()
result.putString("id", session.id)
promise.resolve(result)
}

override fun onError(e: Exception) {
promise.resolve(createError(ErrorType.Failed.toString(), e))
}
},
activity = getCurrentActivityOrResolveWithError(promise) as? AppCompatActivity,
)
}

@ReactMethod
override fun createEmbeddedPaymentElement(
intentConfig: ReadableMap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,8 @@ private void invoke(String eventName) {
@ReactMethod
@DoNotStrip
public abstract void removeListeners(double count);

@ReactMethod
@DoNotStrip
public abstract void createRadarSession(Promise promise);
}
6 changes: 6 additions & 0 deletions ios/StripeSdk.mm
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ - (instancetype)init
[StripeSdkImpl.shared customPaymentMethodResultCallback:result resolver:resolve rejecter:reject];
}

RCT_EXPORT_METHOD(createRadarSession:(nonnull RCTPromiseResolveBlock)resolve
reject:(nonnull RCTPromiseRejectBlock)reject)
{
[StripeSdkImpl.shared createRadarSession:resolve rejecter:reject];
}

/* clang-format on */

#ifdef RCT_NEW_ARCH_ENABLED
Expand Down
21 changes: 21 additions & 0 deletions ios/StripeSdkImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import PassKit
@_spi(DashboardOnly) @_spi(STP) import Stripe
import StripeFinancialConnections
@_spi(STP) @_spi(ConfirmationTokensPublicPreview) import StripePayments
import StripePaymentsUI
#if canImport(StripeCryptoOnramp)
@_spi(STP) import StripeCryptoOnramp

Expand Down Expand Up @@ -1189,6 +1190,26 @@ public class StripeSdkImpl: NSObject, UIAdaptivePresentationControllerDelegate {
#endif
}

@objc(createRadarSession:rejecter:)
public func createRadarSession(
resolver resolve: @escaping RCTPromiseResolveBlock,
rejecter reject: @escaping RCTPromiseRejectBlock
) {
STPAPIClient.shared.createRadarSession { (session, error) in
if let error = error as NSError? {
resolve(Errors.createError(ErrorType.Failed, error))
return
}

guard let session else {
resolve(Errors.createError(ErrorType.Unknown, "Radar session not available"))
return
}

resolve(["id": session.id])
}
}

#if canImport(StripeCryptoOnramp)
@objc(configureOnramp:resolver:rejecter:)
public func configureOnramp(
Expand Down
10 changes: 10 additions & 0 deletions src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import type {
CanAddCardToWalletResult,
FinancialConnections,
PlatformPay,
CreateRadarSessionResult,
} from './types';
import { Platform, EventSubscription } from 'react-native';
import type { CollectFinancialConnectionsAccountsParams } from './types/FinancialConnections';
Expand Down Expand Up @@ -910,6 +911,15 @@ export const openPlatformPaySetup = async (): Promise<void> => {
}
};

/**
* Creates a [Radar session](https://docs.stripe.com/radar/radar-session).
* @returns A promise that resolves to a Radar session id, or an error.
*/
export const createRadarSession =
async (): Promise<CreateRadarSessionResult> => {
return await NativeStripeSdk.createRadarSession();
};

export const setFinancialConnectionsForceNativeFlow = async (
enabled: boolean
): Promise<void> => {
Expand Down
8 changes: 8 additions & 0 deletions src/hooks/useStripe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type {
FinancialConnections,
PlatformPay,
PlatformPayError,
CreateRadarSessionResult,
} from '../types';
import { useCallback } from 'react';
import {
Expand Down Expand Up @@ -59,6 +60,7 @@ import {
createPlatformPayToken,
updatePlatformPaySheet,
openPlatformPaySetup,
createRadarSession,
} from '../functions';
import type { CollectBankAccountTokenParams } from '../types/PaymentMethod';
import type { CollectFinancialConnectionsAccountsParams } from '../types/FinancialConnections';
Expand Down Expand Up @@ -320,6 +322,11 @@ export function useStripe() {
return openPlatformPaySetup();
}, []);

const _createRadarSession =
useCallback(async (): Promise<CreateRadarSessionResult> => {
return createRadarSession();
}, []);

return {
retrievePaymentIntent: _retrievePaymentIntent,
retrieveSetupIntent: _retrieveSetupIntent,
Expand Down Expand Up @@ -355,5 +362,6 @@ export function useStripe() {
createPlatformPayToken: _createPlatformPayToken,
updatePlatformPaySheet: _updatePlatformPaySheet,
openPlatformPaySetup: _openPlatformPaySetup,
createRadarSession: _createRadarSession,
};
}
2 changes: 2 additions & 0 deletions src/specs/NativeStripeSdkModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import type {
StripeError,
Token,
VerifyMicrodepositsParams,
CreateRadarSessionResult,
} from '../types';
import type {
EmbeddedPaymentElementConfiguration,
Expand Down Expand Up @@ -193,6 +194,7 @@ export interface Spec extends TurboModule {
intentConfig: UnsafeObject<IntentConfiguration>
): Promise<void>;
clearEmbeddedPaymentOption(viewTag: Int32): Promise<void>;
createRadarSession(): Promise<CreateRadarSessionResult>;

setFinancialConnectionsForceNativeFlow(enabled: boolean): Promise<void>;

Expand Down
5 changes: 5 additions & 0 deletions src/types/Errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,8 @@ export enum PlatformPayError {
Failed = 'Failed',
Unknown = 'Unknown',
}

export enum RadarError {
Failed = 'Failed',
Unknown = 'Unknown',
}
11 changes: 11 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type {
StripeError,
VerifyMicrodepositsError,
CollectBankAccountError,
RadarError,
} from './Errors';
import * as ApplePay from './ApplePay';
import * as PaymentIntent from './PaymentIntent';
Expand Down Expand Up @@ -176,6 +177,16 @@ export type ConfirmPaymentSheetPaymentResult = {
error?: StripeError<PaymentSheetError>;
};

export type CreateRadarSessionResult =
| {
id: string;
error?: undefined;
}
| {
id?: undefined;
error: StripeError<RadarError>;
};

export type ApplePayResult =
| {
paymentMethod: PaymentMethod.Result;
Expand Down