#clayphillips_07398
1 messages · Page 1 of 1 (latest)
I don't think the address element can be pared down to just the name field, but you can definitely add your own name field and pass the name in to billing_details when calling confirmPayment
https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
So basically you would want to pass fields.billingDetails.name = 'never' when creating the element, display your own input field for the name, and submit that name in the param I linked to in the previous message when actually submitting the payment
@brittle bramble This is being done in Salesforce Apex so I'm hitting the APIs directly and using visualforce with stripe JS to tokenize the payments. So, this is the API I can find to confirm the intent but I only see shipping details as a parameter, not billing details. https://stripe.com/docs/api/payment_intents/confirm
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Gotcha, thanks for the clarification. I did not realize that we did not have that param for the server-side confirm call. In that case, you can try passing this in to the createPaymentMethod call if you have access to the client-side code
https://stripe.com/docs/js/payment_methods/create_payment_method_elements#stripe_create_payment_method_elements-options-params-billing_details
Otherwise you can update this name after the card is created, as you mentioned
https://stripe.com/docs/api/payment_methods/update#update_payment_method-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
@brittle bramble I'll have to do the latter then, thanks for the clarification
I have another question but it's unrelated so I'll start another thread
Happy to address that question here if you want to send it here
If I'm passing payment method token generated by Stripe JS client side from one component to another (visualforce page to a lightning web component in Salesforce), do I need to encrypt that token at all or would it not matter if it's intercepted? I have the origin locked down the window.postMessage calls but want to make sure I don't need to encrypt the token or anything.
Stripe object IDs like the Token ID are not that sensitive of data to where you need to encrypt it again. For a bad actor to use those IDs they would need your API secret key at which point they could create their own tokens or even list related ones
Of course, happy to help!