#KayBee

1 messages ยท Page 1 of 1 (latest)

shut pondBOT
mental peak
#

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?

candid crescent
#

android is working fine. This is only happening on an ios device build.

#

this is happening only for ACH payments

mental peak
#

What are you seeing in your SDK logs?

candid crescent
#

i just have the react native stripe library

mental peak
#

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?

candid crescent
#

it works fine on simulator

#

0.23.3 is the stripe version

mental peak
candid crescent
#

yeah i'm using expo

#

so it suggests the latest compatible version as 0.23.3

#

have you faced this issue anytime ?

mental peak
#

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

candid crescent
#

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

mental peak
#

can you share the code you're using for PaymentSheet?

I am curious this is related to the location you're testing from too.

candid crescent
#

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('/')

mental peak
#

I think that's the issue

#

link variable

candid crescent
#

what do you suggest there?

mental peak
#

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

candid crescent
#

so a valid url will be https?

#

deep link wont work?

mental peak
#

A custom URL scheme should also be supported.

candid crescent
#

i'm passing my urlScheme inside the stripeprovider component

#

does that help?

mental peak
#

Can you share the code?

candid crescent
#

<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>

mental peak
#

what's the url_prefix here?

candid crescent
#

it can be myapp

#

it's a dynamic value since we manage a few branded apps

mental peak
#

Yeah so you'd use the same prefix based url scheme to the returnUrl

It's shown in the doc I shared above

candid crescent
#

yeah so it should work right?

#

the deep link

mental peak
#

yes but you're currently just passing / as returnURL

const link = Linking.createURL('/')

returnURL: link

#

you need to pass in the prefix too

candid crescent
#

actually Linking does that automatically

mental peak
#

Can you try passing yourscheme://path to returnURL rather than passing the link variable and see if that changes anything?

candid crescent
#

okay i'll try that

#

i'll let you know in sometime

mental peak
#

๐Ÿ‘