#Thanhpham
1 messages Β· Page 1 of 1 (latest)
It's a legacy integration. How about trying the newer PaymentElement?
Currently I want to get the above values ββto generate tokens and save the card to the database, I have no intention of paying
Yes, so you can use PaymentElement to collect the SetupIntent. It won't pay anything
Does that mean I will save clientSecrect in the database with each tag?
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
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
Sorry we can't advise on your business logic π It's your system and you would want to design it yourself
yes, but what i mean is currently i want to get information to generate token using this api https://stripe.com/docs/api/tokens/create_card
Then it will return ting villages like that response
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
So is there any way I can save the user's tag value and display it?
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
I mean, is there any stripe api that can help me return that information?
What information? Sorry
it is same as this api's return information https://stripe.com/docs/api/tokens/create_card, including brand, exp_month, exp_year, last4
You will have it, if you either:
- Follow the SetupIntent flow I mentioned, and retrieve the PaymentMethod inside the SetupIntent once you received
setup_intent.succeeded - Using this legacy CardElement integration, which we strongly discourage
Can you send me the api link of this part?
This one