Please help! How do I get the payment method id from a Stripe Card Element?

How do I get the payment method id from a Stripe Card Element?

I have the card element on my page. I can make payment intents go through just fine. I just need to return the newly created payment method id so I can attach it to my customer.

This is driving me insane. Someone please help. I can’t be the only person who needs to create a payment method from a Stripe Element without charging the card immediately.

Take a look:


With all due respect, this doesn’t answer my question. I need something more specific.

I have a Stripe Element on my page

I need my user to be able to enter a card number into it and click the save button

Then I need stripe to return the payment method ID

I cannot find any action or webhook in Wappler that allows this. They all require I already have the payment method id. Even the create payment method action.

If I create a payment intent or setup intent, it shows in Stripe however it is missing a payment method id

This is the point where I would start, in an attempt to help you and see if I can get this working. I’ll probably be asking the same questions… but as of now, you still don’t have a way to get the PaymentID saved in the db?

That’s right. I can’t figure any of this out.

Start with the Stripe documentation. Read it, learn it, understand it. THEN and ONLY THEN, make a decision about using Wappler or coding it natively.

You will find that you probably need to code very few native API calls to achieve what you want and if there are any issues you can refer to the Stripe docs and APIs - which are world class.

If you decide to use Wappler’s wrappers, expect to hit a brick wall occasionally as there are unresolved issues and little real support.

My advice, as I’ve said often, with Stripe go native. It’s much more satisfying and far less frustrating

1 Like