#Thanhpham

1 messages Β· Page 1 of 1 (latest)

subtle marshBOT
night crescent
#

It's a legacy integration. How about trying the newer PaymentElement?

random magnet
#

Currently I want to get the above values ​​to generate tokens and save the card to the database, I have no intention of paying

night crescent
#

Yes, so you can use PaymentElement to collect the SetupIntent. It won't pay anything

random magnet
#

Does that mean I will save clientSecrect in the database with each tag?

night crescent
#

Sorry didn't follow that. It's up to you to store the clientSecret or not, but I don't think it's necessary

#

You only store the succeded SetupIntent's Payment Method Id pm_xxx

random magnet
#

I'm following the flow of saving a tag and displaying that tag information to the client side. I don't know if what you just said above can do that

night crescent
#

Sorry we can't advise on your business logic πŸ™‚ It's your system and you would want to design it yourself

random magnet
night crescent
#

As I said that's an old API, and also an anti-pattern to call in serverside unless you are completely PCI DSS compliance.

In most cases, you should use our recommended payments integrations instead of using the API.

random magnet
#

So is there any way I can save the user's tag value and display it?

night crescent
#

Sorry we can't advise on that tag because it's your business logic

#

It's up to you to save and display it as you want

random magnet
#

I mean, is there any stripe api that can help me return that information?

night crescent
#

What information? Sorry

random magnet
night crescent
#

You will have it, if you either:

  1. Follow the SetupIntent flow I mentioned, and retrieve the PaymentMethod inside the SetupIntent once you received setup_intent.succeeded
  2. Using this legacy CardElement integration, which we strongly discourage
random magnet
#

Can you send me the api link of this part?