Webhook signature verification
Verify each notification on your server before using it to update a payment or case record. Payments v2 notifications use the x-signature header.
Use the webhook signing key for the notification's environment. The request-authentication API_KEY is a separate credential and is not a webhook signing key.
Header format
The x-signature header contains one or more comma-separated v1=<signature> entries. Each signature is a 64-character lowercase hexadecimal SHA-256 digest. v1 identifies the signature scheme version.
v1=<lowercase_sha256_hex>, v1=<another_lowercase_sha256_hex>
The values above are format placeholders. When multiple webhook signing keys are enabled, the header can contain a signature for each key. Compute the expected signature with your configured signing key and compare it with each v1 value in x-signature. A match with any value passes verification.
Signature input
Use the parsed notification fields and their original values. This section describes SHA-256 over selected field values and the appended signing key; it does not hash the raw HTTP body.
- Exclude the body
signfield. - Exclude fields marked as excluded in the event's API Reference signature coverage, even when they have values. New notification fields participate by default unless marked as excluded.
- Exclude fields whose values are
null,undefined, or an empty string. Keep zero andfalse. - Sort the remaining field names in ascending ASCII order.
- Concatenate only their values in that order, without field names,
=,&, or other separators. This is the Canonical String. - Append the webhook signing key to the Canonical String.
- Compute SHA-256 over the resulting UTF-8 string and encode the digest as lowercase hexadecimal.
For JSON-string fields, use the string value exactly as received. Do not parse and re-serialize it, change whitespace, reorder its keys, or replace nested JSON strings with objects. The outer notification is still parsed as JSON; preserving a field's string value does not mean hashing the raw request body.
Convert other scalar values to strings: booleans use true or false, and numbers use decimal form without trailing zeros or scientific notation. Preserve large numeric identifiers without precision loss. In particular, Ethoca and RDR enrollment notifications can contain an id JSON number beyond JavaScript's safe integer range; use a parser that retains its full original decimal value before verification and storage.
For the exact field coverage, see the relevant Webhook API Reference. Do not infer participation from the fields present in one example.
Profit share and reversal notifications
Compute the signature using the same sorting, concatenation, and SHA-256 rules above, and compare it with each v1 signature in the x-signature header. A match with any value passes verification. Exclude the body sign itself. Include relatedTxnId and relatedMerchantTxnId when non-null; exclude them when null according to the general rules. Use the received receivers JSON string unchanged.
See the profit share result webhook for the complete payload, notification URLs, and acknowledgement. A /profit/query response can return data.sign, but merchants do not need to verify query response signatures.
Handle missing or invalid signatures
Verify x-signature in your notification handler. For existing integrations using a compatibility header, see Compatibility with existing integrations. If the agreed signature header is missing or its signature is invalid, do not use the notification to update payment or case records, and do not automatically try a different header or the body sign. Preserve the event identifiers for investigation and use the appropriate server-side query API to verify the result.
After a notification passes verification, follow Webhooks and the event's API Reference for acknowledgement, deduplication, and result handling. An invalid notification must not be treated as an accepted business result.
Retries and signing-key rotation
When a notification includes x-timestamp, this header records the send time as a Unix timestamp in seconds and does not participate in the signature. Automatic retries reuse the body and signatures cached when the notification was generated. If x-timestamp is present, only that header is refreshed. Disabling a webhook signing key afterward does not remove its signature from notifications already cached. Do not treat x-timestamp alone as signed proof of freshness or as replay protection. Verify the signature and apply the event's deduplication rules to repeated deliveries.
When a transaction notification is resent manually, Onerway recalculates its signatures using the webhook signing keys enabled at the time of the resend. The signature list in the header may differ from the first delivery. Previously queued automatic retries retain their cached signatures.
Plan webhook signing-key rotation separately from API Key rotation. During a transition, prepare your verifier to accept signatures made with old and new signing keys, including delayed or retried notifications. Do not apply API Key enable/disable behavior or assume a fixed key-retention period for notifications.
Compatibility with existing integrations
Fraud alerts, Ethoca alerts, Ethoca enrollment status notifications, RDR enrollment status notifications, and chargeback alerts also retain the compatibility header X-Rh-Signature and include x-timestamp. Existing integrations can continue to verify the agreed compatibility header. Use x-signature for new integrations.
When Onerway calculates a retained body sign, it uses only the first signing key enabled at that time. During rotation, this value may differ from a signature computed with another enabled key. For events that require a header signature, verify that header rather than the body sign.
x-signature is also available for the corresponding Payments v1 notifications. Refer to the API Reference for the event and documentation version for signature field coverage and any retained X-Rh-Signature header or body sign.
Webhooks
Receive and verify Onerway payment notifications, acknowledge and deduplicate them correctly, and fall back to query APIs when no notification arrives.
Sandbox testing
Use sandbox test cards to validate card payment flows, 3DS scenarios, failure responses, subscriptions, token payments, and wallet payments.