Skip to content
402pay Support
Browse topics

Set up webhooks

Add an endpoint, choose its events, and verify every delivery with its signing secret.

On this page

Webhooks tell your server what happens in your business as it happens, such as a payment succeeding, so you can fulfill orders without checking.

Developers → Webhooks → Add endpoint.
  1. 1Endpoint URL. A public https address on your server. Every event you choose is sent there as a POST.
  2. 2Events. Pick the ones your server handles. A new endpoint starts with payment.succeeded and payment.failed.

Add an endpoint

  1. Go to Developers → Webhooks and select Add endpoint.
  2. Enter your endpoint's URL. It must be a public https address.
  3. Add a description if you like, and choose the events it receives, or select all.
  4. Confirm it's you, then copy the signing secret. It's shown once.

Verify every delivery

Every delivery is signed with your endpoint's secret. Check the signature before you act on one, so no one else can fake an event. The webhooks guide shows how.

Test it

From the endpoint's menu, select Send test event and pick an event type. Test events are signed like real ones and marked as tests, so skip them before fulfilling anything.

Manage an endpoint

  • Turn it off and on with its switch, without losing its settings.
  • Edit its URL, description, or events.
  • Rotate secret to get a new one. The old secret keeps signing alongside it for 24 hours, so you can deploy the new one without missing deliveries.
  • Delete it to stop its deliveries, including any retries still waiting.

Was this article helpful?