#tianyouli-cloning-pm

1 messages ยท Page 1 of 1 (latest)

exotic frigate
#

Hello ๐Ÿ‘‹
You seem to be passing pm_card_visa_debit as a parameter when you're running the code.
You'd need to pass an actual payment method ID instead.

Can you share the request ID that's seeing this error? (i.e. req_xxx)

storm oasis
#

req_hJgjOsQfIGgGFW

#

(I was trying direct charge on a test Standard connected account)

storm oasis
exotic frigate
#

I think the pm_card_visa_debit payment method may only work with PaymentIntent API and creating a new payment method
It might not work with cloning
Have you tried passing in an actual payment method ID?

storm oasis
#

Not yet. I'm trying to set up API (or backend) testing for successful/failure cases. How can I mimic create new Customer, create a Payment Method, clone it to test direct charge code with pre-defined transaction results (success, dispute, requires action, charge declined etc)?

exotic frigate
#

How can I mimic create new Customer, create a Payment Method, clone it to test direct charge code with pre-defined transaction results (success, dispute, requires action, charge declined etc)?
What do you mean by mimic? Can you share a little bit about your usecase?

storm oasis
#

If we can't use payment methods like pm_card_visa_debit then we have to add a card manually from the Stripe dashboard or from front-end integration, right? I was able to use pm_card_visa_debit to create payment intent directly when testing destination charge with Custom connected account. Now we are trying to test direct charge with Standard connected account.

exotic frigate
#

If we can't use payment methods like pm_card_visa_debit then we have to add a card manually from the Stripe dashboard or from front-end integration, right?
that's correct

#

I was able to use pm_card_visa_debit to create payment intent directly when testing destination charge with Custom connected account. Now we are trying to test direct charge with Standard connected account.
As far as my understanding goes, you need to create the PaymentMethod and attach it to a customer before you can clone it.

storm oasis
exotic frigate
#

If this is purely for testing then you can use the API to create PaymentMethods

#

Let me know if that helps @storm oasis