Skip to content

feat(sdk): events - #242

Draft
matoous wants to merge 2 commits into
mainfrom
md/webhooks
Draft

matoous wants to merge 2 commits into
mainfrom
md/webhooks

Conversation

@matoous

@matoous matoous commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Adds typed event handling with signature verification, callbacks, and resource fetching.

events, err := client.EventsHandler(secret, func(ctx context.Context, event sumup.EventNotification) error {
    log.Printf("Unhandled event: %s %s", event.EventID(), event.EventType())
    return nil
})
if err != nil {
    return err
}

if err := events.OnMemberUpdated(func(ctx context.Context, event *sumup.MemberUpdatedEvent) error {
    member, err := event.FetchObject(ctx)
    if err != nil {
            return err
    }
    log.Printf("Member updated: %s", member.ID)
    return nil
}); err != nil {
    return err
}

if err := events.Handle(ctx, rawBody, signatureHeader); err != nil {
    return err
}

Events (also knows as webhooks) allow integrations to listen for events from SumUp and react to them / update the state on their side.

@matoous matoous self-assigned this Apr 12, 2026
@matoous
matoous force-pushed the md/webhooks branch 3 times, most recently from 75de328 to 3f3659c Compare July 11, 2026 20:29
@matoous
matoous force-pushed the md/webhooks branch 10 times, most recently from 9411491 to 014fcfa Compare September 5, 2026 21:01
@matoous matoous changed the title feat(sdk): webhooks feat(sdk): events Sep 6, 2026
Initial draft of a webhook capabilities. The goal of this PR is to
test the interfacing between the webhooks service that we are working
on and the SDKs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant