With the Sources API, every customer had a default_source
, but when using SetupIntent
(in order to be compliant with the PSD2/SCA directive), there doesn't seem to be any direct equivalent.
So my question is, how this can be properly represented API-side (without using metadata
)?
The payment_methods listing seems to have a property called preferred
for the card
(which seems to be what I am looking for), but so far I have not found out, how to get/set this property.
There is no direct equivalent to the default_source
for Payment Methods and the newer APIs like Setup Intents and Payment Intents. The closest thing is invoice_settings.default_payment_method
, but it only applies to Invoices.
To answer your question directly, you have three choices:
invoice_settings.default_payment_method
, specifying the Payment Method stored there explicitly for each Setup and Payment Intentmetadata
as you suggestedRegarding the preferred
property, if you're referring to card.networks.preferred
that is the preferred card network of the card in question and is not relevant to your question.