When an invoice is paid, is it possible to get the card ID used for that invoice payment? Specifically, when a recurring invoice is being paid, and a new card on file has been stored to the customer.
The docs mention this in some capacity in invoices.payment_requests.card_id:
card_id string
The ID of the credit or debit card on file to charge for the payment request. To get the cards on file for a customer, call ListCards and include the customer_id
of the invoice recipient.
Must I cycle through all cards on file thru Cards API? If so, how will I know which card is linked to this invoice?
The docs make it seem that the card ID is a parameter within payment_requests, however the payload does not include the card_id in practice.
It is important in our use case that we keep track of which card on file is being used for recurring invoices/subscription payments, so any help on this would be appreciated.