Skip to content

docs(webhooks): critical-path callout and Rust signature example#88

Open
Cali93 wants to merge 1 commit into
mainfrom
docs/webhooks-followups
Open

docs(webhooks): critical-path callout and Rust signature example#88
Cali93 wants to merge 1 commit into
mainfrom
docs/webhooks-followups

Conversation

@Cali93

@Cali93 Cali93 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #87 with two changes:

1. Critical-path callout (Riaz's feedback). A Warning at the top of the page: never gate a payment's outcome on receiving a webhook. Webhooks are a fast notification layer, not the system of record; delivery is best-effort and can be late, duplicated, out of order, or missing entirely. The webhooks vs. polling section is restructured into the three-layer pattern the major providers (Stripe, Shopify, Coinbase Commerce) document: polling as source of truth, webhooks for speed, periodic reconciliation as backstop. Wording keeps the contract facts from #87 review: the event payload is a full versioned snapshot, so no API call is needed inside the handler.

2. Rust signature example. Added to the verification code group. Rust's standard library has no crypto, so it uses the hmac, sha2, and base64 crates (noted in the intro line and the agent prompt). Validated against the Svix test vector: correct signature accepted, altered body rejected, second-of-multiple entries matched; comparison is constant-time via Mac::verify_slice.

Linear: WCPM-530

🤖 Generated with Claude Code

- Add a top-of-page warning: never gate a payment's outcome on
  receiving a webhook; webhooks are a notification layer, not the
  system of record (Riaz's feedback, backed by Stripe/Shopify/
  Coinbase precedents)
- Restructure webhooks vs. polling into the three-layer pattern:
  polling as source of truth, webhooks for speed, reconciliation
  as backstop
- Add a Rust signature verification example (hmac/sha2/base64
  crates; Rust stdlib has no crypto), validated against the test
  vector
- Note the Rust crate exception in the agent prompt

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Cali93
Cali93 marked this pull request as ready for review July 22, 2026 14:15
@mintlify

mintlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wc-pay-docs 🟢 Ready View Preview Jul 22, 2026, 2:16 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@Cali93
Cali93 requested a review from xikimay July 22, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant