#mdubya

1 messages · Page 1 of 1 (latest)

dull marshBOT
hot wagon
#

in the api documentation. it says "payment_method" is an optional parameter and if its omitted, will default to "customer.default_source"

#

however, when i omit it. i get "Request req_3O4RRg6x8jiVdJ: You cannot confirm this PaymentIntent because it's missing a payment method."

bright stone
#

Taking a look now

#

That's odd. You're right, that doesn't seem to line up with our docs. Let me dig on this a bit more and circle back

hot wagon
#

rgr that. as per the docs. its there to ease the migration between Charges and PaymentMethod. which is the exact reason i want to be able to use whatever is set to default

bright stone
#

yeah, that makes sense. Still digging

bright stone
#

Ah, okay. So I think the confusion is between Payment Methods and Sources. The customer.default_source is what the error message is referring to and it cannot accept Payment Methods: https://stripe.com/docs/api/customers/object#customer_object-default_source

You will need to explicitely pass the Payment Method to that API call in order for it to work.

hot wagon
#

hmm. lets take a looksee

#

so in terms of migrating. do i just need to have all customers login to their account and add a new card so i can have all payment methods stored correctly?

bright stone
#

I don't understand. If you're migrating, then your Customers should have a source already, but the one you posted does not. What do you mean when you say "in terms of migrating"?