#slendie_api

1 messages ยท Page 1 of 1 (latest)

gray turtleBOT
#

๐Ÿ‘‹ 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/1367937934732558396

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

wheat eagle
hot prism
#

Yes, I'm using a supported country

#

Was that request ID helpful? If not I'm happy to find another one

wheat eagle
#

That is not a Stripe owned request id. Stripe request ids would look something like req_

#

Can you share the entire Address Element creation code with me?

hot prism
#

Yes

#

<AddressElement
options={{
mode: 'shipping',
blockPoBox: true,
fields: {
phone: 'always',
},
validation: {
phone: {
required: 'always',
},
},
display: {
name: 'split',
},
autocomplete: {
mode: 'google_maps_api',
apiKey: 'AIzaSyCQnlisVwSQiGo1-8XA4wadUS_I_4ZAoo8',
},
}}
onChange={event => {
console.log('event', event);
const address = {
firstName: event.value.firstName,
lastName: event.value.lastName,
line1: event.value.address.line1,
line2: event.value.address.line2,
city: event.value.address.city,
state: event.value.address.state,
zipCode: event.value.address.postal_code,
country: event.value.address.country,
phoneNumber: event.value.phone,
};
dispatch(stripeUpdateAddressForm({ address }));
// onChange(address);
setIsAddressValid(event.complete);
}}
className={classNames(styles.addressElement, {
[styles.mobileAddressElement]: isMobile,
})}
/>

#

And I'll try to find a good request ID too, one sec

hot prism
#

Yeah, it's strange

wheat eagle
#

Can you share your URLso I can try to replicate this on my end?

hot prism
#

Sadly no, I'm doing this locally

#

What about a request ID?

wheat eagle
#

I'm trying to see what an example payment would be to see if I can debug it on my end

#

Without a URL, this would be harder to debug

hot prism
#

You can ignore that last comment about local, I was wrong ๐Ÿ™ƒ

#

Anyway...is there a request ID I can provide?

wheat eagle
#

Since it's happening on the client side I'm thinking the URL will be helpful. If it's not local can you share the public link so I can attempt to reproduce this on my end?

hot prism
#

It is local

#

There's no URL I can give you to test this. But I can look at the network calls and find request IDs

#

Ok so yeah it looks like there's an issue with my api key configuration

#

One other question - it's not working when I try this either, can you tell me why?
autocomplete: {
mode: 'automatic',
},

wheat eagle
#

Ah, api key config. will cause an issue

hot prism
#

Yeah, that's on my end

#

But can you help me figure out why automatic isn't working?

#

Is it because I don't also have a PaymentElement on the page?

wheat eagle
#

You're exactly right!

hot prism
#

Darn, ok. Is there any wya around that?

#

I'm using PaymentElement, but not in the same Element provider

wheat eagle
#

There is not, if you use the Address Element by itself you need to pass the API key fron google maps

hot prism
#

Ok no worries, thanks

#

I got it working via my Google Api key, so all good ๐Ÿ˜Ž

#

Thanks for the help!

wheat eagle
#

Great to hear!

hot prism
#

Oh one more thing

#

If we do use the automatic autocomplete, do we have to pay for the Google API usage?

#

Or is that included in our stripe contract

wheat eagle
hot prism
#

OK no problem, thanks again

wheat eagle
#

Sure