#blackgriffen237
1 messages · Page 1 of 1 (latest)
starting on that page here https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#set-up-stripe.js
Hi, you can still mount the element as the doc, but don't call the confirmPayment
then it will just be there
There is a step of mount
const paymentElement = elements.create('payment');
paymentElement.mount('#payment-element');
That's where it will display the payment element in the HTML div with id = payment-element
and that will be the user's payment element somehow?
Not sure what you mean by user's payment element. It's a Payment Element, showed to your customer, but they won't be able to charge or anything unless you implement the confirm action
i mean when i create a payment intent i set the customer on it
but i just want to show the customer's payment method
and allow them to change it if they want
hmm that's a completely different question
You said "show the PaymentElement on a web page but not use it" so I thought you want to show the UI as a demo or something
i thought paymentelements belonged to users
sorry
maybe becuase it goes to the stripe page to complete the payment intent, thats not something I can do ?
So I think you mean payment method
Basically you want to show the Customer's current payment methods, and allow them to manage it without initializing any charge?
You can do that but will need to build your own UI.
It's not that hard, in backend, you can call List PaymentMethod API on a Customer
then use the information got back from Stripe (ie. last 4 digit of the card) then pass back to your frontend
Then in frontend build an UI to display them
theres no prebuilt thing to allow them to edit and stuff?
like change the expiration date or w/e