# Webhook Events Each webhook will contain an `adfin-webhook-type` header, which helps to identify the type of event being processed. You can use this information to build the appropriate logic in your platform to handle each event type effectively. Ensure that you verify the webhook signature to confirm the event’s authenticity before processing it (see [Webhook Signature Verification Guide](https://adfin-docs.readme.io/docs/validate-webhook-signatures)). # Biller webhooks Header information: `adfin-webhook-type: biller` Biller created ```json { "type": "BILLER_CREATED", "billerId": "ed0ce9fc-550e-4e2a-af56-7e457dd70dd8" } ``` Biller status updated ```json { "type": "BILLER_PAYMENTS_STATUS_UPDATED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "ed0ce9fc-550e-4e2a-af56-7e457dd70dd8", "userId": "cbd677d4-bcfa-46b4-be33-26d1d375ebd3", } ``` # Customer webhooks Header information: `adfin-webhook-type: customer` Customer created ```json { "type":"CUSTOMER_CREATED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId":"0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId":"08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "customerId":"cbd677d4-bcfa-46b4-be33-26d1d375ebd3" } ``` Customer updated ```json { "type": "CUSTOMER_UPDATED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "customerId": "cbd677d4-bcfa-46b4-be33-26d1d375ebd3" } ``` Customer deleted ```json { "type": "CUSTOMER_DELETED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "customerId": "cbd677d4-bcfa-46b4-be33-26d1d375ebd3" } ``` Customer merged ```json { "type": "CUSTOMER_MERGED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "customerId": "cbd677d4-bcfa-46b4-be33-26d1d375ebd3" } ``` # Invoice webhooks Header information: `adfin-webhook-type: invoice` Invoice created ```json { "type": "INVOICE_CREATED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "invoiceId": "91279ba0-9a24-4e8f-9c36-b0691e74c72b" } ``` Invoice activated ```json { "type": "INVOICE_ACTIVATED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "invoiceId": "6e5e4fdc-4911-4c9b-a3b5-7c4441b43253" } ``` Invoice deleted ```json { "type": "INVOICE_DELETED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "invoiceId": "2be74caa-3fb7-4dd3-808e-d5f7d51282e9" } ``` # Direct debit webhooks Header information: `adfin-webhook-type: dd-mandate` Direct Debit initiated ```json { "type": "DIRECT_DEBIT_MANDATE_INITIATED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "customerId": "9861c08f-f3a1-4891-9137-254d8b341665", "directDebitMandateId": "60d7b5e5-759d-4af1-9224-ca0082c5f1ad" } ``` Direct Debit failed ```json { "type": "DD_PAYMENT_FAILED", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "customerId": "9861c08f-f3a1-4891-9137-254d8b341665", "directDebitMandateId": "60d7b5e5-759d-4af1-9224-ca0082c5f1ad" } ``` # Payment webhooks Header information: `adfin-webhook-type: payment` Payment sent ```json { "type": "PAYMENT_SENT", "eventId": "965ed90d-afc3-49b3-b60f-7a6eccd100cd", "billerId": "0bfe8c7e-116c-4c70-abd5-73cba6954f9c", "userId": "08b0706f-ca9c-4698-aaa1-2c5e46d8e410", "paymentId": "60d7b5e5-759d-4af1-9224-ca0082c5f1ad", "paymentRequestId": "5c678ac8-b6f1-4e93-ac58-a4664e044023" } ``` # Security best practices for all events * **Verify signatures**: Always verify the webhook signature using the shared secret before processing the event payload. * **Logging**: Log incoming webhook events and their responses for audit purposes and troubleshooting. * **Retry mechanism**: Implement a retry mechanism in case of webhook delivery failure.