#rveldmanbd

1 messages · Page 1 of 1 (latest)

haughty chasmBOT
wooden lichen
#

Our recommended approach is usually webhooks. What events do you need to process in order?

sick ledge
#

Hmm. But the Stripe docs explicitely mention this. Basically my data needs to reflect the same information as that in Stripe. My app is in that way just a different front-end for Stripe (not exactly of course, but just to understand the idea)

wooden lichen
#

Yes exactly. We recommend webhooks, but the order isn't guaranteed

#

You'd need to code around that

sick ledge
#

What I would be worried about is what if Stripe doesn't send the events in the good order, for example

  1. User sets cancel subscription date at 26 June
  2. User changes cancel date to 1 August

And what if stripe sends them in the wrong order, for example:

  1. Subscription end date is 1 august
  2. Subscription end date is 26 June
#

Ok and what would coding around that mean in this context? For example making some logic that if events are very close to each other, it should query the API to be 100% sure the data is correct?

wooden lichen
#

Ok I see. Well in that above scenario you could consider changing the record in your database at the same time the customer cancels the subscription and an api call is made to stripe. There's certain things you could do without webhooks.

#

Webhooks are mostly nice to get notified about async events

#

Coding around it could mean building in some sort of queue on your end or querying the stripe api for any missing data

sick ledge
#

I see what you mean. Thank you and thanks for the suggestions, very helpful. Not sure if changing the record in database directly would be a good solution, because what if users change a subscription through stripe instead of my app. In that case the data won't be reflected correctly.

#

So I will need to think about a good system to do this, and from what I get Stripe does not support this use case yet.

#

Oh and just a quesiton. I just learned about Stripe Data Pipeline. It says it's about syncing data. It looks like it's meant for different use cases, but just asking you to be sure

wooden lichen
#

Yeah that's meant to keep your data warehouse up to date for business analytics, etc. Allows you to send data to Snowflake or Redshift.

sick ledge
#

Clear, thank you for being so helpful. Enjoy your day! 🙂