Webhooks general questions

Hi!

I need some help figuring out some things about webhooks.
Well first of all, what I’m trying to achieve is to have my database to be synced with my patreon. So that I know which user has which pledge amount and whether they are active or not.
This way i can make db request on my server to determine user permissions instead of making api requests everytime i want to be sure that the user is pledging a required amount to access parts of my website.

So my question is: are webhooks the way to go here?
And if yes then i have some questions about them :smile:

  1. Is webhook response always the same regardles of which hook trigered it? (basicly an info dump about user status and his membership)

  2. Are webhooks guaranteed to be sequential. This might be a dumb one(i never used webhooks), but can hook members:update trigger before members:create on the same member?
    Or if user creates a pledge and immediately cancels is pledge:delete guaranteed to come after pledge:create? Or should i timestamp most recent change in my DB and execute change comming from the hook only if it is more recent that previous hook change?

  3. Documentation is slightly vague about what EXACTLY triggers each webhook. Like if i get a new member and have both members:update and members:create hooks set up, will they both fire? Or will i get one response only?

  4. lets say patreon changes their pledge amount, will members:update also trigger? Or only members:pledge:update?

  5. will pledge deletion trigger only members:pledge:delete or will it also trigger members:pledge:update and subsequently members:update?

  6. is members.update one-size-fits-all sort of trigger? Can i just setup hook on that trigger and be sure that i will get all the information about new patreons changes in pledges etc etc?

I would really appreciate any help!

48 hours without response oh boy. Sooo
Yesterday i did some testing to see what will trigger what and here are my results, in case someone will also need it. (to update docs for example :wink: )

  1. to answer my own question webhook response is always of the same format.

  2. now for the tests, here is the format:
    callback -> what i did -> YES/NO (yes means i got response, no means i didnt)

  • member:update -> old(canceled) patron joins(pledges) -> YES

  • member:update -> patron removes(cancels) pledge -> YES

  • member:update -> completely new member pledges -> NOOO

  • member:update -> patron ± changes pledge -> NO

  • members:create -> oldPatreon pledges again -> NO

  • member: create -> completely new member pledges -> YES

  • members:pledge:update -> existing patron ± pledge -> YES

  • members:pledge:update -> patron cancels pledge -> NOO

  • members:pledge:update -> old(canceled) patron pledges -> NO

  • members:pledge:create -> old user creates new pledges -> YES

  • members:pledge:delete -> user cancels pledge -> YES BUT still shows amount pre cancel (WTF…ok not wtf useful if you want to keep track of what pledge you just lost)

  • member:update -> patron follows even not pledging -> YES

  • member:update -> follower pledges -> YES

////////

in conclusion:

  • completely new user -> members:create (a)

  • pledge± -> members:pledge:update (b)

  • patreon removes pledge(cancels) -> member:update ( c)

  • parton rejoins -> member:update ( c)

So here you go.
It would be nice to get some confirmation from the dev support team if my findings were correct.