#jmschp_sources-payment-methods

1 messages ยท Page 1 of 1 (latest)

crude relicBOT
#

๐Ÿ‘‹ 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/1405628351871193198

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

muted lantern
#

Hello ๐Ÿ‘‹

Do you have an example Payment Intent ID I can review?

regal glen
#

pi_2Rw32D2ALfsUTznj1OVEkDoK

muted lantern
#

The source property is the one populated because the default payment method for the customer involved here is a non Payment Method type. E.g. card_

#

Even though that is saved as the default_payment_method, any Card object card_ is a Source not a Payment Method

#

All payment methods start with pm_

regal glen
#

ah this is a card object

#

Can they be migrated to Payment Methods?

muted lantern
#

To be clear, everything will "just work" but you will need to check the source property which I understand can be a pain to remember when processing webhook events or doing similar code-based operations

#

You can use them as a payment_method when you create payment intents. We describe this here

#

But this Invoice was generated by Stripe automatically so our system fell back to legacy behavior

regal glen
#

ok
I think what I need I will work

#

thanks

muted lantern
#

Happy to help ๐Ÿ™‚

regal glen
#

one more thing

#

So if I run Stripe::PaymentMethod.retrieve('card_GAVLXpggRzXBfS') does it return a Payment method as well?

muted lantern
#

Yes

#

It will return it with a Payment Method ID that you can then use as well

regal glen
#

But the ID will be card_GAVLXpggRzXBfS, right?

muted lantern
#

The Payment Method object returned will have a top level ID that starts pm_. but it will include the Card object with the card_ ID in the card property

regal glen
#

ok
It is weired that in the dashboard we only see the ID card_

muted lantern
#

Yeah we don't have much insight into what powers the Dashboard here. we focus on developers coding integrations with Stripe APIs.

crude relicBOT