webhookendpoint

package
v1.39.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 6 Imported by: 0

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