#rooban1905_error
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1301029132708347945
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rooban_3ds-reactnative, 9 hours ago, 16 messages
That's a common error when
- You look at PI on a diffrent Stripe account,
- The PI belongs to Connected Account where you are using Platform key,
- The PI belongs to Platform Account where you are using Platform key + the Stripe Account header
What do you mean by PI ?
Scenario over here, PI is generated in back end for stripe connect sub account. So customer can make payment towards sub account
From backend(django) payment intend and client secret is generated and share with react native to handle next action
@balmy oasis can you share code snippet of your handling so @teal junco will have better context
acct_1QDkjHRsVwOeW4pi is Connected Account and acct_1PfGbNRttOLF9q7E is Platform account, correct?
You are on
The PI belongs to Connected Account where you are using Platform key,
So on React Native, you need to configure the SDK to understand the Stripe Account header
Use stripeAccountId in StripeProvider
From backend we are trying to charge. in case 3ds is there then we are sharing account Id, payment intend id, client secret so in react native they handle next steps.
Yes I understand. That's totally correct
It's the react native client need to configure to be able to handle the PI on Connected Account
Along with publish key we need to mention stripeaccountID in provider right?
Yes
Okay, Will try and let you know
`<StripeProvider
stripeAccountId={stripeAccountId}
publishableKey={'...'}>
<PlatformPayButton
type={PlatformPay.ButtonType.GooglePayMark}
onPress={pay}
style={{
width: '100%',
height: 50,
}}
/>
<CardForm
style={{height: 200, width: '100%'}}
onFormComplete={val => console.log(val, 'VALUEE')}
cardStyle={{
textColor: 'black',
cursorColor: 'black',
fontFamily: theme.fontFamily.medium,
textErrorColor: 'red',
placeholderColor: 'grey',
borderWidth: 0.5,
borderColor: 'grey',
}}
/>
</StripeProvider>`
Since, I am getting the account id from the backend response. I have to set up the stripe account id dynamically, but the error persist
Not sure how you are setting up dynamically. Are you updating StripeProvider after initialized?
Ultimately it's how to make sure the SDK recoginize this option
You can try to get the Account Id before initialization
Yes, So.. I am updating the useState that holds the value for the stripeAccountId
Hi @balmy oasis I'm taking over, let me know if you have any follow-up questions
Yeah @steep thunder . I am just updating the stripe account id dynamically on the stripe provider. Because, I am getting the stripe account id from the backend. And Still it shows the above mentioned error
https://github.com/stripe/stripe-react-native?tab=readme-ov-file#stripe-initialization
StripeProvider can accept urlScheme, publishableKey, stripeAccountId, threeDSecureParams and merchantIdentifier as props
So I don''t think you should use a state variable here.
Can you remove the StripeProvider and call initStripe funtion instead?
useEffect(() => { initStripe({ stripeAccountId, publishableKey : "...", }); }, [stripeAccountId]);
I hope you are telling this, still the issue persists
I mean you should call initStripe again when stripeAccountId changes. Did you do that?
trying now