#chuckkimmel_link-billingdetails

1 messages ยท Page 1 of 1 (latest)

deep oreBOT
#

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

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

river bear
#

Thank you for the report. Looking in to this and I will get back to you.

#

Can you send me the code that you currently have for providing this payment_method_data?

pale summit
#

const { error } = await stripe.confirmPayment({
elements,
clientSecret,
confirmParams: {
return_url: window.location.origin + '/payment-success',
receipt_email: email,
payment_method_data: {
billing_details: {
name: name,
email: email,
phone: phone,
},
},
},
});

#

elements variable is created by using useElements hook in @stripe/react-stripe-js

river bear
#

Interesting, that same code works for me with Link payments

#

The billing data is showing up on the PM and Charge

#

Can you send me the ID of a payment intent that you saw this behavior on?

pale summit
#

I'm waiting on the two-factor code to get into the account. I will send it once I get access.

#

thanks.

river bear
#

@pale summit Are you still waiting for the PaymentIntent ID?

pale summit
#

yeah, I didn't have access to the phone that was receiving the code. Just got it.

#

@river bear pi_3PIcwFFdrnxqeOnB03dMHtw0

river bear
#

In your request log, I am not seeing anything passed in for payment_method_data.billing_details, but I do see it in the logs for my call that set the data on the Charge successfully. Is it possible that your intent was confirmed before your code that passes this was deployed?

pale summit
#

Ok. I'll recheck. It should be the same code that is working for the credit card form, but I'll investigate further. Thanks for your help.

river bear
#

Sounds good, I am not seeing this data in the logs for your recent /confirm calls that came from a browser. Let us know if you need any help while investigating

deep oreBOT
pale summit
#

Yeah, this is currently in dev, so most of the transactions you see wouldn't have this change. Thanks for the heads up though.

#

I confirmed that these two payments run through the same code and had the same billing_details being passed:
pi_3PIdEyFdrnxqeOnB0zU4o2LR
pi_3PIdFiFdrnxqeOnB1Odmfv3O

#

the first was with a credit card and has the details, the second was will Link and does not.

#

I can confirm that I don't see the billing_details in the call to
POST /v1/payment_intents/pi_3PIdFiFdrnxqeOnB1Odmfv3O/confirm in the Stripe admin, but I'm not sure why it's not included. Are you testing with the React sdk or externally?

white crane
#

๐Ÿ‘‹ Stepping in for my teammate. Give me a few minutes to review the examples you shared

#

Hm, I don't see the details in the confirmation request. However, I do see the billing details (postal code, country, and email) in the PaymentMethod object that was used in the confirmation request

#

pm_1PIdFiFdrnxqeOnBYRMS4IEw

pale summit
#

yeah, it looks like the stripe react sdk is generating different requests for Link confirmations vs. credit card.

#

It looks like the Link request just sends "payment_method" instead of all the other data

white crane
#

Taking a step back, can you share more about your use case for testing this? When using Link, address and payment details from Link will be used for billing details so I'm not sure why you'd pass along other values for payment_method_data.billing_details when confirming a Link payment

pale summit
#

My client has processing setup that pulls customer data (name, email, phone) from billing_details on the Charge when they get a webook notifications that a charge is created/updated.

#

So that data not being filled in for Link orders breaks their processing

#

We are collecting name, email, and phone in the form that gathers payment, and that's the info they want in the charge object billing details.

#

If it's not possible, I can work with them to find a work around, I just need to confirm whether it's possible or not. ๐Ÿ™‚

white crane
#

For both the card and Link charges, I see charge.succeeded and charge.updated events that include country, zip, and email. However, only the card charge includes phone number

pale summit
#

Correct. From what I can tell, if that's passed in as part of the payment_method_data, it gets added to the charge. But the SDK isn't passing it as part of the request for Link payments, so it doesn't get set.

white crane
#

How are you collecting phone numbers from customers?

pale summit
#

Part of the form that collects the payment. It's separate from the Stripe Element. Then we pass it in in the billing details.

white crane
#

Hmm, I see. Let me check in with a teammate who's more familiar with React. I can't repro what you see; my calls to /confirm when I select Link include the payment_method_data.billing_details, and phone number that I pass in those billing details

pale summit
#

ok, thanks

white crane
#

Are you able to repro this behavior (missing payment_method_data.billing_details) in test mode?

#

Also, do you mind updating the messages above to remove/redact the phone number and email values? This is a public channel so anyone with access to this server will be able to see those details

#

I'm deleting the messages above but keeping this in case we need to refer back:

this is all sent for the cc confirmation:
"expected_payment_method_type": "card",
"use_stripe_sdk": "true",
"key": "pk_live...",
"receipt_email": "xxxx@gmail.com",
"client_secret": "",
"client_context": {
"mode": "payment",
"currency": "usd"
},
"payment_method_data": {
"referrer": "http://localhost:3000/",
"type": "card",
"billing_details": {
"address": {
"postal_code": "45069",
"country": "US"
},
"email": "xxxx@gmail.com",
"phone": "+1xxxxx",
"name": "xx"
},
"payment_user_agent": "stripe.js/1da4397375; stripe-js-v3/1da4397375; payment-element; deferred-intent; autopm",
"card": {
"number": " ** 8112",
"exp_month": "08",
"cvc": "*",
"exp_year": "24"
},
"muid": "64acaf2f-216c-4bca-bcbb-ac1840fc9aaa1c10cd",
"client_attribution_metadata": {
"merchant_integration_version": "2021",
"client_session_id": "ffd314f7-fe36-47a7-9433-bcaae64fb569",
"merchant_integration_source": "elements",
"payment_method_selection_flow": "automatic",
"payment_intent_creation_flow": "deferred",
"merchant_integration_subtype": "payment-element"
},
"sid": "9ad87c6b-5ad3-461e-9a16-5389b0cb4b450e610b",
"allow_redisplay": "unspecified",
"guid": "4b392dfa-bc49-475a-b13c-38348ba0c96ccb1594",
"time_on_page": "46753"
},

pale summit
#

ok, thanks

white crane
#

I'm deleting the messages above but keeping this in case we need to refer back:

Only this is sent for the Link confirmation:
"expected_payment_method_type": "card",
"use_stripe_sdk": "true",
"key": "pk_live...",
"receipt_email": "xxxx@gmail.com",
"client_secret": "",
"payment_method": "pm_1PIdFiFdrnxqeOnBYRMS4IEw",
"return_url": "http://localhost:3000/payment-success",

#

@pale summit are you able to reproduce this in test mode?

pale summit
#

I couldn't get Link working in test mode. It's disabled when I set it to test mode.

white crane
pale summit
#

ah ok. thanks.

#

@white crane I am seeing the same behavior in test mode

#

pi_3PIeV5FdrnxqeOnB0oYgVmnG

white crane
#

Do you have a test mode PI that was confirmed with the same code so I can compare?

pale summit
#

it's above

#

pi_3PIeV5FdrnxqeOnB0oYgVmnG

white crane
#

Ah, sorry, let me clarify. pi_3PIeV5FdrnxqeOnB0oYgVmnG was a test mode Link payment, correct? Do you have a test mode card payment?

pale summit
#

yes, that was a test Link payment

#

pi_3PIeXqFdrnxqeOnB1mrWCCOZ

#

for the credit card payment

white crane
#

Thanks!

rare swiftBOT
silent pine
#

๐Ÿ‘‹ hopping in here since roadrunner has to head out soon - give me a minute to catch up

pale summit
#

I'm heading out soon myself, so I can follow up tomorrow. Thanks for all the help everyone.

silent pine
#

I'll look for a bit longer and if I find anything I'll drop it in here before I close the thread.

silent pine
#

I've tried a couple of things, but I'm still not able to reproduce exactly what you're seeing for some reason - do you happen to be using the Link authentication element? If so, I'd want some more details on how you're using it. If not, I think a quick video showing how you repro in testmode would be helpful because there must be something obvious we're missing about the differences in our implementations