#ryuuuu

1 messages ยท Page 1 of 1 (latest)

winter depotBOT
unique forge
#

Hi ๐Ÿ‘‹

Which integration are you referring to?

real viper
#

So im using a nuxt frontend

#

with stripe.js

#

setup like this

#

im only using the stripe js element so i can get the payment method, which i then send to my backend to save to the customer

unique forge
#

Can you share the docs you are using

real viper
#

the thing is, as you can see from the UI photo, its requesting a country but i dont think its saving it to the PM, so i would assume if i add the name field it wouldnt save it either

unique forge
#

Have you inspected the Payment Method that is created?

real viper
#

yeah, i saved some cards (the test ones) with Romania as a country, and i then i used my php backend to get them from the customer, it looks like it still says US

unique forge
#

Do you see it in the billing_details.address?

real viper
#

oh

#

yeah it is there

#

i didnt realise theres 2 country fields

#

so adding a name field to the stripe.js form should work then

unique forge
#

It is kind of confusing.

real viper
#

so that stripe.js creates the PM already with the full name of the card owner set?

#

im only using stripe.js to get the PM id, and then sending that to my backend to save to the customer as default payment method

unique forge
#

The Payment Element will dynamically determine what information to collect based on the Payment Method. You can only specify auto or never for what information to collect.

#

If you want to always collect the full name on the card I would recommend you set name: 'never' and add a field of your own. Then you could pass that data in the billing details when confirming the setup intent

real viper
#

hm this is weird, i would've tought theres an "always" option too

unique forge
#

Yes I can understand that frustration.

real viper
#

hmm alright i know what i'll do, i'll just request the base 3 fields for the card and thats it, and then have another page for the user to save his whole billing details

#

from what i can see you cant attach the name/country straight to the card, it would go into billing details anyways

#

and since i plan for my customers to only have 1 card at once saved, ill just give them to option to fill out the whole billing details with name,email,phone,address etc and update the payment method with those after its already saved to the customer

#

if i use that payment method to pay for an invoice, will all those billing_details be added to the invoice too automatically?

unique forge
real viper
#

hmm i was hoping its gonna show somewhere in the invoice PDF

#

as like, the customers billing address

unique forge
#

So in the rendered invoice PDF?

#

Have you tested this?

real viper
#

nope, i just tested it now by settings the PM details from the dashboard

#

looks like it doesnt show up on the invoice

#

i guess, i dont really have any need to collect any of this info

#

just saving the PM using the card number, expiry date, and CVC and paying an invoice with it should be enough

unique forge
real viper
#

ohh ok they show up on the invoice now, i got confused again because i couldnt find a billing address on the customer except on the payment method itself

#

i tested with adding billing details straight to the customer from the dashboard and its showing up on the invoice

#

theres so many different places to save addres/country/name/email etc. its gotten really confusing

#

but i got it now, its alot more clear

#

thank you for the help

unique forge
#

Happy to shed what ๐Ÿ’ก I can ๐Ÿ™‚

real viper
#

๐Ÿ˜„