#ebllg_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1250052297107705876
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
What are you really trying to do? What are you using the Tokens endpoint?
Generally speaking, most integrations shouldn't touch that endpoint at all
I'm using this endpoint to generate card token based on the card details input.
Well, you shouldn't be. You should be using our payment UIs and newer APIs/objects, like Payment Methods
If you're just looking to accept one-time payments, start here: https://docs.stripe.com/payments/accept-a-payment
Ok, but right now I'm using it and rewriting is not possible in the short term.
Overall though, tokenising card details via that endpoint doesn't validate the card number etc. It's mostly just a luhn check
There's nothing sent to the card networks basically. So knowing it is valid is impossible
But on prod, I get incorrect_number error from this endpoint.
I mean if I pass incorrect card number
Probably behaves differently in live mode
But as I said, you shouldn't be handling card data yourself like this. Do you have the PCI compliance necessary? https://docs.stripe.com/security/guide
This is one of the benefits of using Elements โ you're compliant that way in that none of the card data input by customers is handled on your servers
Ok thank you. I'll look into this. But right now all I want to achieve this making token endpoint return error response on test mode. If I understand correctly, this is not possible, is it correct?
Do you happen to have a specific example? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Also, I'm already calling this token endpoint from Elements.
No I don't have any specific example.
hi! I'm taking over this thread.
let me run some tests
creating a Token in test mode on the backend with card number 4242424242424241, I get back a incorrect_number error.
so it seems to work as expected. however as mentioned previously, this is a very old integration that we don't recommend using.
4242424242424241 stripe elements don't accept this card number
oh, you are talking about creating the Token from the frontend?
in my test I called the Token endpoint form the backend: https://docs.stripe.com/api/tokens/create_card
yes, exactly, creating the token from the frontend
so i'm not sending card details to my servers at all, i'm already using stripe elements to handle that.
didn't understand why you don't recommend using this
got it. in this case it might not be possible to test this.
okay, thank you
it's a very old integration, you should use PaymentIntent + Payment Element instead.