#young_shabo - customer creation
1 messages · Page 1 of 1 (latest)
I can provide my development environment if needed it is hosted on repl.it
what is request_id
I was able to digest what was happening from the above snippet, thank you.
So it appears that you are trying to create a customer inside a payment intent. You'd want to first create the customer and use that on the payment intent: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-customer
Does that just mean creating the javascript object first?
or do I have to hit an endpoint in order to create a customer
there's no javascript object
1/ Create Customer: https://stripe.com/docs/api/customers/create
2/ Create PaymentIntent + customer: 'cus_123': https://stripe.com/docs/api/payment_intents/create
and the customer would just be the object returned from the first await createCustomer function correct
correct
okay cool. another question; for future use, how would I see if I have the same customer on my app? would I have to create some sort of authentication system for that? because I know there is such a thing as customer id
You'll handle this on your app.
usually when you use Customers it's to "re-use" the information such as their saved card for faster checkout later. For that to work you need to know who the customer is in your own application, for example with a login/password
when you do that you can say your customer 12345 is cus_ABC in Stripe for example
if you don't have "profiles" and such in your app, then you don't need to use customers and you can do a one-time payments (and just not pass customer at all)
oh okay
im just using customers to pass a phone number value
because there is no phone number paramater by default in the payment intent object
what is the phone number used for?
just so I can see contact the customer by phone if I need to
I just need the phone number to show up in the stripe dashboard
under the completed purchases list
Could you leverage metadata for this use case? https://stripe.com/docs/api/payment_intents/object#payment_intent_object-metadata
Yes, that is correct. It's best to test it on your end to see how it looks.
okay thank youy