#Am-Payment

1 messages · Page 1 of 1 (latest)

hybrid kite
#

Hi there, can you copy and paste the PaymentIntent ID here?

rough bear
#

Payment intent: pi_3L7GdhGdSNBHdMPn1dZhsXM9
Status: requires_payment_method
Client secret: pi_3L7GdhGdSNBHdMPn1dZhsXM9_secret_CiQ4SqLogtegf21zkrlUeO0Xo

#

and here is the webhook implemented from backend side ,

hybrid kite
#

OK, so you just created a PaymentIntent. The response is 200 and I don't see an error here.

rough bear
#

Right from app side , we are getting error

hybrid kite
#

The app says the paymentIntent is invalid?

rough bear
#

and the reason is i am not sending account id for that specific payment

hybrid kite
#

If so, can you check if you are using the live mode publishable key at the mobile app?

rough bear
#

coz there are more than one account id connected to this payment intent

hybrid kite
#

Ok, pi_3L7GdhGdSNBHdMPn1dZhsXM9 is a direct charge, so you need to pass the connected account's ID to StripeAccountId when initialize the iOS SDK.

rough bear
hybrid kite
#

You can still use the platform's publishable key

rough bear
#

yea i am using it

#

so in that. payment intent there is only one accounnt connected for getting payment right ? @hybrid kite

hybrid kite
#

Can you show me the code on how you initialize the iOS SDK?

#

Check if you have set STPAPIClient.shared.publishableKey = Platform's test publishable key and STPAPIClient.shared.stripeAccount = connected account ID.

rough bear
#

the app is React native app

#

i have publishable key set always

hybrid kite
#

Are you using <StripeProvider> ?

rough bear
#

for stripe accoount id , if it is a shared payment (gonna distribute to more than one account)as i talked with support before , they said if it is not direct do not sent any accout id

#

yes

hybrid kite
#
<StripeProvider
      stripeAccountId='{connected account ID}'
      publishableKey={Platform's test publishable key}
#

Adding stripeAccountId to StripeProvider should solve your problem.

#

I don't quite get what you mean by shared payment, are you talking about destination charge?

rough bear
#

as you can see there can be more than one destination here

rough bear
hybrid kite
#

Can you check if you are passing the correct accountId?

rough bear
#

as it is a destinatioin charge and there are more than one account connected , i am not sending account

#

id params at all

#

last time i spoke with support. they said of there are more than one accounnt connected there is no need to send it

hybrid kite
#

But you passed a stripeAccountId when creating the PaymentIntent

rough bear
#

is that possible not sending account id while creating separate charges ?

hybrid kite
#

If you want to perform a destination charge, then you shouldn't specify a stripeAccount header when creating the paymentIntent

rough bear
#

o i see , so from the backend , while creating a destination charge no account id should be sent , right ?

hybrid kite
#

Yes you are right

#

And neither should you pass an accountId at mobile end.

rough bear
#

it is already not being sent from mobile app

hybrid kite
#

In summary, for Direct Charges -> you need to pass the Stripe-Account ID in both backend and frontend
for Destination charges or Separate charges and transfers -> You don't need to pass the Stripe-Account ID.

rough bear
#

got you point , gonna check it and if there were any issue gonna share it

#

thanks