#inderjit-janjua_code

1 messages ¡ Page 1 of 1 (latest)

pliant badgerBOT
#

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

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

fresh anchorBOT
random spear
#

Sorry I need to make an update

#

The code is this

<Elements
          stripe={stripePromise}
          // options={{
          //   clientSecret: clientSecret, // Pass the client secret here
          // }}
          options={{
            mode: "payment",
            amount: convertToSubcurrency(amount), // Convert amount to subcurrency
            currency: currency, // Set the currency
          }}
        >
          <CheckoutComponent
            paymentIntentId={paymentIntentId} // Pass the payment intent ID
            clientSecret={clientSecret} // Pass the client secret for authentication
            amount={amount} // Pass the original amount
            connectedAccountId={connectedAccountId} // Pass the connected account ID to the component
          />
        </Elements>
#

The create payment intent call is made on the connected account as expected

#

The confirm payment intent call isn't (I'll provide the code soon)

#
/ Submit the PaymentElement and confirm the payment
        const { error } = await stripe.confirmPayment({
            elements,
            clientSecret, // Pass the client secret here
            confirmParams: {
                return_url: `${getBaseUrl()}/payment/payment-success?amount=${amount}`,
            },
            
        });
green aspen
random spear
#

Its because i'm passing in the client secret

#

That might be it

#

Let me test

#

What does this do

const stripe = useStripe();
green aspen
#

This is the stripe hook to get the stripe instance that has already been initialised

random spear
#

Okay thank you

#

Found it

green aspen
pliant badgerBOT
random spear
#

That worked!!!!

#

Beautiful responses