# Testing

**Built-in Testing**

Use our built-in webhook testing feature to verify your configuration:

{% stepper %}
{% step %}
**Open Test Modal**

Click the "Test Webhook" button on any webhook in your dashboard.
{% endstep %}

{% step %}
**Customize Payload**

Modify the test payload to match your expected webhook data.
{% endstep %}

{% step %}
**Execute Test**

Click "Execute Test" to send the webhook with proper HMAC signature.
{% endstep %}

{% step %}
**Review Response**

Check the response status, headers, and generated keys.
{% endstep %}
{% endstepper %}

**Common Issues & Solutions**

1. **HMAC Signature Mismatch**

   Error: "Invalid signature"

   • Check that your HMAC secret matches exactly

   • Verify the HMAC algorithm (SHA-1, SHA-256, SHA-512)

   • Ensure the header name is correct (X-Signature, X-Webhook-Signature, etc.)

   • Make sure the raw body is used for signature calculation
2. **Conditions Not Met**

   Error: "Conditions not met, webhook skipped"

   • Check your custom conditions logic

   • Verify field paths are correct (use dot notation)

   • Test with different payload values

   • Use the test feature to debug conditions
3. **Key Generation Failed**

   Error: "Key generation failed"

   • Verify your provider and service are correctly configured

   • Check that you have sufficient API credits

   • Ensure the service is active and not disabled

   • Check the quantity field path (e.g., item.quantity)

**Status Codes**

{% columns %}
{% column %}
200 - Success

Keys generated successfully
{% endcolumn %}

{% column %}
204 - No Content

Conditions not met, webhook skipped
{% endcolumn %}
{% endcolumns %}

{% columns %}
{% column %}
400 - Bad Request

Missing signature or invalid payload
{% endcolumn %}

{% column %}
500 - Server Error

Internal error or key generation failed
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
**Pro Tip:** Always test your webhooks thoroughly before going live. Use the built-in testing feature to verify HMAC signatures, custom conditions, and key generation.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jnkie.com/shop-webhooks/testing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
