#Jkas
1 messages · Page 1 of 1 (latest)
I think it should always be a source. Sources can be used as payment methods but payment methods can't be used by sources. Do you have an event where you think this happened?
I'm wondering if I have an ID of whatever object comes through from that event, how am I able to look it up by ID?
Stripe::Source.retrieve?
Will that retrieve the correct source object type?
Yes it should as far as I know
I'm guessing it could be a PaymentMethod, Source, Card, etc... but I need a universal way to look up the object sent with the customer.source.updated event by ID
I thought card_ objects were also a kind of source, are you getting an error when you try to retrieve them with that endpoint?
I am not, I'm just making sure that a Source is the generic object of all of these different types of stripe payment objects.
Our doc lists that event type as a source (and lists card as a subtype of source) https://stripe.com/docs/api/events/types#event_types-customer.source.updated
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So you should be able to retrieve any object from that event with the source retrieve function. Payment Methods are a different kind of object so you won't get them in that event and won't be able to look them up with that method