#RockstarsNFT - update customer
1 messages · Page 1 of 1 (latest)
thanks - currently when a user creates an account on our platform, our backend sends a request to stripe to create a customer
but until now we've omitted shipping details
which we now want to collect, but not pass through our backend for compliance reasons, so we'd like to do it via the frontend
credit card, cvc, and postal code are collected with stripe elements, tokenized via stripe.createToken, and then and sent to our backend for processing
Gotcha. With the payment element, you can collect billing address, but you will have to build out shipping address collection on your own if you are using Elements
my understanding from the api was that you can only set those billing fields to either 'auto' or 'never', so if it's not strictly needed, it won't show up
happens to be we use Elements, so we could build those inputs on our own, but how would i send it to stripe to update the customer? I don't want to expose a private key, like with: https://stripe.com/docs/api/customers/search (unless that's not a private key)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can do that here with stripe.js
Although since you are using stripe.createToken, it sounds like you are using an older flow
This would be the newer, recommended flow: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
But since you user the older flow, that info can be passed here: https://stripe.com/docs/js/tokens_sources/create_token?type=cardElement#stripe_create_token-data