#jamesdahlen.nwi-payment_intent-charges
1 messages · Page 1 of 1 (latest)
looking again, it appears there is no "invoice" in this payment_intent, shouldn't there be?
Looking in to this.
So the end goal is to get the invoice for the PaymentIntent if there is one and find the charge related to it?
So it looks like you are creating that invoice directly with the PaymentIntent create method is that correct?
I don't think invoices are inherently created from that. Were you seeing that before?
ah, maybe. i've created Subscriptions similarly
my goal is to check the total charged amount in this webhook, thinking to see the charge->amount property.
Ah so getting the full charged amount for this PaymentIntent is the goal
So adding up the amounts for the charges in the list of charges should get you that
ok, could there be more than 1 charge sometimes, i guess?
Correct. And apologies, the solution I gave would not be correct. There might be multiple charges on the PaymentIntent if it took multiple attempts for the charge to succeed.
You will want the amount_reveived on the PaymentIntent itself
ok- but if i were to then create multiple Transfers after this successful payment_intent, could i not use source_transaction then? source_transaction needs to reference a Charge, if i recall correctly
i need to transfer to multiple Connect accounts after a successful payment
using source_transaction seems to be the best way, an alternative could be transfer_group, but trying to avoid that