> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archefusion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook setup

> Webhooks are near-instant messages sent to your server whenever an event occurs. For example, if a payment is successful or failed, that is an event. You will receive a notification on your server whenever events are triggered, and you can verify it to confirm its validity.

## How webhooks work in Archefusion

<img src="https://mintcdn.com/archefusion/6HouEe5B-7vu05Cv/images/ArcheFusion-webhook-event-flow.drawio.png?fit=max&auto=format&n=6HouEe5B-7vu05Cv&q=85&s=9201a283422dc58b8c35d96400e0eb0f" alt="Archefusion webhook event flow" width="811" height="321" data-path="images/ArcheFusion-webhook-event-flow.drawio.png" />

Integrating multiple payment gateways (Paystack, Flutterwave, Interswitch, etc.) individually means you have to set up a webhook URL for each and verify them.

However, with Archefusion, you only set up a single webhook URL. Archefusion receives every event from each of these gateways on your behalf, verifies it, and sends the event to your server. That way, you do not need to independently set up or verify events from different gateways; Archefusion handles it for you.

## How to configure your webhook URL in Archefusion

<Accordion title="Step 1: Paste the Archefusion webhook URL for each gateway into your gateway accounts.">
  This allows Archefusion to receive webhook events from all your configured gateways on your behalf.

  1. Log in to your [merchant account](https://app.archefusion.com/sign-in).

  2. Navigate to “Payment Gateways” > “Gateway Providers” > “My Gateway.”

  3. Select one of your configured gateways and copy the webhook URL.

  For example, if you select Flutterwave, copy the webhook URL from your Flutterwave configuration page.

  <img src="https://mintcdn.com/archefusion/bwYrW3yCY4ztyD7M/images/Flutterwave-webhook-url.png?fit=max&auto=format&n=bwYrW3yCY4ztyD7M&q=85&s=e8168a25044fe65d31dfa59e85bd8bb1" alt="Archefusion webhook URL for Flutterwave" width="1597" height="339" data-path="images/Flutterwave-webhook-url.png" />

  4. Paste the webhook URL in your provider dashboard so Archefusion can receive payment notifications on your behalf.

  For example, if you copy the Flutterwave webhook URL, paste it in your Flutterwave dashboard under “Settings” > "Webhooks."

  5. Repeat steps 3 and 4 for each payment gateway you configured.
</Accordion>

<Accordion title="Step 2: Provide your webhook URL in Archefusion to receive payment event notifications on your server.">
  1. Navigate to "Settings" > "API Keys," and scroll to the "Webhooks" section.

  2. Paste your webhook URL in the “Webhook” field and click “Save.”  Archefusion will send all payment event notifications to this URL.
       <img src="https://mintcdn.com/archefusion/6HouEe5B-7vu05Cv/images/ArcheFusion-webhook-configuration.png?fit=max&auto=format&n=6HouEe5B-7vu05Cv&q=85&s=20051d2dcfae94666e00c12b15201413" alt="Archefusion webhook configuration" width="1920" height="856" data-path="images/ArcheFusion-webhook-configuration.png" />

  3. Click the “Get New Secret” button to get your webhook secret. You will use it to verify that every notification you receive is genuinely from Archefusion.

  <Warning>
    Your webhook secret is only generated once. Therefore, you have to securely store it.
  </Warning>
</Accordion>

## A few things to note:

* Your webhook URL must be a `POST` endpoint.
* Your webhook URL must be a live URL (localhost cannot receive events).
* Your webhook URL must return a `200 OK` HTTP response.
  For more information about Archefusion webhook events, retries, and how to verify them, visit the [handle webhook notifications](https://docs.archefusion.com/pages/handle-webhook) page.

<Card title="Next step" icon="rocket" href="https://docs.archefusion.com/pages/accept-payments">
  Create a payment intent to start accepting payments through your configured gateways using your smart routing rules.
</Card>
