Skip to content

Unify webhook signature-header docs across the three SDKs - #361

Merged
poiley merged 1 commit into
mainfrom
docs/signature-headers-unify
Aug 5, 2026
Merged

Unify webhook signature-header docs across the three SDKs#361
poiley merged 1 commit into
mainfrom
docs/signature-headers-unify

Conversation

@poiley

@poiley poiley commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The three READMEs described webhook signing three different ways, and each was wrong at a different layer. Ground truth: the server (callWebhookOnce) sends one HMAC value on Primitive-Signature, X-Primitive-Signature, and X-Webhook-Signature; it never sends MyMX-Signature. The SDK verifiers read Primitive-Signature and retain MyMX-Signature as a retired fallback name. All four call sites now share one canonical description covering both the wire and the verifier.

Follow-up worth a product decision: the MyMX-Signature fallback in all three SDK verifiers matches nothing the platform has sent since the rename, and the server's X-Webhook-Signature is likewise unread by the SDKs; both could retire on the next major.

🤖 Generated with Claude Code

One canonical description covering both layers: the wire carries the
value on Primitive-Signature, X-Primitive-Signature, and
X-Webhook-Signature; the SDK verifies Primitive-Signature and still
accepts the retired MyMX-Signature name for older captures.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

docfacts impact

⚠️ 2 known-wrong doc claims cite code this PR touches — if you're changing this behavior, fix the docs in the same breath:

  • contradicted The Send, Reply, and Forward methods keep the HTTP request open until Primitive's downstream SMTP transaction completes.
    sdk-go/README.md · evidence: sdk-go/README.md
  • unverifiable The example code for using the generated API package to set a memory is valid against the current SDK surface.
    sdk-go/README.md · evidence: sdk-go/README.md

This PR also touches evidence for 30 verified claims and 3 documented pages — no action needed unless behavior changed; the nightly scan re-verifies automatically.

details
  • ✅ The Go SDK is installed with go get github.com/primitivedotdev/sdks/sdk-go@latest. (README.mdsdk-go/README.md)
  • ✅ Reusing an idempotency key returns the original response from the first send, deduplicating retries. (sdk-go/README.mdsdk-go/README.md)
  • ✅ The DeliveryStatus value 'deferred' means a temporary failure and the receiving MTA may retry. (sdk-go/README.mdsdk-go/README.md)
  • ✅ All three SDKs ship an x402 client for collecting and paying USDC non-custodially. (web/content/docs/sdks.mdxsdk-go/README.md)
  • ✅ The example code for signing and replying with an email challenge payment is valid against the current SDK surface. (sdk-go/README.mdsdk-go/README.md)
  • ✅ A deliveryStatus of deferred means a temporary failure occurred and the receiving MTA may retry. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for the generated API client using PrimitiveApiClient and getAccount is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for creating a challenge with x402.charge is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for createEmailChallenge is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for forwarding an inbound email is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for verifyWebhookSignature from @primitivedotdev/sdk/webhook is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for replying from a different address is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for isTrustedSender is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The x402 payment payload is submitted to /v1/x402/challenges/{id}/pay. (sdk-node/README.mdsdk-node/README.md)
  • ✅ The example code for Primitive Memories using createPrimitiveClient and client.memories is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ API keys can be created under Settings -> API keys and stored in the PRIMITIVE_API_KEY variable. (web/content/docs/quickstart.mdxsdk-node/README.md)
  • ✅ The example code for paying a challenge with x402.pay is valid against the current SDK/API surface. (sdk-node/README.mdsdk-node/README.md)
  • ✅ primitive.api provides the full generated HTTP API surface. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The example code calling extract_email_challenge is valid against the current SDK. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The send result object has id, status, queue_id, and delivery_status attributes. (sdk-python/README.mdsdk-python/README.md)
  • ✅ x402.get_challenge(id) re-hydrates a challenge by id. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The example code for creating an email challenge with x402.create_email_challenge is valid against the current SDK. (sdk-python/README.mdsdk-python/README.md)
  • ✅ When using wait mode, the client should be configured with a request timeout long enough for SMTP delivery, typically 30-60 seconds. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The development commands from sdks/sdk-python include uv sync --dev and uv run scripts for generating schema, models, and API client, running pytest, ruff, and basedpyright. (sdk-python/README.mdsdk-python/README.md)
  • ✅ x402 client exposes a list_payout_addresses method. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The example code for forwarding an inbound email is valid against the current SDK. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The example code using with_options to set a default timeout is valid against the current SDK. (sdk-python/README.mdsdk-python/README.md)
  • ✅ parse_webhook_event is an available lower-level webhook helper. (sdk-python/README.mdsdk-python/README.md)
  • ✅ get_memory accepts client and key keyword arguments. (sdk-python/README.mdsdk-python/README.md)
  • ✅ The example code for reading and setting the spend policy is valid against the current SDK. (sdk-python/README.mdsdk-python/README.md)
  • 📝 sdk-go/README.md (130 claims re-extract)
  • 📝 sdk-python/README.md (135 claims re-extract)
  • 📝 sdk-node/README.md (118 claims re-extract)

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The documentation-only PR appears safe to merge.

The revised descriptions consistently distinguish the headers emitted on deliveries from the narrower header names recognized by the SDK handlers, with no code or runtime behavior changed.

Important Files Changed

Filename Overview
sdk-go/README.md Aligns the advanced webhook documentation with the server’s wire headers and the Go verifier’s accepted header names.
sdk-node/README.md Corrects both Node.js signature-verification sections to consistently distinguish emitted headers from verifier fallback behavior.
sdk-python/README.md Aligns Python webhook documentation with the same canonical wire and verifier-header description.

Reviews (1): Last reviewed commit: "Unify webhook signature-header docs acro..." | Re-trigger Greptile

@poiley
poiley merged commit 9b7c830 into main Aug 5, 2026
18 checks passed
@poiley
poiley deleted the docs/signature-headers-unify branch August 5, 2026 17:07
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