AI Compare Ninja AI Compare Ninja

Compare AI tools. Use prompts and skills.

Language
EN

Receive and process webhooks safely

Prompt that plans a webhook receiver with signature check, a quick response and protection against duplicate events. Paste it into an AI tool of your choice, which then plans the webhook receiver.

Topic
Apps & prototypes
Type
Prompt
Level
Intermediate
Time
about 10 min

Results depend on the tool, the model and what you enter.

Result preview

Example: written by our editors, not real AI output.

POST /webhooks/payments 1. Verify the signature over the raw body; timestamp older than 5 minutes → 400 2. Event ID already in the webhook_events table → 200 straight away, do nothing 3. Store the entry (ID, type, received, status "open") → 200 in under 1 second 4. Queue: fetch the current payment state from the provider, unlock the order 5. Error → up to 5 retries with growing gaps, then status "failed" and an alert Tests: wrong signature, same event twice, "refunded" before "paid", database unreachable Assumption: the sender retries deliveries for up to three days

Fill in

What you type stays in this browser window. We store and send nothing.

Which events arrive?
What should happen next?
What do you work with?

Your prompt

This is an instruction for an AI, not the result itself.

Where this prompt works

These AI tools are a good fit for this prompt:

How to use it

  1. Fill in the fields or tap a suggestion. Leave out names, addresses and other personal data.
  2. Copy the finished prompt into an AI tool of your choice.
  3. Send the same test event twice and one with altered content. The first may take effect only once, the second must be rejected.

Why does this work?

Senders often deliver webhooks more than once, late or out of order. Keeping signature check, event ID and the quick response cleanly separate prevents double bookings and lost events.

Tips

  • Do not keep the secret in the code; store it in a protected environment variable and plan how to rotate it.

Also a good fit

You may use our prompts freely, including at work. Please do not republish them as your own collection. We give no warranty for AI results; check them yourself. Terms of use