Page MenuHomePhabricator

Payments-wiki Gravy card donation & webhook processing UML sequence diagram (full picture)
Closed, ResolvedPublic

Assigned To
Authored By
jgleeson
Feb 24 2026, 2:56 PM
Referenced Files
F72476094: image.png
Mar 2 2026, 7:44 PM
F72476101: image.png
Mar 2 2026, 7:44 PM
F72476026: image.png
Mar 2 2026, 7:34 PM
F72475994: image.png
Mar 2 2026, 7:30 PM
F72475930: image.png
Mar 2 2026, 7:20 PM
F72317267: Gravy webhook processing UML sequence diagram
Feb 24 2026, 6:51 PM
F72317057: Gravy-cc-payment(one-time)
Feb 24 2026, 4:55 PM

Description

This diagram captures our end-to-end credit card payment submission via Gravy, including the async webhook flow. During a recent discussion with @MGerlach from Research, we realised we lacked a convenient way to explain our existing fraud touchpoints within the payment processing flow. This visualisation will support conversations regarding our current fraud prevention measures and how we can accommodate a potential ML solution in the future.

Donation diagram covers:

  • Page load and checkout session creation
  • Secure Fields iframe rendering
  • Form submission
  • Two-phase fraud filtering (pre-auth and post-auth),
  • Authorisation call via SmashPig to the Gravy API
  • 3DS redirect handling
  • Fraud REVIEW path (authorised but not captured),
  • Capture call via SmashPig to the Gravy API
  • Queue message creation (payments-antifraud, pending, donations).

Webhook diagram covers:

  • Webhook receipt and validation (Basic auth header check)
  • Message parsing and type normalisation
  • Status normalisation via ResponseMapper (config mappers/cc-response)
  • Authorization webhook (PENDING_POKE) with conditional capture-from-ipn-listener branch
  • Capture webhook (COMPLETE) and RecordCaptureJob creation
  • Async job processing: pending DB lookup, Gravy API call for full transaction details
  • Pending record enrichment (processor info, donor details, recurring token)
  • Donations queue push and pending record resolution

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptFeb 24 2026, 2:56 PM
jgleeson renamed this task from Payments-wiki credit card donation UML sequence diagram (Gravy | One-time) to Payments-wiki Gravy card donation & webhook processing UML sequence diagram (full picture).EditedFeb 24 2026, 6:50 PM
jgleeson updated the task description. (Show Details)

Gravy Webhook Processing - Authorization
Source code: https://phabricator.wikimedia.org/P89015

image.png (2,012ร—1,302 px, 206 KB)

Gravy Webhook Processing - Capture
Source code: https://phabricator.wikimedia.org/P89567

image.png (2,820ร—1,918 px, 308 KB)

Pretty thorough! The gravy adapter generally finalizes the CC status to PENDING rather than COMPLETE as we don't get synchronous confirmation of the capture. Will take another pass and see if I notice anything else.

Pretty thorough! The gravy adapter generally finalizes the CC status to PENDING rather than COMPLETE as we don't get synchronous confirmation of the capture. Will take another pass and see if I notice anything else.

Thanks @Ejegg. Wanna take another pass before I move these to our docs?

I'm gonna mark this as done and move these diagrams to the docs. We can update them if we find any issues, but for now, they serve as a good overview and will support the ML fraud calls.

XenoRyet set Final Story Points to 4.