Taras Lysyi

QuickCheckout · Softcery · 2022

Order and payment observability

Checkout, store and payment gateway each record the same order, at different times. Without a cross-system check, a wrong charge or a lost order surfaced only when a customer complained.

Result

4anomaly types caught

Slack flags a store total that doesn’t match the amount charged, duplicate orders, missing orders and failed webhooks.

Slack
#checkout-alerts · via SensuMismatch: store total ≠ amount charged

Checkout⇄Shopify⇄Gateway

Before

Found by the customer

  • A wrong charge surfaced when a customer complained
  • So did a lost order

After

Found by a check

  • Alert in Slack before customers report it

When a problem gets noticed (order of events, not to scale)

What I did

  1. Reconciliation jobs

    Scheduled Go jobs compare checkout records, Shopify orders and gateway transactions. External APIs are queried in batches with capped concurrency.

  2. Alerting

    Each discrepancy is routed through Sensu to the team’s Slack channel.

Hardest part

Telling a wrong charge from a late update

A store and a gateway can briefly disagree on a valid order. With the team I defined which differences matter; the checks wait for late updates and allow for rounding before alerting Slack.

Back to all work