#ebllg_api

1 messages ยท Page 1 of 1 (latest)

dense galeBOT
#

๐Ÿ‘‹ 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.

oblique sand
#

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

plain finch
#

I'm using this endpoint to generate card token based on the card details input.

oblique sand
#

Well, you shouldn't be. You should be using our payment UIs and newer APIs/objects, like Payment Methods

plain finch
#

Ok, but right now I'm using it and rewriting is not possible in the short term.

oblique sand
#

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

plain finch
#

But on prod, I get incorrect_number error from this endpoint.

#

I mean if I pass incorrect card number

oblique sand
#

Probably behaves differently in live mode

#

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

plain finch
#

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?

oblique sand
plain finch
#

Also, I'm already calling this token endpoint from Elements.

#

No I don't have any specific example.

flat mural
#

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.

plain finch
#

4242424242424241 stripe elements don't accept this card number

flat mural
#

oh, you are talking about creating the Token from the frontend?

plain finch
#

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

flat mural
#

got it. in this case it might not be possible to test this.

plain finch
#

okay, thank you

flat mural
#

it's a very old integration, you should use PaymentIntent + Payment Element instead.