HookDeploy’s payload transformation editor lets you modify webhook JSON before it reaches each forward destination. No code, no JSONata — just point, click, and preview.
Configure transformations per destination in Endpoint → Settings → Forward destinations → Configure transform.
Transformation modes
| Passthrough | Allowlist | |
|---|---|---|
| Default behavior | Forward all fields | Forward only selected fields |
| Best for | Tweaking a few fields on an otherwise complete payload | Strict PII control, analytics pipelines |
| Unselected fields | Included unchanged | Dropped from output |
| Strip PII | Toggle “Strip field” on specific paths | Uncheck fields you don’t want |
| Static fields | Added on top of forwarded payload | Added to allowlisted output |
When to use passthrough
Your webhook sender sends a rich payload and you only need to rename amount to amount_usd, mask an email, or add a source field. Most fields pass through untouched.
When to use allowlist
You’re forwarding to a third-party analytics tool and want to send only event_type and amount — nothing else. Allowlist mode ensures no accidental PII leakage.
Field path syntax
Paths use dot notation to reach nested fields:
amount → top-level field
data.amount → nested object
customer.email → deeply nested
items.0.price → first array element's price field
In the visual editor, click any field in the JSON tree to add a transform rule. The editor loads your latest captured webhook as sample data so you can preview changes live.
Formatter reference
Formatters run in the order you add them. Chain multiple formatters on one field — for example, cents_to_dollars then prefix with value "USD ".
Numeric
| Formatter | Options | Input example | Output example |
|---|---|---|---|
cents_to_dollars | — | 4200 | "$42.00" |
dollars_to_cents | — | 42.00 | 4200 |
multiply | value (number) | 100 × 1.5 | 150 |
divide | value (number) | 100 ÷ 4 | 25 |
round | decimals (0–10) | 3.14159 | 3.14 |
abs | — | -42 | 42 |
String
| Formatter | Options | Input example | Output example |
|---|---|---|---|
uppercase | — | "hello" | "HELLO" |
lowercase | — | "HELLO" | "hello" |
titlecase | — | "hello world" | "Hello World" |
trim | — | " hello " | "hello" |
prefix | value (string) | "123" + prefix "order_" | "order_123" |
suffix | value (string) | "123" + suffix "-v2" | "123-v2" |
truncate | max (length) | "hello world" max 5 | "hello" |
mask | show_chars, position (start/end) | "john@example.com" show 3 start | "joh*************" |
hash | — | "john@example.com" | SHA-256 hex digest |
Date / time
| Formatter | Options | Input example | Output example |
|---|---|---|---|
unix_to_iso | — | 1716912060 | "2024-05-28T14:01:00Z" |
unix_to_date | — | 1716912060 | "2024-05-28" |
iso_to_unix | — | "2024-05-28T14:01:00Z" | 1716912060 |
Type conversion
| Formatter | Options | Input example | Output example |
|---|---|---|---|
to_string | — | 42 | "42" |
to_number | — | "42.5" | 42.5 |
to_boolean | — | "true" | true |
Value override
| Formatter | Options | Input example | Output example |
|---|---|---|---|
set_value | value (any) | any | your configured value |
set_null | — | any | null |
Static fields
Add key-value pairs that appear in every forwarded payload regardless of the source webhook. Useful for injecting tenant IDs, source labels, or schema version markers:
{
"source": "hookdeploy",
"tenant_id": "acme-corp"
}
Static fields appear in the live preview in green. They are merged into the transformed output after field rules are applied.
Common recipes
Strip PII before forwarding to analytics
Mode: Passthrough
- Load a sample webhook in the transform editor
- Click
customer.emailin the field tree - Enable Strip field (PII) on the rule card
- Repeat for
customer.phone,customer.name, etc. - Save the transform
Your analytics destination receives the full event minus sensitive customer fields.
Convert Stripe amounts from cents to dollars
Mode: Passthrough
- Click
data.object.amount(or your amount field path) - Rename to
amount_usd - Add formatter:
cents_to_dollars - Preview shows
"$42.00"from input4200
See also: Stripe webhooks.
Normalize timestamp formats
Mode: Passthrough
- Click your Unix timestamp field (e.g.
created) - Add formatter:
unix_to_iso - Output becomes ISO 8601:
"2024-05-28T14:01:00Z"
For date-only fields, use unix_to_date instead.
Add tenant context to every payload
Mode: Either
- Scroll to Static fields in the transform editor
- Add key
tenant_id, value"acme-corp" - Add key
source, value"stripe"
Every forwarded payload includes these fields regardless of what the sender sent.
Allowlist only the fields your server needs
Mode: Allowlist
- Switch mode to Allowlist
- Check only the fields your server expects:
event_type,data.id,data.amount - Add formatters as needed (e.g.
cents_to_dollarsondata.amount) - Preview confirms only selected fields appear in output
Everything else — including unexpected PII — is dropped.
Live preview
The editor runs your transformation against sample data in real time:
- Unchanged fields — default text color
- Transformed fields — orange/warning color
- Static fields — green/success color
- Removed fields — shown as comments in passthrough mode
Load your latest captured request or paste custom JSON to test against Stripe, GitHub, or any provider payload.
Plan availability
Payload transformation availability is plan-controlled. Check the current HookDeploy dashboard or pricing page for the features enabled for your organization while plan enforcement details are being reconciled.
Next steps
- Forwarding — Multiple destinations and header injection
- Stripe webhooks — Stripe-specific transformation example
- REST API — Manage destinations programmatically