0Bit Documentation

Send webhook test events

Use product-supported webhook tests to validate endpoint reachability, raw-body signature handling, and event logging.

Webhook tests prove the delivery or verification path before a real checkout, session, pool, or rail event depends on it. Use the test operation documented for the product surface you are integrating. The audited 0Gate surface queues a signed webhook.test delivery; the audited 0Base surface exposes a signed sample payload and headers for local verification.

Test events do not prove business fulfillment

A synthetic webhook.test event proves delivery plumbing. It does not prove that payment, rail, KYC, or settlement state has changed.

Test loop

This sequence applies to delivery-style tests such as 0Gate. If a product returns a signed sample instead, run the same raw-body verifier locally and record that verification in your smoke-test log.

What to verify

CheckExpected result
Endpoint URLReceives a POST over HTTPS.
Raw bodyAvailable before JSON parsing.
SignatureValidated with the correct mode-specific webhook secret.
Event logStores the event id once.
Handler responseReturns 2xx quickly.
Delivery logMoves to a successful state when the product test sends a delivery. Signed-sample tests may not create a delivery record.

Server-side trigger

async function runWebhookSmokeTest() {
  const result = await productWebhooks.runWebhookTest();

  await smokeTests.record({
    kind: 'webhook_test',
    deliveryId: result.delivery?.id,
    eventId: result.event_id,
    status: result.delivery?.status ?? 'signed_sample',
  });

  return result;
}

Failure triage

SymptomLikely cause
No delivery arrivesWebhook URL missing, blocked, or not reachable.
Test returns only a payload and headersThe product test is a signed-sample verifier, not an outbound-delivery smoke test.
Signature failsWrong secret, wrong environment, or body was parsed before verification.
Delivery retriesHandler is not returning 2xx or times out.
Event logs duplicate rowsMissing unique key on event id.
Test passes but real events failYour handler branches by event type and a real type is unsupported.

On this page