Hi,
I'm confused about the relationship between a source and a card.
Intuitively, a card should be one kind of source, i.e. a subtype of source. However, the documentation doesn't seem to agree with me:
- the source and card objects contain incompatible fields and subfields
- didn't find a call for listing all the sources
- a source has a status field but cards don't
- the customer object comes with the fields `default_source` and `sources` which are cards and not sources
- there are events only for sources (customer.source.*)
Based on the example of a source given for bitcoin, a source is an object with its own ID, that contains a tag and a value corresponding to that tag:
{
<source id and other fields>
type: bitcoin
bitcoin: <bitcoin id and other data>
}
and I'm guessing we'd have the following for a card:
{
<source id and other fields>
type: card
bitcoin: <card id and other data>
}
Is this correct? If so, how can we retrieve all the sources for a customer?
Our goal is to determine whether a valid payment source is available, cache the result and be notified of any change.
(we're using API version 2015-02-18)
Martin