#whip-invoices

1 messages · Page 1 of 1 (latest)

somber juniper
#

hi there! do you have an example Invoice id?

civic marsh
#

Yes sure. pi_3LGG0QJyuisDiUpl0BnWgvhB

#

in_1LGF44JyuisDiUpluBh9Xmj4

#

I get this intent in the payload, then I call retrieve on it to get the details but payment_method is null

somber juniper
#

can you paste the response from your GET request? omit any sensitive details e.g. name, email, address

civic marsh
#

Does this help?

somber juniper
#

i think you're looking for the wrong parameter

#

try looking at charges.data[0].payment_method?

#

you mentioned that this worked before, can you share a PaymentIntent id where you saw it under payment_method previously?

civic marsh
#

I dug up this old one from May. Check it out: pi_3Kud8HJyuisDiUpl0tBJfs54

somber juniper
#

hrm, gimme a while to look at this

#

the ones that don't have payment_method populated are using card tokens i.e. card_xxx objects

#

in the PaymentIntent object, you can actually see it under source instead

#

you may want to use charges.data[0].payment_method instead since it seems to be showing both PaymentMethod and Card objects

civic marsh
#

We've always had credit card as the only payment method. Why am I seeing card_xxxx as oppsed to pm_xxxx ? Whats the difference?

somber juniper
civic marsh
#

Yes we did that

#

So I can safely set card_xxxx id on customer->invoice_settings->default_payment_method?

somber juniper
#

yep, works fine for me