#elbek_source-paymentmethod

1 messages ¡ Page 1 of 1 (latest)

sharp roostBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270797768772026369

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

plucky cargo
#

I am submitting this

#

{ "invoice_settings": { "default_payment_method": "" }, "source": "pm_1PF6t5DVbSo80Vu44cESuy4u" }

#

invalid_request_error - source
You cannot supply a PaymentMethod ID as the source parameter. Please use the payment_method parameter instead. If you wish to set a default payment method for this Customer for future Invoices, set invoice_settings.default_payment_method

#

when should I provide source vs default_payment_method, what is the difference between the two

#

req_4WKtdJRvaGsEC2

whole crow
#

@plucky cargo If you use the PaymentMethod API pm_12345 then you would basically never use source. So just ignore source entirely

#

elbek_source-paymentmethod

plucky cargo
#

I see

#

Can payment methods work with bank accounts?

#

I wrote this code long time ago, here is how it does

#

it uses payment methods api to list all payment methods including cc and bank

whole crow
#

yes both work

plucky cargo
#

then if it is cc then it uses default_payment_method to set pay method, if it is bank then it uses source to make it default pay method

whole crow
#

you can use default_payment_method for both

plucky cargo
#

I see, can you see the requst pay method if it was bank of cc

#

that particular one

whole crow
#

that one is a real PaymentMethod since it starts with pm_123 so the type is irrelevant. But it was us_bank_account