Skip to content

[Feature]: Parser for Webhook Payload NotificationRequestItem #448

@obber

Description

@obber

Feature summary

Add a parser that returns a typed contract for NotificationRequestItem

Problem statement

Reference: https://github.com/Adyen/adyen-go-api-library/blob/de7104ad348dde59c0eed4c0456a6e43222d079a/src/webhook/model_notification_request_item.go#L6C2-L6C16

Currently, the NotificationRequestItem is a *map[string]interface{}. This makes it difficult to consume the webhook events that send this payload.

It would be great to have a parser that gives us a typed contract for NotificationRequestItem that we use in our webhook event handler.

Proposed solution

A library or package that parses the map of arbitrary fields and exposes a typed contract for additionalDetails (The NotificationRequestItem)

Alternatives considered

Update the types directly in the go sdk but that will probably be a big breaking change for a bunch of clients, so a parser would make more sense?

Additional context

We surface things like the last 4-digits and a card icon on our payment confirmation page, which we get from the AUTHORISED webhook event. We'd prefer to use a typed contract to understand and use these values.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions