#DarkStar-paymentelement-number
1 messages · Page 1 of 1 (latest)
Hello there. Those fields are added to the Payment Method object created by the confirmPayment function. They would not be directly accessible on the PI, without expanding the payment_method field
Alternatively you could use metadata to attach the phone number directly to the PI
You could also use a Customer object, which has a phone field too: https://stripe.com/docs/api/customers/object#customer_object-phone
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you. I have a related question -- I create the payment intent on our server in C#, the code above is from the web page in JS. Is it possible to add metadata on the client if the PI was created on the backend?
You can't, no. You have to call the update endpoint via your backend (with your secret key)
Great. Thank you for your assistance. I think all is clear now.
Np!