Webhooks API
123hub sends outgoing webhooks to your callback URLs when payment or payout events occur. Callback destinations are configured for your account during onboarding and can be changed in the merchant dashboard webhook settings or through support. A per-paymentwebhook_url is temporarily unavailable.
Event Types
A destination receives only the events in its subscription. The default subscription of an onboarding callback URL is
payment.completed, payment.failed and payment.processing; payment.created, payment.cancelled and payment.refunded must be added explicitly.
Payouts use the same payment.* callbacks as deposits and are identified by data.result.payment.destination: "out". payment.processing is never sent on a status change; it is produced only by a payment.notification request for a deposit that is still processing. A webhook.test delivery (test data in data.test_data) can be triggered for a destination to check connectivity and signature verification.
An account can have one destination for both directions, or separate deposit and payout destinations (set up by our team). When a separate destination exists for a direction, that direction’s events go only there.
Delivery Payload
Outgoing payment webhook deliveries use this envelope.data.result has the same payment projection as the payment.status result.
Internal indexing fields are stripped before delivery. Do not depend on fields prefixed with
_.
Delivery Headers
Use
X-Webhook-Signature-V3. It binds replay metadata and the raw body. Use X-Webhook-Signature-V2 or X-Data-Hash only for backward-compatible verification. Static custom headers configured for a destination are sent as well but can never override these headers.
Signing Secrets
All three signatures of a delivery use the same secret, which depends on the destination:
Webhook-secret rotation is immediate, with no overlap period: retries of earlier events are signed with the new secret. Rotating moves a compatibility-mode destination to a dedicated secret; this is recommended.
Signature Verification
Verify against the exact raw request body bytes. Do not parse and re-serialize JSON before hashing. Each attempt carries a fresh timestamp and nonce, so a 5-minute timestamp window plus a nonce cache is a safe replay check. A repeatedX-Webhook-Id is expected on retries and must not be rejected.
Node.js
payload.data.result.payment. Decide on status.final plus status.status; refunds are final with success: true.
Retry Policy
Webhook delivery succeeds on any HTTP2xx response within the timeout; the response body is ignored. Any other status (redirects are not followed, so 3xx fails too), timeouts, connection/TLS errors, and URLs rejected by validation at delivery time are failed attempts.
Default per-destination settings:
The first attempt is made immediately. Retry
n is scheduled with exponential backoff and jitter:
payment.notification, or poll payment.status. Delivery order is not guaranteed, so handlers must be idempotent.
Idempotency
Use the bodyid as the deduplication key: it identifies one payment event ({h_id}:{event}, plus a per-refund suffix for payment.refunded) and is identical for retries and resends of that event. Payout re-notifications are the exception: their id uses the payout.* event name. X-Webhook-Id identifies a delivery and changes for manual re-deliveries; data.request_id is unique per generated callback body. Neither should be used as the business idempotency key.
Webhook Management
Legacy callback configuration routes under/api/v1/webhooks are not part of the public API. Callback URLs, event subscriptions, timeout, attempts and webhook-secret rotation are managed in the merchant dashboard webhook settings or through support; separate deposit and payout destinations are set up by our team. Payment-level re-delivery is available through the signed endpoint below.
Merchant Payment Webhook Resend
payment.completed for a successful payment, payment.cancelled for a cancelled one, and payment.failed for any other final status. It is delivered to your destinations that are currently subscribed to that event. If no destination is subscribed (for example, payment.cancelled is not in your subscription), the request succeeds but nothing is sent.
Authentication: X-Data-Application-Id and X-Data-Hash (v1 hash scheme), and the API key must have the webhooks.update scope. X-Data-Timestamp plus X-Data-Nonce are an optional pair; a partial pair is rejected. The endpoint is limited to 10 requests per minute per API key.
Request body:
Without replay headers,
X-Data-Hash is SHA512(raw JSON body + API secret).
With both replay headers, X-Data-Hash is SHA512(payload + API secret), where payload is the lines below joined with \n (LF), with a single \n after the nonce, immediately followed by the raw JSON body:
"quadpay-merchant-webhook-resend-v1\nPOST\n/api/v1/payments/pay_123/webhook/resend\n1716123456\nreq-0001\n" + rawJsonBody. The path is the exact request path without query string. X-Data-Timestamp is Unix seconds and must be within 5 minutes of the server time; X-Data-Nonce is up to 128 characters from A-Z a-z 0-9 . _ : - and can be used only once. If a supplied nonce cannot be recorded, the request is rejected; retry with a new nonce.
Success response (200, not X-Data-Hash signed):
id, and X-Webhook-Id: {id}:manual:{operation_id}.
Errors use the standard error envelope:
Re-notification
Thepayment.notification method (scope webhooks.create or webhooks.update, 10 requests per minute) queues a webhook for any payment, final or not, and returns the payment result. The event is derived from the current status:
The delivery uses the same envelope, headers and signatures; its
X-Webhook-Id is {id}:manual:{suffix}.
Per-Payment Webhook URL
When available,payment.in and payment.out accept params.payment.webhook_url (absolute public HTTPS URL, at most 2048 characters). It is validated at request time and again before every delivery to reduce SSRF risk.
- The URL is bound to that one payment and receives only its
payment.created,payment.completedandpayment.failedevents. Your account-level destinations keep receiving their subscribed events too. - Deliveries are signed with the derived secret from Signing Secrets: lowercase hex
HMAC-SHA256(exactAuthenticatedApiSecret, "quadpay:merchant-webhook-signing:v1"). Do not verify with the API secret itself. - Up to 3 attempts with a 60-second base retry delay.
