webhook

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package webhook parses Tipalti IPN (Instant Payment Notification) callbacks.

Tipalti posts IPNs as application/x-www-form-urlencoded bodies (in the style of the classic PayPal IPN pattern) whenever a payee's status or a payment's state changes. Tipalti IPNs are delivered over HTTPS to a URL registered in the AP Hub, and don't carry a signature header the way many other providers' webhooks do — treat the endpoint URL itself as the secret (keep it unguessable/unpublished), and optionally verify the payload by calling back into the SOAP or REST API to confirm the referenced payee/payment actually changed as described before acting on it for anything financially significant.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyBody = errors.New("tipalti: webhook: empty body")

ErrEmptyBody is returned by Parse when given an empty request body.

Functions

This section is empty.

Types

type Event

type Event map[string]string

Event is a parsed IPN notification's fields.

func Parse

func Parse(rawBody string) (Event, error)

Parse parses a raw application/x-www-form-urlencoded IPN body into an Event.

func (Event) EventType

func (e Event) EventType() string

EventType returns the notification's event type, normalized to snake_case (e.g. "payee_status_change"), checking the "event" field first and falling back to "type". Returns "" if neither is present.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL