POST
/
webhooks
curl https://production.methodfi.com/webhooks \
  -X POST \
  -H "Method-Version: 2024-04-04" \
  -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "payment.update",
    "url": "https://reference.example.app/webhook",
    "auth_token": "md7UqcTSmvXCBzPORDwOkE"
  }'
{
  "id": "whk_cSGjA6d9N8y8R",
  "type": "payment.update",
  "url": "https://reference.example.app/webhook",
  "metadata": null,
  "created_at": "2020-12-09T00:41:05.647Z",
  "updated_at": "2020-12-09T00:41:05.647Z"
}

Creating a new Webhook means registering a URL to receive updates for a specific event type. Once a resource is created or updated, your application will be notified via an HTTPS POST request with the event information.

Body

type
enum
required

The event type to be sent to this URL. See Webhook Event Types.

url
string
required

The URL receiving the Webhook event.

When testing your integration in a local environment, we recommend utilizing the following technologies for a seamless developer experience with Webhooks:

auth_token
string

Secret token for request validation. Will be sent as a base64 encoded string in the Authorization header of the Webhook. This can be used by your application to ensure the integrity of incoming Webhook events.

Returns

Returns the newly created Webhook object.

curl https://production.methodfi.com/webhooks \
  -X POST \
  -H "Method-Version: 2024-04-04" \
  -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "payment.update",
    "url": "https://reference.example.app/webhook",
    "auth_token": "md7UqcTSmvXCBzPORDwOkE"
  }'
{
  "id": "whk_cSGjA6d9N8y8R",
  "type": "payment.update",
  "url": "https://reference.example.app/webhook",
  "metadata": null,
  "created_at": "2020-12-09T00:41:05.647Z",
  "updated_at": "2020-12-09T00:41:05.647Z"
}