#anh3608

1 messages · Page 1 of 1 (latest)

tawny wolfBOT
trail willow
pine hound
#

Thanks, let me try again. I had that setup earlier without LINK. Just realized I had {billingDetails: "never"} when I implement LINK. Maybe that why confirmPayment didn't update billing.

#

yes, I can use my own form to collect billing info to pass to stripe.confirmPayment after remove {billingDetails: "never"} from payment element.

#

now I have another question, with the {billingDetails:"never"} removed, payment element now show the checkbox "billing same as shipping" and ask for country/zipcode if it's unchecked. Is it possible to hide it since my own form already ask for the same info?

trail willow
#

Can you show me a screenshot of what you're seeing?

pine hound
#

right now customer will have to select billing country and zipcode twice: one on Stripe element form, and second time on my own billing form

trail willow
#

Are you using beta functionality in the Payment Element?

pine hound
#

you mean this?
betas: ["shipping_address_element_beta_1"]

trail willow
#

Ah, yeah, that explains it. The functionality you're using is a non-public beta, so we can't help with that part here. You would need to ask for help from the person who gave you access to the beta.

pine hound
#

that is on your Faster checkout with Link documentation page. I thought it's public

trail willow
#

Can you link me to that page?

trail willow
#

Ah, my fault, I didn't realize that was public.

pine hound
#

no problem

trail willow
#

I'm not sure I completely understand the behavior you want here. The Payment Element is designed to collect billing information, but it looks like you have a separate billing address section on your own form. You want to collect billing information using your own form because the Payment Element doesn't collect all of the information you want, correct?

pine hound
#

yes

trail willow
#

But you also want to collect a shipping address with the Stripe Shipping Address Element?

pine hound
#

yes

trail willow
#

Why do you want to use Stripe to only collect one address but not the other? I don't think the integration was designed for that scenario.

pine hound
#

no, i'm ok with Stripe collect billing address but it doesn't collect everything

trail willow
#

From the docs:

Display the shippingAddress Element before the payment Element. The payment Element dynamically detects address data collected by the shippingAddress Element, hiding unnecessary fields when possible, and collecting additional billing address details as necessary.

#

Why do you want to collect "everything" when it comes to the billing address?

pine hound
#

because my shopping cart system currently require both billing and shipping address

#

i would have to rewrite everything if I don't have billing address

#

without billing address, i would have to rewrite all the pages that display billing address for customer (invoice, order details,....)

trail willow
#

So, to clarify, if you set billingDetails to never with the Payment Element and you try to supply billingDetails when you call stripe.confirmPayment, what happens?

pine hound
#

it doesn't pass to confirmPayment

trail willow
#

What do you mean?

pine hound
#

there is a notes on the document

#

let me find it for you

#

give me a sec

trail willow
#

Not sure I understand?

#

That documentation indicates that you can pass billing_details in when you disable collection of billing details in the Payment Element, which is what you're doing.

#

If you collect billing details inside the Payment Element those details will override what you pass in here, but that's not what you're doing.

#

Can you clarify further what you mean by "doesn't pass to confirmPayment" means?

pine hound
#

by doing that, payment form doesn't collect billing info. I passed billing info via stripeConfirmPayment but nothing went through.

#

give me a sec. Let me run my code again to confirm

trail willow
#

Can you give me the Payment Method ID (pm_) created after you test?

#

Or the Payment Intent ID (pi_)?

pine hound
#

hmm..my bad. its working now. This is the one i just test pi_3LilBBFjgDuKhVRV0dPb5WVf

#

this is the one that billing details are all null pi_3LiLNQFjgDuKhVRV18crkkT4

trail willow
#

Maybe a typo or something?

pine hound
#

yes, let me test again to make sure

#

ok, look like billing details doesn't get update via stripe.confirmPayment if it's the new customer

#

pi_3Lim0GFjgDuKhVRV0mBP77Gx

trail willow
#

New customer?

#

Let me look...

pine hound
#

yes, new LINK customer

trail willow
#

Oh, interesting.

pine hound
#

If I place the order again under the same account, then billing details got update

#

same code

#

my server side returned billing details via ajax/json and I passed it to stripe.confirmPayment

#

pi_3Lim5dFjgDuKhVRV0F4tz3oU
same LINK customer as the one above, this time billing details is filled

trail willow
#

You're sure the expected billing_details are being passed to stripe.confirmPayment in both of these scenarios?

pine hound
#

yes

#

let me console log both scencarios. give me a sec

#

yes, billing_details are passed correctly for both cases

trail willow
#

I'm investigating internally, give me a few minutes...

#

It looks like this is actually expected behavior, but I'm trying to figure out why it's expected. In the meantime, to make sure I understand your use case, your goal is to have the billing details populated on the resulting Payment Method, correct?

pine hound
#

If i don't select "Save your info for secure 1-click checkout" then billing details is updated

#

yes, my codes is currently use the billing details returned from stripe webhook event to update some of the fields in my database.

#

it's odd that the behavior is not consistent. i think it should

trail willow
#

I agree, the inconsistency is unexpected. I'm continuing to investigate further internally.

#

However, that probably doesn't help much with your webhook scenario.

pine hound
#

can you keep me posted what you find? Should this be escalated to Stripe engineer?

trail willow
#

Yep! I'm a Stripe engineer, so that part is already done. 🙂

trail willow
#

@pine hound You around?

pine hound
#

I just stepped out.

trail willow
#

I just wanted to let you know that I'm unlikely to have more information for you about this today, but it also looks like this behavior is unlikely to change in the near future. Will the workaround I suggest above work? Or can you adapt it for your use case?

pine hound
#

Ok. Let me figure out a workaround. Thanks for looking into it

trail willow
#

Sorry I don't have better news, and sorry for the inconsistent experience here! I'll push internally to improve this.

pine hound
#

Thank you. That would be great

#

Have a nice weekend