#sameer_57844
1 messages · Page 1 of 1 (latest)
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
i suggest creating a Customer with payment_method=pm_card_chargeCustomerFail then : https://docs.stripe.com/api/customers/create#create_customer-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
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.
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
ah, i think you misunderstood the process, you'll want to follow the steps listed here : https://stripe.com/docs/payments/save-and-reuse
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