#kirito-cardelement-split
1 messages ยท Page 1 of 1 (latest)
kirito-cardelement-split
Hey @tulip pagoda I'm going to need a looooot more details to help you with this
s
sure
At first it worked fine for me the I added AddressElment , and it stoped working even though, I remode the AddressElement i still got the probleme
my input jut turn to this
even the iban element
I'm sorry but there is no information in this other than "nothing works".
I need real actionable details: exact code, exact calls, which doc(s) you are following, etc.
sure
Okay, sorry, this feels like just an extract, it doesn't explain how you load Stripe.js. Also what is that setCardElementDetails where is that coming from?
Can you try and do a really basic/simple code example that purely and only has the card element first?
I will try
Do you see any JS error in the console? Is there a way for me to try this quickly somewhere like either online or if you use https://ngrok.com
I don't know why but the problem got fixed by itself ๐ after 5 min
lol I am a wizard, I'll take the win ๐
Do you have any doc that explain address element field?
I found this one but it does not go in detail about it https://stripe.com/docs/js/elements_object/create_address_element
thank you so much would I be able to retrieve the data of the element and passe it to a request to create subscription instead of pay a set up intent
yes you have callbacks with all the data
https://stripe.com/docs/elements/address-element/collect-addresses?platform=web#web-retrieve-address it's all documented in details
Ok thanks
How can I update the appearance , I tried ``` {
style: {
base: {
iconColor: "#292b2f",
color: "#292b2f",
fontWeight: "500",
fontSize: "16px",
fontSmoothing: "antialiased",
":-webkit-autofill": {
color: "#7a818e",
},
"::placeholder": {
color: "#7a818e",
},
},
},
mode: "billing",
appearance: {
theme: "night",
},
}```
as an options for the AddressElement
Sure welcome
The Appearance API does work with AddressElement. You want to refer to https://stripe.com/docs/elements/appearance-api for those customization options
well I have used this doc and the result I come with is : <AddressElement options={STRIPE_ADDRESS_ELEMENT_OPTION} />
avec ```STRIPE_ADDRESS_ELEMENT_OPTION={
style: {
base: {
iconColor: "#292b2f",
color: "#292b2f",
fontWeight: "500",
fontSize: "16px",
fontSmoothing: "antialiased",
":-webkit-autofill": {
color: "#7a818e",
},
"::placeholder": {
color: "#7a818e",
},
},
},
mode: "billing",
appearance: {
theme: "night",
},
}````
but i does not work
Gotcha, let me check one sec
Ok, thank you
Okay so your appearance object should be passed to your Elements Component's options
Not directly to the AddressElement component
Ok I understand (I guess) thanks
So it should look like <Elements options={STRIPE_ADDRESS_ELEMENT_OPTION} stripe={stripePromise}>