You need to register and verify the endpoint you'd like to receive webhooks. The Order Submit API will POST to this endpoint as events occur, retrying if your endpoint does not return a valid response in time.
Before you register an endpoint, read Delivery, Retries & Idempotency. It covers the response timeout, the full retry schedule (currently up to ~39 days), and why your endpoint needs to handle repeat notifications.
Registration is not a reservation. The moment you call /api/callback/create, we POST to your endpoint and expect it to answer. Deploy the endpoint first, then register it.
Your endpoint must already:
POST with a 2xx status, andapplication/x-www-form-urlencoded with a single verifier field.Registering again resets you to unverified. Calling /api/callback/create clears the verified status on your existing callback before it POSTs to the new URI. If that POST fails, webhooks stop until you register and verify successfully. Do not re-register a working endpoint to "refresh" it.
/api/callback/createContent-type: application/json
Each set of API credentials can only have a single webhook address enabled at one time.
1
2
3
4
curl https://apps.whcc.com/api/callback/create \
-H "Authorization: Bearer 726670514499" \
-F callbackUri=https://path.to.your/webhook/endpoint \
-X POST
We will immediately POST to callbackUri with a parameter verifier with a unique verification code. Use the endpoint below to submit this verification code to prove you control the endpoint and enable webhooks to be sent to that address.
/api/callback/verifyContent-type: application/json
1
2
3
4
curl https://apps.whcc.com/api/callback/verify \
-H "Authorization: Bearer 726670514499" \
-F verifier=a53ae191-00f3-44f4-810c-19d88a5b4c16 \
-X POST
Your webhook endpoint is now setup and ready to go.
400.05400.05 — Unable to post a unique verification code to provided URI — means our verification POST did not get a successful response from your endpoint. It is a single error covering several unrelated causes.
Start by checking your own access log for our POST. That one observation splits the causes in half.
application/x-www-form-urlencoded with a single verifier field. It is not JSON. An endpoint written to parse only JSON may answer 400 or 415 here and then handle every real webhook correctly.create call itself, not later.Do not register a URI that redirects. A redirect is followed, but replayed as a GET with no body. If that GET answers 2xx, registration succeeds while your handler never sees the verifier, so this appears as a confusing success rather than a 400.05. Register the final destination directly — including where you would rely on http:// being upgraded to https://. See Delivery, Retries & Idempotency.
Retrying is safe. Because each create mints a fresh verifier and leaves your callback unverified, always finish by calling /api/callback/verify with the verifier from the most recent POST you received. An earlier verifier is no longer valid.
Event Types describes the different types of messages to expect.