#Kosta

1 messages ยท Page 1 of 1 (latest)

nimble solarBOT
ember copper
#

You need to use source_transaction parameter

unkempt gorge
#

And how can I get it?
I receive information about the event that contains the score
and payment_intent, but source_transaction is not there.

ember copper
#

The source_transaction parameter would be the charge ID that's linked to the PaymentIntent of the invoice.

What event are you listening to?

unkempt gorge
#

invoice.paid

ember copper
#

invoice.paid event delivers an invoice object as a payload which does have a charge parameter that's expandable
https://stripe.com/docs/api/invoices/object#invoice_object-charge

When you receive the event, you'll need to retreive the invoice and expand charge to get the charge information
https://stripe.com/docs/api/expanding_objects

unkempt gorge
#

and what parameter to specify for expand?
['expand' => ['?????']]

ember copper
#

charge

unkempt gorge
#

It's clear.
Thank you.