Test your Webhook Endpoint

You should always test that your webhook endpoints behave as expected before registering them in live mode.

📘

Testing endpoins locally

If you want to test endpoints while you develop them locally, we recommend using a tool such as localtunnel, which will temporarily expose a port of your local machine to the internet through a URL that the tool itself will give you.

Testing your webhooks through the dashboard

You can test your webhook endpoints from the Fintoc Dashboad following a few steps:

  1. Register a webhook endpoint using the test mode from the Webhooks section of the dashboard.
  2. After registering the webhook endpoint, click on its name to open a detailed view of the webhook endpoint.
  3. Once inside the detailed view, click on the button to send a test webhook.
  4. A form should open pu. Select the event type and then click send.

After following the steps above, the dashboard will show you the event that got sent to the webhook endpoint.

Please consider that test events have fake data that can't be used to query the Fintoc API. For instance, when sending a test account.refresh_intent.succeeded event, the result will be the following JSON:

{
  "id": "evt_1zgnKZmDC2A59vrX",
  "type": "account.refresh_intent.succeeded",
  "mode": "test",
  "createdAt": "2021-07-07T15:15:09.802Z",
  "data": {
    "object": "refresh_intent",
    "refreshedObject": "account",
    "refreshedObjectId": "acc_00000000",
    "status": "created",
    "createdAt": "2021-06-28T00:00:00.000Z"
  },
  "object": "event"
}

Notice how the account id corresponds to acc_00000000, which is a fake account, so there is no way to get its details using the get account endpoint.

📘

Webhooks in live mode can't be tested through the Dashboard, because these events are only sent under specific circumstances (for example, when a connected account gets updated with its latest bank movements).


Did this page help you?