Webhook Examples
Real-world examples of how to use TraceBin with popular services and APIs.
Quick Start Examples
Basic JSON Webhook
curl -X POST https://tracebin.com/b/abc123/webhook \
-H "Content-Type: application/json" \
-d '{
"message": "Hello World",
"timestamp": "2024-01-01T12:00:00Z"
}'
Perfect for testing basic webhook functionality.
Form Data Webhook
curl -X POST https://tracebin.com/b/abc123/form \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "name=John&email=john@example.com&message=Hello"
Test form submissions and traditional POST data.
Payment Service Examples
Stripe Webhooks
Test Stripe payment events and webhook signatures
Payment Success Event
curl -X POST https://tracebin.com/b/abc123/stripe \
-H "Content-Type: application/json" \
-H "Stripe-Signature: t=1234567890,v1=..." \
-d '{
"id": "evt_1234567890",
"object": "event",
"type": "payment_intent.succeeded",
"data": {
"object": "payment_intent",
"amount": 2000,
"currency": "usd"
}
}'
Customer Created Event
curl -X POST https://tracebin.com/b/abc123/stripe \
-H "Content-Type: application/json" \
-H "Stripe-Signature: t=1234567890,v1=..." \
-d '{
"id": "evt_1234567891",
"object": "event",
"type": "customer.created",
"data": {
"object": "customer",
"email": "customer@example.com",
"name": "John Doe"
}
}'
PayPal Webhooks
Test PayPal payment notifications and IPN
curl -X POST https://tracebin.com/b/abc123/paypal \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "txn_type=web_accept&payment_status=Completed&mc_gross=99.99&mc_currency=USD&receiver_email=merchant@example.com&txn_id=1234567890"
Development Platform Examples
GitHub Webhooks
Test repository events and deployment hooks
Push Event
curl -X POST https://tracebin.com/b/abc123/github \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: push" \
-H "X-GitHub-Delivery: 12345678-1234-1234-1234-123456789abc" \
-d '{
"ref": "refs/heads/main",
"repository": {
"name": "my-app",
"full_name": "user/my-app"
},
"commits": [{
"id": "abc123",
"message": "Update README"
}]
}'
Pull Request Event
curl -X POST https://tracebin.com/b/abc123/github \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: pull_request" \
-H "X-GitHub-Delivery: 12345678-1234-1234-1234-123456789abc" \
-d '{
"action": "opened",
"pull_request": {
"number": 123,
"title": "Add new feature",
"user": {
"login": "developer"
}
}
}'
GitLab Webhooks
Test GitLab pipeline and merge request events
curl -X POST https://tracebin.com/b/abc123/gitlab \
-H "Content-Type: application/json" \
-H "X-Gitlab-Event: Push Hook" \
-d '{
"object_kind": "push",
"ref": "refs/heads/main",
"project": {
"name": "my-project",
"path_with_namespace": "group/my-project"
},
"commits": [{
"id": "abc123",
"message": "Update documentation"
}]
}'
E-commerce Examples
Shopify Webhooks
Test order creation and inventory updates
Order Created
curl -X POST https://tracebin.com/b/abc123/shopify \
-H "Content-Type: application/json" \
-H "X-Shopify-Topic: orders/create" \
-H "X-Shopify-Hmac-Sha256: ..." \
-d '{
"id": 123456789,
"order_number": "#1001",
"total_price": "99.99",
"currency": "USD",
"customer": {
"email": "customer@example.com"
}
}'
Product Updated
curl -X POST https://tracebin.com/b/abc123/shopify \
-H "Content-Type: application/json" \
-H "X-Shopify-Topic: products/update" \
-H "X-Shopify-Hmac-Sha256: ..." \
-d '{
"id": 987654321,
"title": "Updated Product",
"variants": [{
"inventory_quantity": 10
}]
}'
WooCommerce Webhooks
Test WordPress e-commerce events
curl -X POST https://tracebin.com/b/abc123/woocommerce \
-H "Content-Type: application/json" \
-H "X-WC-Webhook-Topic: order.created" \
-d '{
"id": 123,
"number": "1234",
"status": "processing",
"total": "99.99",
"billing": {
"email": "customer@example.com"
}
}'
Custom API Examples
REST API Webhook
User Registration
curl -X POST https://tracebin.com/b/abc123/api/users \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-token" \
-d '{
"event": "user.registered",
"user_id": 12345,
"email": "user@example.com",
"plan": "premium"
}'
Order Processing
curl -X POST https://tracebin.com/b/abc123/api/orders \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"order_id": "ORD-12345",
"status": "completed",
"amount": 149.99,
"items": [
{"product_id": 1, "quantity": 2}
]
}'
GraphQL Webhook
curl -X POST https://tracebin.com/b/abc123/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-graphql-token" \
-d '{
"query": "mutation { createUser(input: { email: \"user@example.com\" }) { id } }",
"variables": {},
"operationName": "CreateUser"
}'
Testing & Debugging Examples
Error Response Testing
curl -X POST https://tracebin.com/b/abc123/test-errors \
-H "Content-Type: application/json" \
-d '{
"error": "validation_failed",
"message": "Invalid email format",
"field": "email"
}'
Test how your application handles error responses.
Large Payload Testing
curl -X POST https://tracebin.com/b/abc123/large-payload \
-H "Content-Type: application/json" \
-d @large-payload.json
Test handling of large webhook payloads (up to 2MB).
Ready to test these examples?
Create your first bin and start testing webhooks with these real-world examples.