#sameer_57844

1 messages · Page 1 of 1 (latest)

lethal carbonBOT
craggy violet
#

hello! can you explain why you're creating a PaymentMethod with raw card details via the API? Typically you would either a) provide the card details through Elements (Stripe component to collect card details), or b) pass in the PaymentMethod id into the payment_method parameter when creating the PaymentIntent : https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method

loud vortex
#

I am simulating a potential mail order transaction where we may get credit card number sometimes without CVC

#

I need to simulate a scenario where payment method gets created successfully, later fails during their monthly payment processing

craggy violet
loud vortex
#

okay let me try

#

can I still create setup intent and setup intent with this?

craggy violet
#

maybe lets take a couple of steps back first - from what I understand, you want to be able to create MOTO payments via the API? If that's the case, have you previously already reached out to Support to get feature enabled on your account yet?

loud vortex
#

okay let me restart, I am creating some test data for a NPSP NFP pledge run process and I would like to simulate a bunch of credit card, direct debit pledges with the assumption that we will have customers created, each customer will have an associated prevalidated setup intent, and a payment method id that would be created through payment elements.

#

I am looking to simulate some fail scenarios by producing some real setup intents so they fail for various reasons such as insufficient funds etc

#

so, here's what I am doing.

#

Check if a customer exists ( using name and email address)

#

I need to create a payment method ( utilising some test credit cards)

#

and attach customer to a payment method

#

perform a setup intent for future payment

craggy violet
#

steps 2 and 3 are redundant if you're using a SetupIntent. The SetupIntent will automatically create the PaymentMethod, and attach the PaymentMethod to a Customer

loud vortex
#

if I were to do a setup intent for a test card number 4000000000000002 and produce a valid payment method, can I do that?

#

at the moment I get declines even without producing setup intent "Request req_l1C3lCpQ2JbiTe: Your card's security code is incorrect."