#phillip_api
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/1222832659680591964
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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
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.
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
I am not 100% sure either, let me check...
Looking through the SDK typedefs i do not see a way documented.
https://github.com/stripe/stripe-react-native/blob/e4634f37cce36fe20d74628ed8d9b15b343053be/src/types/PaymentSheet.ts#L13-L58
It's when you set up Stripe: https://stripe.dev/stripe-react-native/api-reference/interfaces/InitStripeParams.html#stripeAccountId
Ok is there a reference doc on how to use InitStripe instead of Wrapping the App in StripeProvider
StripeProvider has the StripeAccountId prop: https://github.com/stripe/stripe-react-native/blob/master/src/components/StripeProvider.tsx#L59
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
Happy to help.