#cgy

1 messages · Page 1 of 1 (latest)

south nightBOT
zealous meteor
#

Hi 👋 that's correct.

checkout.session.completed Events are triggered when a customer completes the flow presented to them by a Checkout Session.

invoice.paid Events are triggered whenever an Invoice is paid, so this can occur every billing period of a Subscription.

invoice.paid Events should contain an Invoice object in them, which has a customer field indicating which Customer the Invoice belongs to:
https://stripe.com/docs/api/invoices/object#invoice_object-customer

ember cave
#

Ok, so it seems I should set customer in SessionParams api and save this customer ID in our database then when I receive "invoice.paid" I can know who paid this

zealous meteor
#

If you already have a Customer object created for the customer, then yes, otherwise the Checkout Session will automatically create a new Customer object.

ember cave
#

OK, thank you very much

#

🤩