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 ¶
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.
Click to show internal directories.
Click to hide internal directories.