Reputation: 3
I've created a PaymentIntent that has the customer's payment_method specified. When I create a payment form using Stripe Elements, I get the following result: stripe form
But I want the card input form to be displayed as in the checkout session. Somehow like this: expected stripe form
Upvotes: 0
Views: 1320
Reputation: 2219
It's not possible to pre-fill the payment method of the Payment Element. But if you already have a PaymentMethod saved for the customer, then you don't need the Payment Element at all:
payment_method: pm_xxx
and confirm: true
.succeeded
, then there's nothing else to do.requires_action
, then you need to confirm it on the frontend using stripe.confirmCardPayment()
.Upvotes: 2