#xignotic

1 messages ยท Page 1 of 1 (latest)

smoky basinBOT
lone ocean
#

Hello ๐Ÿ‘‹
Can you share the example requests where you're seeing this?

livid mountain
lone ocean
#

Can you share the ID string as text?

livid mountain
#

pm_1NQWDyAQCTwqaVCWmzsDC4BH

#

req_qssWWWHKssOnnm

#

?

lone ocean
#

Apologies, still looking..

livid mountain
#

I have my address element in the details tab and payment in the other

#

the name only gets passed if its required on the payment tab

#

but no data from address

smoky basinBOT
deft hornet
#

Can you send the text of the code where you are confirming this intent client-side?

livid mountain
#
        const { error } = await stripe.confirmPayment({
            elements,
            confirmParams: {
                return_url: "http://localhost:3000/123",
            },
        });
``` This?
#

It also seems that the auto complete for the address doesnt work as well

#

?

solid river
#

Hi there ๐Ÿ‘‹ can you show the code you're using to create and mount your elements?

livid mountain
#

Just doing it like this

solid river
#

It's a bit hard to tell with how cropped the screenshots, are the Payment Element and Address Element being returned together?

livid mountain
#
 <Tabs isLazy={true} index={activeStep}>
                            <Elements stripe={stripePromise} options={options} appearance={options.appearance}>
                                <FormElements activeStep={activeStep} goToNext={goToNext}/>
                            </Elements>
                    </Tabs>```

Form Elements:
```js

  <Flex justifyContent={'space-between'}>
            <TabPanels>
                <TabPanel>
                    <DetailsTab/>
                </TabPanel>
                <TabPanel>
                    <PaymentDetailsTab/>
                </TabPanel>
            </TabPanels>
            <Box>
                <TransactionOverview isLoading={isLoading} activeStep={activeStep} goToNext={goToNext}/>
            </Box>
        </Flex>```
#

if I do this in the form submit handler I get undefined

        console.log(elements.getElement('address')?.getValue())
#

The address element doesnt seem to ever be mounted but within the element itself I can get the values

solid river
#

I'm not sure I understand that last part, how are you getting values from the Address element if you aren't seeing it mounted on the page?

livid mountain
#

Got it working, it seems the be something with lazy loading the elements

#

I do have a few more questions, when running locally is it meant to still send receipt emails?

solid river
#

Receipt email functionality is not impacted by whether you're running locally, but most email functionality is suppressed when you're working in test mode. I'm not entirely certain on this as we don't deal with email features too often in this forum, but I've heard that some emails will still be generated if the email address exactly matches the email address of the owner of the Stripe account.

livid mountain
#

Alright thanks

solid river
livid mountain
#

Last thing I was wondering was, how am I meant to handle the payment completions with the redirect url

#

Do I fetch the paymentIntent on the page load and then display something based off of that?

solid river
#

Possibly, what are you trying to accomplish?

livid mountain
#

I want to basically show a payment confirmed page with an overview of the payment with their details and the items they've purchased, sorta like a receipt page

solid river
#

Gotcha, that's still a little vague though, without knowing what details you want to show I won't know where to suggest you look to pull those. If you're working with Payment Intents, then they don't store line item data on them, so you won't be able to reference that object to show what was purchased unless you're manually storing that information inside of the intent's metadata. If there are other details that are on the Payment Intent that you do want to share though, then you will want to retrieve that object, those details are not automatically passed to your confirmation page.

livid mountain
#

Like for example I just want to retrieve the name of item, and price of the item purchased

solid river
#

Are you working directly with Payment Intents, or are you working with higher order objects like an Invoice?

I'm asking because Payment Intents don't accept Price objects to calculate the amount a Customer should be charged, they instead expect to be provided an amount that is calculated by your code. So if you're doing those calculations then the price details you're looking for may need to be retrieved from your servers rather than from Stripe.

livid mountain
#

Just payment intents directly

#

Ah okay, thanks

solid river
#

Any time!