Webhooks for the Files API

This API supports webhooks. When asynchronous events occur on our side, we can send an HTTP call (webhook) to your application, so you can react to these events in real time.

You can set up webhooks via the dashboard. See the Next-gen Webhooks guide.

The payload of a webhook is always simply a snapshot of the entity, as returned by the GET endpoint.

If you are setting up webhooks via the Webhooks API instead for any of the events below, you will need access to files.read.

Available webhook events

EventDescription
file.acceptedAn uploaded file passed validation and can be used as dispute evidence.
file.failedProcessing an uploaded file failed due to an internal error.
file.rejectedAn uploaded file failed validation or security scanning and cannot be used.

Webhook payload examples

{
  "resource": "file",
  "id": "file_1A2B3C4D5E",
  "mode": "live",
  "createdAt": "2024-02-12T11:58:35+00:00",
  "expiresAt": "2024-03-13T11:58:35+00:00",
  "filename": "shipping-receipt.pdf",
  "sizeInBytes": 8429,
  "purpose": "dispute-evidence",
  "profileId": "pfl_5B8cwPMGnU",
  "status": "accepted",
  "_links": {
    "self": {
      "href": "https://api.mollie.com/v2/files/file_1A2B3C4D5E",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://docs.mollie.com/reference/get-file",
      "type": "text/html"
    }
  }
}
{
  "resource": "file",
  "id": "file_1A2B3C4D5E",
  "mode": "live",
  "createdAt": "2024-02-12T11:58:35+00:00",
  "expiresAt": "2024-03-13T11:58:35+00:00",
  "filename": "shipping-receipt.pdf",
  "sizeInBytes": 8429,
  "purpose": "dispute-evidence",
  "profileId": "pfl_5B8cwPMGnU",
  "status": "failed",
  "statusReason": "processing_error",
  "_links": {
    "self": {
      "href": "https://api.mollie.com/v2/files/file_1A2B3C4D5E",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://docs.mollie.com/reference/get-file",
      "type": "text/html"
    }
  }
}
{
  "resource": "file",
  "id": "file_1A2B3C4D5E",
  "mode": "live",
  "createdAt": "2024-02-12T11:58:35+00:00",
  "expiresAt": "2024-03-13T11:58:35+00:00",
  "filename": "shipping-receipt.pdf",
  "sizeInBytes": 8429,
  "purpose": "dispute-evidence",
  "profileId": "pfl_5B8cwPMGnU",
  "status": "rejected",
  "statusReason": "invalid_format",
  "_links": {
    "self": {
      "href": "https://api.mollie.com/v2/files/file_1A2B3C4D5E",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://docs.mollie.com/reference/get-file",
      "type": "text/html"
    }
  }
}