#phillip_api

1 messages ¡ Page 1 of 1 (latest)

woven flickerBOT
#

👋 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/1222832659680591964

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

kind marlinBOT
tall bay
#

Ideally i do not want to webview the Checkout Session URL.

Here is a similar issue - https://github.com/stripe/stripe-react-native/issues/1516
Although when i attempted to capture the PM from the SDK on my publishableKey even though my same secret is making the charge it fails

I create the invoice with:

const invoice = await stripe.invoices.create(
      {
        customer,
        application_fee_amount: fees.ourFee * 100,
      },
      {
        stripeAccount: stripeConnectAccount,
      }
    );

Retreive the PI with:

const retrievedInvoice = await stripe.invoices.retrieve(
      invoice_id,
      { expand: ["payment_intent"] },
      {
        stripeAccount: stripeConnectAccount,
      }
    );

Then return the paymentIntent?.client_secret which on the SDK fails to find the PI

rigid path
#

Hi, let me help you with this.

#

Are you using the Mobile Payment Sheet on React Native?

#

In general, you need to specify what account you want to confirm the payment on on the frontend, same as when you add stripeAccount on the backend.

tall bay
#

Yes i am using that.

#

I can not find a reference to where to add the stripeConnectAccount on the SDK when i initializePaymentSheet or presentPaymentSheet

rigid path
#

I am not 100% sure either, let me check...

tall bay
tall bay
#

Ok is there a reference doc on how to use InitStripe instead of Wrapping the App in StripeProvider

rigid path
tall bay
#

Really appreciate the help, This is solved.
I just initStripe before initializePaymentSheet

useEffect(() => {
    (async () => {
      await initStripe({
        publishableKey: SPK,
        stripeAccountId: stripeConnectAccount.id,
        merchantIdentifier: stripeConnectAccount.name,
      });

      await initializePaymentSheet();
    })();
  }, []);

Thanks you @rigid path

rigid path
#

Happy to help.