Spec the delivery contract for outbound customer webhooks

Vibe codingMedium25 minStripe and Shopify style

Your task

Your Java platform will send webhooks: when an order changes, it POSTs a signed JSON payload to each URL a customer has registered. Customers will check the signature and act on the events. An agent will build the sender, and once customers integrate, the contract is hard to change.

Write the spec you would hand the agent, starting with the parts customers depend on.

What you know:

  • Java 21, Spring Boot and Postgres; events come from an internal OrderEvents stream
  • each customer endpoint has its own secret, shared with that customer
  • customer endpoints are often slow, sometimes down for hours, and now and then misconfigured
  • customers type their endpoint URLs into a settings page

Then, in a few sentences: what does "send a webhook when an order changes" get wrong?