#ctodan-list-events
1 messages · Page 1 of 1 (latest)
Hello 👋
Typically folks rely on webhooks to ingest this information real-time
https://stripe.com/docs/webhooks
You can listen for specific events such as customer.created and so on & update your Database with the information delivered as payload
this allows you to have real-time information without polling the API consistently
i guess that part I'm not sure about is what events do I need to track to get a complete picture. For more context, we use stripe subscriptions. User gets on the app, links a bank account and signs up, and then we charge them an annual subscription after showing a paywall.
Days later, there are occasionally failed payments, and sometimes we offer refunds or discounts
Are you creating subscriptions by calling the API directly or are you using Stripe Checkout?
Not sure what to call it but we do this sequence of calls:
stripe.customers.create
stripe.subscriptions.create
stripe.paymentIntents.confirm
we connect a payment method using Plaid in the middle there
in the near future though we will also be adding credit cards as a payment option though
I see. So you're using the API directly.
We have a doc here that goes over subscription related webhook events in detail
https://stripe.com/docs/billing/subscriptions/webhooks
Would recommend reading through and picking the events that are necessary for your usecase
i think we will use the stripe UI for that in our ios app but havent fully decided
Do you think I should approach this using invoices events?
Would that fully capture the revenue/refunds for the users?
Is payments a more complete way to track the revenue though?
The other option would be to use Reporting tools
I believe there's one in beta
https://stripe.com/docs/revenue-reporting
There's also
https://stripe.com/docs/revenue-recognition
Do you know where i can find documentation on all the "charges" events?
looking at all the payments, i think i can track all the charge events, which seem to include refunds and failed payments too
I don't think we have docs on all charge events. You can look at all the charge.* events in our API reference
https://stripe.com/docs/api/events/types#event_types-charge.captured
Do you know if when we cancel a subscription and issue a partial refund if it goes on the charge?
thats the only case i can think of that may apply outside of this
We would generate a charge.refunded event for a prorated refund and you can find the prorated amount on amount_refunded parameter on the Charge object
Don't think so. However, you can query for the events using the API and backfill the data as needed
https://stripe.com/docs/api/events/list?lang=node