#clayphillips_07398

1 messages · Page 1 of 1 (latest)

rustic ploverBOT
brittle bramble
#

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

tropic relic
#

@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

brittle bramble
#

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

tropic relic
#

@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

brittle bramble
#

Happy to address that question here if you want to send it here

tropic relic
#

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.

brittle bramble
#

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

tropic relic
#

that's what I figured, perfect

#

really appreciate the quick replies!

brittle bramble
#

Of course, happy to help!