I'm building a JIT Gateway POC. I have two Webhooks, one for JIT Gateway authorizations, and another for monitoring the related transactions and updating my own ledger when necessary.
The JIT Gateway Auth Webhook monitors a ledger that I maintain, that represents the actual user balance as recorded in my system, and uses this ledger balance to approve/deny Gateway authorization requests.
The Transaction Webhook monitors transaction messages and actually updates the ledger. In the case of a simple transaction, for each e.g. Authorization I expect to see two transactions, an authorization and a gpa.credit.authorization. Similarly, for the simple case of clearing the transaction I expect to see two transactions: an authorization.clearing and a gpa.credit.
Which of these events should I rely on to update my own ledger? authorization/authorization.clearing or gpa.credit.authorization/gpa.credit?
My guess is that I should use authorization/authorization.clearing, since according to the docs these represent the actual merchant transaction, and my assumption is that the gpa.* transactions represent book-keeping on the Marqeta network as it updates the account associated with the program funding source associated with the card product. Am I right on these points?