#KayBee
1 messages ยท Page 1 of 1 (latest)
Hello ๐
That's not a lot of information to go with. What are you seeing in your SDK logs?
@candid crescent
Does this only happen on android? or ios too?
android is working fine. This is only happening on an ios device build.
this is happening only for ACH payments
What are you seeing in your SDK logs?
i just have the react native stripe library
What version of the SDK are you running? When you launch the payment sheet and try to load ACH, does throw any errors in your logs?
have you tried the latest version of the SDK to see if that changes anything? Latest is 0.29.0
https://github.com/stripe/stripe-react-native/releases
Are you using expo?
yeah i'm using expo
so it suggests the latest compatible version as 0.23.3
have you faced this issue anytime ?
I have not. that's why I am asking to see if you're seeing anything in your logs when you run the app on actual device
there is this other issue as well. Not a valid URL
this also happens only on a real IOS device
this happens for card payments
i guess both might be interrelated in some way
can you share the code you're using for PaymentSheet?
I am curious this is related to the location you're testing from too.
const initializePaymentSheet = async () => { const { error } = await initPaymentSheet({ customerId: session?.stripe_customer_id, paymentIntentClientSecret: session?.stripe_client_secret, merchantDisplayName: selectedCenter?.client?.name, allowsDelayedPaymentMethods: true, returnURL: link, appearance: { shapes: { borderRadius: 12, }, primaryButton: { shapes: { borderRadius: 12, }, }, colors: { primary: convertAndReturnHexColor(colors?.primary), }, }, }) if (error) { console.log('Stripe error', error) onFail?.(error?.localizedMessage ?? error?.message) clearSession() } else { openPaymentSheet() } }
const link = Linking.createURL('/')
what do you suggest there?
You need to provide a valid returnURL in order for payment sheet to handle payments correctly on iOS
this explains why it only throws an error on iOS
A custom URL scheme should also be supported.
Can you share the code?
<StripeProvider stripeAccountId={stripeAccountId || stripeSession?.stripe_account_id} publishableKey={ENV.STRIPE_KEY} urlScheme={ENV.url_prefix} threeDSecureParams={threeDSecureParams} > {isStripeCheckoutModalOpen && ( <StripeCheckout session={stripeSession} onSuccess={handleStripeSuccess} onFail={handleStripeFail} /> )} {children} </StripeProvider>
what's the url_prefix here?
Yeah so you'd use the same prefix based url scheme to the returnUrl
It's shown in the doc I shared above
yes but you're currently just passing / as returnURL
const link = Linking.createURL('/')
returnURL: link
you need to pass in the prefix too
Can you try passing yourscheme://path to returnURL rather than passing the link variable and see if that changes anything?
๐