#phillip9345
1 messages ยท Page 1 of 1 (latest)
I'm afraid that there's no options to add custom field in AddressElement
@delicate hound Thanks for the fast reply. Is it however possible to store the company name? Because I saw other Stripe forms (checkout page) where I was able to put in my company name
If so, with which API? the create customer has no company name field as it seems: https://stripe.com/docs/api/customers/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I think what you refer to is tax ID collection https://stripe.com/docs/tax/checkout/tax-ids#create-session
https://stripe.com/docs/api/customers/create#create_customer-tax_id_data so you can use your own UI form to collec the tax ID data and set it on the customer.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
will it enable this checkbox? "Buy as a company"
the screenshot was taken from a checkout.stripe.com form
No, this form is only for Checkout page and won't be availble in PaymentElement
Alright thank you
Sorry, I still have a question regarding this. The tax_id_data does not show a company name.
I want to add my own "company name" input and make a separat API call to attach the company name to the customer... There must be some company_name property in the API, no?
If the checkout element stores the company_name that should also be possible with the API?
Why I need this: I want to show the company name on the invoice
๐ Taking over this thread, catching up now
Are you using Invoice product, direct payment with Payment Element or Checkout Session?
Hey @hollow tusk I created a subscription product and I collect the customer data with the Address and Payment Element
Can you share an example request (req_xxx) how you set the Tax ID now?
I don't do that at all at the moment...
This is my handleSubmit function
const { error, setupIntent: { payment_method } } = await stripe.value!.confirmSetup({
elements: elements.value,
redirect: 'if_required'
})
if (error) throw Error(error.message)
if (!payment_method) throw Error('No payment method returned')
paymentMethod.value = payment_method
// stripeUpdateCustomer: add name and address to customer
await stripeUpdateCustomer()
await stripeAttachPaymentMethod()
price.value = await stripeGetPriceById()
await stripeSubscribeUser()
Hi, can you try Custom fields on Invoice? https://stripe.com/docs/invoicing/customize#custom-fields