#lolo75-amex-card
1 messages · Page 1 of 1 (latest)
Hello! You have a couple of options for not allowing Amex payments:
- Use Radar to block Amex transactions
- Listen for the
changeevent on the card Element, and check whether the brand isamexthere (https://stripe.com/docs/js/element/events/on_change?type=cardElement#element_on_change-handler-brand)
Complete reference documentation for the Stripe JavaScript SDK.
And how to remove the AMEX logo ?
There isn't a way to do that unfortunately
I believe you can disable showing the brand logo completely if you want though
https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-hideIcon
Complete reference documentation for the Stripe JavaScript SDK.
About 1. I can directly write a radar rule in the radar_options section of the payment intent ?
No, when I said you can user Radar I was referring to creating a Radar rule in your dashboard (see https://stripe.com/docs/radar/rules)
I don't want this rule applied to all of my payments
You can also configure that with Radar - you can set metadata on the Payment Intents you want to use the rule on and have the rule check whether the metadata is tehre to determine whether the rule should be applied (https://stripe.com/docs/radar/rules/reference#metadata-attributes)
I do want to give a heads up that Radar is a paid offering
I already have Radar
so I create a metadata rule
then I set a metadata in the payment intent to activate it
that is true ?
yes, that's the general idea
So I can add this rule: Block if ::Block Amex: = ‘True’ and :card_brand: = 'amex'
And I add this metadata in the payment intent : Block Amex='True'
Yup! That looks right to me
Perfect
Can I retreive the payment method id from the elements before confirm the paiement ?
No, if you wanted to do that you'd have to create the Payment Method separately
So it's not possible to have the payment method from the elements ?
When you confirm a Payment Intent w/ elements, the Payment Method is created as part of the confirmation process but you can't separate it out and grab it before the confirmation takes place unless you change your code to first create the Payment Method and then confirm in a separate call
before with the card elements, you can call createPaymentMethod then confirmCardPayment.
with elements it's not possible to split the call
that is true ?
You mean with the Payment Element right?
yep
Yeah, that's correct - with the Payment Element you can't create a Payment Method
Can you clarify what you mean by that?