Help us shape the future of Go! Take the 2026 Go Developer Survey

webhook

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package webhook shows a Stripe webhook endpoint: verify the request, hand the event to the lifecycle, and answer so Stripe retries only what a retry can fix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(wh stripe.Webhook, l *payforge.Lifecycle, log *slog.Logger) http.Handler

Handler returns the endpoint. The lifecycle's Store and Sink are yours; set its Provider to the Stripe client in production so event order cannot matter, and set its Locker if events can be handled at once.

Serve it from an http.Server with ReadHeaderTimeout and ReadTimeout set: the body is read before the signature is checked, so a slow sender otherwise holds a connection open.

Types

This section is empty.

Jump to

Keyboard shortcuts

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