webhookendpoint

package
v1.42.28 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type WebhookEndpoint

type WebhookEndpoint struct {
	mixin.Model[WebhookEndpoint]

	// URL to POST events to
	Url string `json:"url"`

	// HMAC signing secret (auto-generated)
	Secret string `json:"secret,omitempty"`

	// Enabled/disabled status
	Status string `json:"status"`

	// Event types to receive, e.g. ["invoice.paid", "payment_intent.succeeded"]
	// Empty list means all events.
	Events  []string `json:"events,omitempty" datastore:"-"`
	Events_ string   `json:"-" datastore:",noindex"`

	Description string `json:"description,omitempty"`

	Metadata  Map    `json:"metadata,omitempty" datastore:"-"`
	Metadata_ string `json:"-" datastore:",noindex"`
}

WebhookEndpoint configures an HTTP endpoint that receives billing events.

func New

func (*WebhookEndpoint) Defaults

func (w *WebhookEndpoint) Defaults()

func (*WebhookEndpoint) Load

func (w *WebhookEndpoint) Load(ps []datastore.Property) (err error)

func (*WebhookEndpoint) MatchesEvent

func (w *WebhookEndpoint) MatchesEvent(eventType string) bool

MatchesEvent returns true if this endpoint should receive the given event type.

func (*WebhookEndpoint) Save

func (w *WebhookEndpoint) Save() (ps []datastore.Property, err error)

func (*WebhookEndpoint) Validator

func (w *WebhookEndpoint) Validator() *val.Validator

Jump to

Keyboard shortcuts

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