#soviet-list-customer-invoices
1 messages · Page 1 of 1 (latest)
hey there
yep, you cna certainly do this
you'd find the actual payment method used for paying an invoice within the associated payment intent.
https://stripe.com/docs/api/invoices/object?lang=curl#invoice_object-payment_intent
which itself has a payment method:
https://stripe.com/docs/api/payment_intents/object?lang=curl#payment_intent_object-payment_method
If retrieving an invoice, you could include the details of the payment method using expansion: https://stripe.com/docs/api/expanding_objects
like this:
curl https://api.stripe.com/v1/invoices/in_456 \
-u sk_test_123: \
-d "expand[]"="payment_intent.payment_method"
and then inspect the payment_method.card.last4:
https://stripe.com/docs/api/payment_methods/object?lang=curl#payment_method_object-card-last4
I hope that gets you what you need here!