Onerway
API Reference

Webhooks and signature verification

Learn how to receive Transfer V3 webhooks, read the common notification envelope, verify signatures, and acknowledge notifications.

Transfer V3 sends webhook notifications using HTTP POST. Verify the signature before processing the business data according to the event type.

Source IP allowlist

Onerway sends all Transfer V3 webhook notifications from the following IP addresses. If your webhook endpoint restricts source IPs, allow all addresses for the corresponding environment in your firewall, WAF, or application.

EnvironmentWebhook source IPs
Sandbox27.109.125.90
Production20.68.8.122
18.207.78.37
52.70.96.9
54.160.200.158
44.219.164.167

After allowing these IPs, you must still verify the notification signature as described below.

Common notification envelope

FieldDescription
requestIdNotification request identifier.
eventTypeIdentifies the business event that triggered the notification.
createdAtEvent creation time.
versionCurrent notification message version: V3.
dataBusiness data whose field structure depends on the event type.

Refer to the corresponding webhook API reference for each event type, its business fields, and processing requirements. For example, see the payment webhook for payment events.

Headers and signature verification

HeaderDescription
Content-Typeapplication/json;charset=UTF-8.
x-timestampUnix timestamp in seconds when this notification was generated. Included in the signing input when calculating the signature.
x-signatureHMAC-SHA256 signature encoded as a hexadecimal string.

Preserve the original request body and calculate the signature with the corresponding notification verification key:

signingInput = x-timestamp + "." + rawBody
signature = hex(HMAC-SHA256(key, signingInput))

Process the notification only after the result matches x-signature. Do not parse and serialize the JSON before verification: changes to field order, whitespace or number formatting alter the signed content. Keep the key on your server; obtain it through the configuration provided during onboarding.

Multiple signatures

During key rotation, x-signature can contain multiple signatures separated by commas (,). Calculate the signature with your configured notification secret and compare it with each entry. A match with any entry passes signature verification.

Signature test vector

The following simplified payment event demonstrates the common verification method for checking your implementation. Refer to the corresponding webhook API reference for complete business fields.

ParameterExample value
x-timestamp1792634400
Notification signing keydemo_webhook_secret (for demonstration only)

The raw notification body is:

{
  "requestId": "demo_event_001",
  "eventType": "transfer.transaction.status.change",
  "createdAt": "2026-10-22T10:00:00",
  "version": "V3",
  "data": {
    "transferId": "demo_transfer_001",
    "status": "S"
  }
}

This test vector uses UTF-8 encoding, two-space indentation, and LF (\n) line endings, with no trailing newline. Use the exact text in the code block; do not minify or serialize the JSON again.

Build the signing input as x-timestamp + "." + rawBody and calculate HMAC-SHA256 with the demonstration key. The expected hexadecimal signature is:

e828b5dd8e90b033f0315fe002f3d6b1d1bccdd74ed5c1b15faf7f55c1856955

Code examples

These implementations calculate the signature from the received x-timestamp and raw HTTP request body, then securely compare it with each signature in x-signature. Pass the raw body, x-timestamp, x-signature, and notification signing key for the environment to the verification function. A match with any signature passes verification. Parse business data only after verification succeeds.

<?php

function verifyWebhook(
    string $rawBody,
    string $timestamp,
    string $signatureHeader,
    string $secret
): bool {
    $expected = hash_hmac('sha256', $timestamp . '.' . $rawBody, $secret, true);
    foreach (explode(',', $signatureHeader) as $value) {
        $value = trim($value);
        if (preg_match('/\A[0-9a-fA-F]{64}\z/', $value)
            && hash_equals($expected, hex2bin($value))) {
            return true;
        }
    }
    return false;
}

In production, pass the raw body as a string in PHP, a byte[] in Java, a []byte in Go, or a Buffer in JavaScript.

Acknowledgement and duplicate notifications

Return HTTP 2xx, such as HTTP 200, after successfully receiving and processing the notification. Request errors and non-2xx responses are treated as notification failures.

You may receive duplicate notifications for the same business event. Process notifications idempotently using the identifiers and business semantics of the specific event, and persist the result. Do not deduplicate on the business object ID alone, as that could suppress subsequent events for the same object. For out-of-order or uncertain updates, follow the corresponding event API reference to check the current business state.