#rooban1905_error

1 messages ¡ Page 1 of 1 (latest)

muted lionBOT
#

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

teal junco
#

That's a common error when

  1. You look at PI on a diffrent Stripe account,
  2. The PI belongs to Connected Account where you are using Platform key,
  3. The PI belongs to Platform Account where you are using Platform key + the Stripe Account header
balmy oasis
#

What do you mean by PI ?

frigid thorn
#

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

teal junco
#

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

frigid thorn
#

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.

teal junco
#

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

frigid thorn
#

Along with publish key we need to mention stripeaccountID in provider right?

teal junco
#

Yes

balmy oasis
#

Okay, Will try and let you know

balmy oasis
#

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

teal junco
#

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

balmy oasis
#

Yes, So.. I am updating the useState that holds the value for the stripeAccountId

muted lionBOT
steep thunder
#

Hi @balmy oasis I'm taking over, let me know if you have any follow-up questions

balmy oasis
#

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

steep thunder
balmy oasis
#

useEffect(() => { initStripe({ stripeAccountId, publishableKey : "...", }); }, [stripeAccountId]);

I hope you are telling this, still the issue persists

steep thunder
#

I mean you should call initStripe again when stripeAccountId changes. Did you do that?

balmy oasis
#

trying now