#ahmed-cards
1 messages · Page 1 of 1 (latest)
@sterile lake no you never get the card number since they would put you in PCI compliance scope
i can show a pop up message before they click "pay now" based off BIN number
you can use the change event of the CardElement for that https://stripe.com/docs/js/element/events/on_change?type=cardElement#element_on_change-handler-brand
so i can only do this based off card brand and not BIN?
there's an example here if it helps https://jsfiddle.net/nwyf587t/
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
well you only want the BIN so you know the brand so you can block Amex right?
so you don't actually want the BIN, you want the brand, and that's completely available!
i want to show a pop up message for specific bank issuers
for example in france, customers are not too familiar with 3DSecure and i see a higher drop off rate
so when they enter that issuer's card, i want to show them a message about 3DSecure
that issuer's card is Visa, but i dont want to show it for all Visa cards
well by default we don't expose that level of information in the API(the BIN/issuer information) I'm afraid(though if you write to https://support.stripe.com/email there is the potential of getting access)
what you could do is let them enter the card, then send the PaymentMethod object to your backend, retrieve it there and check the country it's issued from : https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-country
and then decide what to do next on the frontend
i get the IIN after the payment intent has succeeded, theres no way to get that before?
oh then you do have that setting on your account already
you can get it before yes, it's part of the PaymentMethod/Token/Source object. (you should see it around https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-country if you're logged into your account)
you have to have the customer enter their details, then call https://stripe.com/docs/js/payment_methods/create_payment_method , then send the PaymentMethod to your backend and call https://stripe.com/docs/api/payment_methods/retrieve (since fields like this are only returned when using backend code with secret keys for security reasons) and then you have all the context you need!