LogoLogo
Connect
Connect
  • 🏑Welcome to LHV Connect API
  • πŸ“ΊNews and Updates
    • πŸ“ˆPerformance and Stats
    • πŸ””Notice of Change
  • 🧭Quick Start Guide
  • πŸŽ₯Connect Fundamentals
    • Authentication and Certificates
    • Environments
    • Messaging Pattern
    • Service Provider model
    • Technical limitations
    • Encoding and Languages
    • Response Compression
    • Dates and Time Zones
    • Response Codes and Error handling
    • Onboarding
    • Live Proving
    • LHV UK and Estonia integrations
    • FAQ and Tips
  • πŸ“–Service Catalogue
    • πŸ’šHeartbeat
      • Heartbeat - GET
      • Heartbeat Advanced - GET
    • πŸ“©Messages Services
      • Get next message
      • Get list of messages
      • Get list of messages V2
      • Get message by response ID
      • Count number of messages
      • Mark message as processed
      • Mark batch of messages as processed
      • Mark batch of messages as processed V2
      • Messages Metadata
      • Get compressed message for testing
    • πŸ’°Account Information Services
      • Account Balance
      • Account Statement
      • Transaction Notification
        • Incoming Bacs Credit Notification
    • πŸ’ΈPayment Initiation Services
      • Pain.001.001.09
      • Pain.002.001.10
      • Samples
      • Authentication methods
      • Payment Scheme Selection
      • Payment Return Initiation
      • Payments Service Idempotency
      • Payments Originating Overseas
      • Legacy documents
        • pain.001.001.03 format
    • βœ…Confirmation of Payee Services
      • Confirmation of Payee - Requester
      • Confirmation of Payee - Responder
    • πŸ˜Άβ€πŸŒ«οΈVIBAN Services
      • VIBAN Open
      • VIBAN Bulk Open
      • VIBAN Modify
      • VIBAN Info
      • VIBAN Close
      • VIBAN Notification
    • πŸ”—Indirect Scheme Access
      • Agency Account Synchronization
      • RTF - Routing Table Files message
      • 🧾Payment Collection Services
        • πŸ’·Bacs Direct Debit
          • Bacs Direct Debit Mandate Initiation Request
          • Bacs Direct Debit Mandate Initiation Response
          • Bacs Direct Debit Mandate Initiation Response Confirmation
          • Bacs Direct Debit Mandate Cancellation Request
          • Bacs Direct Debit Mandate Cancellation Response
          • Direct Debit Incoming Collection Notification Request
          • Direct Debit Collection Notification Response
          • Direct Debit Collection Notification Response Confirmation
          • Direct Debit Reversal Notification Request
          • Examples
    • πŸ“¨Webhooks
      • Webhook Format and Processing
      • Managing Webhook Configurations
      • Webhook Security
      • Webhook Metadata
      • Full Bodied Webhooks
  • πŸ—“οΈReference
    • Glossary
    • Code Reference Tables
      • Balance Type Codes
      • Credit and Debit Transaction Codes
      • Payment Scheme Codes
      • Direct Debit Scheme Codes
      • Payment Reject Codes
      • Payment Return Codes
      • Bacs Direct Debit Mandate Reject Codes
      • Bacs Direct Debit Reject Codes
      • Bacs Direct Debit Reversal Reason
      • Bank Transaction Codes
      • Transaction Purpose Codes
      • Category Purpose Codes
      • Private Person Identification Codes
      • Organisation Identification Type Codes
      • Payment Priority Codes
      • Charges Bearer Codes
  • ☎️Support
    • Contact
Powered by GitBook
On this page
  • Preventing Duplicate Processing
  • Webhooks & Source IP Addresses
  • Webhook Event Payload Schema

Was this helpful?

  1. Service Catalogue
  2. Webhooks

Webhook Format and Processing

Connect Webhooks service is a logical extension of our Messages Services. When Customer has subscribed to any of the Message types via Subscription services our system will start sending the POST requests to the host and uri configured.

Our Webhook messages contain similar data already covered in Messages Services - request and response ID's, message type, creation time etc. Business information is only provided if either Webhook Metadata or Full Bodied Webhooks are enabled. If not, the customer must use the Messages Services to read the actual message content.

The main benefit of using Webhooks for the customer is significantly improving how the general integration is built. With Webhooks there is no need to constantly poll GET /messags endpoints to detect any new Messages pending. This is especially important for services that are not directly triggered by the customer requests like Transaction Notification. This improves both the speed of getting the newest events from the system and also reduces the load from both Client and Server side.

Subscription services are described at Managing Webhook Configurations

Sample of a typical Webhook message:

{
    "eventId": "7c334869-9c9e-43e7-b11a-be8f605f44fd",
    "eventTimestamp": "2024-08-19T07:41:18.421145632+01:00",
    "subscriptionReference": "9ab35ca0-2f58-4578-aea2-0e611f686ca9",
    "messageResponseId": "RESfaf42325221c4ba3a162286aaf76d00c",
    "messageRequestId": "REQce11219c581840199ca1e4cca0edbd17",
    "messageType": "ACCOUNT_BALANCE",
    "messageCreatedTime": "2024-08-19T07:41:18.404298+01:00",
    "regCode": "13180211",
    "regCodeIssuer": "GB",
    "bankCode": "LHVUK"
}

You can then retrieve the message body using Get message by response ID

When you have processed the message, you should mark it is processed ( Mark message as processed) just the same as if you were not using webhooks

If a webhook fails to send, we will retry it 3 times with 2 second intervals before giving up. This means that network issues could occasionally lead to webhooks never arriving or arriving more than once.

A webhook request is considered failed if there is no response within 15,000 ms, or if there are 4xx, 5xx HTTP responses, or any other error.

Successful requests are those where the POST webhook receives a 2xx or 3xx HTTP response from the customer’s service.

This means you should still periodically poll ( Get list of messages) to check for missed messages

See the next section for how to handle duplicates.

Preventing Duplicate Processing

As discussed above, it is possible to receive the same webhook event twice. This can occur if the network connection breaks, or you return an error code, but you have already processed it.

We include the eventId field to allow you to uniquely identify a webhook event. It will be the same on any retries, meaning you can discard the message if you've seen it before (in other words, eventId is an idempotency key).

As keeping an ever-growing set of all eventIds ever seen is not practical, you can expire old entries from your cache after a day, and similarly reject any webhook whose eventTimestamp is older than this.

Webhooks & Source IP Addresses

Webhooks are sent from a fixed LHV IP address range. Currently the list is shared for Production and Prelive Environments. Please make sure this IP range is added to your systems IP Access List.

Actual IP list will be provided by our implementation or support team!

Webhook Event Payload Schema

Field
Type
Description

eventId

String

(UUID)

A unique identifier for this webhook event. This will stay the same if we retry the notification

eventTimestamp

String

(ISO-8601 datetime)

The server time when this webhook was queued to send. This will stay the same if we retry the notification

subscriptionReference

String

The reference of the associated webhook configuration

messageRequestId

String

The ID of the request message that this response message pertains to

messageResponseId

String

The ID of this response message. This is the key field you should use to retrieve the actual message body

messageType

String

messageCreatedTime

String

(ISO-8601 datetime)

Server time when the message occurred

clientCode

String

The client this message pertains to

clientCountry

String

The county of the client this message pertains to

bankCode

String

Either LHVUK or LHVEE, indicating whether this message originated from the UK or Estonian branch of Connect

metadata (Optional)

String

messageBase64 (Optional)

String

PreviousWebhooksNextManaging Webhook Configurations

Last updated 16 days ago

Was this helpful?

Doing this will also prevent , where an attacker maliciously sends a webhook that was legitimately signed by us in the past.

The type of the message. See the list at

The most relevant values and keys. See

The full message body encoded in Base64. See

πŸ“–
πŸ“¨
replay attacks
Webhook Metadata
Full Bodied Webhooks
Message Types