#Sosa-separate-charge-transfer
1 messages ยท Page 1 of 1 (latest)
Hi ๐ Invoices already generate their own underlying charge, so you don't need to create a new one. Instead you can find the Payment Intent related to an invoice, and then find the Charge related to the Payment Intent.
https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-charges-data
thank you for your answer, but to get the charge generated from the invoice, the customer must pay first ?
Correct
Okay so we must use the webhooks for example and listen on the invoice payment event and then catch the charge generated and make our tranfers ? or there is another way ?
Yup, that would be the best way to trigger the additional steps after payment. invoice.payment_succeeded would be a good event to listen for.
ok thank you, i'll try that
๐ sounds good, we'll be here if that doesn't seem to do what you're looking for.
alright