Webhook endpoints in the console
Add a webhook endpoint, watch what it receives and fix a failing one.
Add an endpoint, copy its secret, send a test and read every delivery, all from the console. What a delivery contains and how to verify it is in Webhooks; Receive webhooks locally runs a receiver on your machine. The calls are in the API reference.
Every name in bold is a string of the English console. The page was written from the console's texts and its code, not by following it on a screen with a person. Where they differ, the console is right.
Where it is
Under Developers, open Webhooks. The page says what the endpoints are for: Payrudder sends a signed JSON POST to these HTTPS endpoints when something happens in the account: an invoice is paid, a credit note is issued, a subscription changes. Verify the Payrudder-Signature header with the endpoint's secret; failed deliveries are retried for about a day and a half.
An environment that is not live yet cannot have endpoints. The console says to finish the go-live checklist first.
Add an endpoint
Fill in the form
Fill in the Endpoint URL, a Description and the Events to receive. Tick none to receive every event.
Use an https address. A plain http address is accepted in the sandbox for testing (This URL uses http, which is accepted in the sandbox for testing. Live endpoints should use https.). In live the console warns that events with customer and invoice data would travel unencrypted.
Save it
Press Add endpoint.
Keep the secret
Copy the signing secret now: it is shown only once. Put it where your receiver reads PAYRUDDER_WEBHOOK_SECRET (the templates in examples/ do; see Examples), and verify every delivery with it.
Send a test
Send test sends a signed ping event to the endpoint and shows the answer.
Manage an endpoint
Each endpoint shows its URL, its description, whether it is Active or Paused, and All events or the events it asked for.
| Action | What it does |
|---|---|
| Send test | Sends a signed ping event to the endpoint and shows the answer. The Connect your app page has the same button next to the verification code |
| Pause and Resume | A paused endpoint is not sent events |
| Rotate secret | The old secret stops working at once: your receiver must be given the new one, or it will reject every delivery. The new secret is shown once |
| Delete | Asks Delete this endpoint and its delivery history? |
Several endpoints can be ticked to Pause, Resume or Delete them together. Deleting asks first, and Their secrets cannot be recovered.
Deliveries
Deliveries lists what was sent to an endpoint:
| Column | What it shows |
|---|---|
| Event | The event that was sent |
| Status | Pending, Delivered or Failed |
| Attempts | How many times it was sent |
| Last answer | What your receiver answered |
| Next try | For a delivery that is waiting, when it is sent again |
A status filter narrows the list. Send again sends a delivery once more (POST /v1/webhook-deliveries/{id}/redeliver).
Fix failing deliveries
Look at Last answer first.
Your receiver rejected the signature. The usual causes:
- the body was changed before it was checked,
- the wrong secret,
- a clock more than five minutes off.
A 404 means the path. Check the path of the Endpoint URL.
The address cannot be reached from Payrudder.
Deliveries are at least once and not in order, so a receiver ignores an event id it has already handled. See Webhooks for the retry schedule and the event types.