brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
ramp-webhooks-eventsBuild a verified, idempotent Ramp webhook receiver with raw-body HMAC validation, fast acknowledgement, durable processing, and reconciliation. Use when handling transaction, bill, reimbursement, spend-request, or other Ramp events. Trigger with "Ramp webhooks" or "verify Ramp signature".
Independent GitHub snapshot · Automated classification · Original documentation governs
Verify authenticity before parsing, acknowledge only after durable receipt, and treat each event as a notification to reconcile current resource state. Design for retries, duplicates, and out-of-order delivery.
references/official-docs.md and re-check endpoint schemas, scopes, limits, and support status before a live operation.pending_verification; Ramp sends a challenge that must be returned and submitted to activate the subscription.X-Ramp-Webhook-ID and X-Ramp-Signature; the latter is HMAC-SHA256 of the exact raw request body using the subscription secret.Select only documented event types and underlying read scopes; register an HTTPS endpoint and store the returned webhook secret in an approved secret manager.
Complete the challenge flow and record subscription ID, state, business, events, scopes, endpoint, secret version, and owner without logging the secret.
Capture exact raw bytes, verify X-Ramp-Signature with constant-time comparison, validate expected event/business, then deduplicate by stable event ID.
Durably enqueue the verified event before returning 2xx within 10 seconds; process asynchronously and fetch current resource state when business action needs full or ordered data.
Test duplicates, invalid signature, unknown event, out-of-order events, 429/5xx retry, secret rotation, queue failure, and scheduled API reconciliation.
Application/security owners approve endpoint and secret handling; data/finance owners approve subscribed objects and downstream actions. Production mock events require care because live receivers can process them as real activity.
A subscription inventory, challenge receipt, raw-body verification design, event ledger, durable queue, retry and dedupe tests, reconciliation job, rotation plan, and monitoring.
| Condition | Response |
|---|---|
| Signature differs after parsing | Verify the original bytes before middleware mutation or JSON reserialization. |
| Processing exceeds 10 seconds | Persist the verified event and acknowledge; move business work to an asynchronous consumer. |
| An older event arrives after a newer one | Fetch current object state and apply a monotonic business transition rather than trusting arrival order. |
Receive transactions.ready_to_sync, verify and enqueue it, fetch current transaction state, and create one idempotent ERP work item.
Rotate a subscription secret while proving invalid signatures fail and duplicate event IDs never duplicate effects.