payout

package
v1.47.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 9 Imported by: 1 module, 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 Payout

type Payout struct {
	mixin.Model[Payout]

	Amount          int64         `json:"amount"` // cents
	Currency        currency.Type `json:"currency"`
	Status          Status        `json:"status"`
	DestinationType string        `json:"destinationType"` // "bank_account" | "card"
	DestinationId   string        `json:"destinationId"`   // payment method ID
	Description     string        `json:"description,omitempty"`
	ArrivalDate     time.Time     `json:"arrivalDate,omitempty"`
	ProviderRef     string        `json:"providerRef,omitempty"`
	FailureCode     string        `json:"failureCode,omitempty"`
	FailureMessage  string        `json:"failureMessage,omitempty"`

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

func New

func New(db *datastore.Datastore) *Payout

func (*Payout) Cancel

func (p *Payout) Cancel() error

Cancel transitions payout to canceled.

func (*Payout) Defaults

func (p *Payout) Defaults()

func (*Payout) Load

func (p *Payout) Load(ps []datastore.Property) (err error)

func (*Payout) MarkFailed

func (p *Payout) MarkFailed(code, message string) error

MarkFailed transitions payout to failed.

func (*Payout) MarkInTransit

func (p *Payout) MarkInTransit() error

MarkInTransit transitions payout to in-transit.

func (*Payout) MarkPaid

func (p *Payout) MarkPaid() error

MarkPaid transitions payout to paid.

func (*Payout) Save

func (p *Payout) Save() (ps []datastore.Property, err error)

func (*Payout) Validator

func (p *Payout) Validator() *val.Validator

type Status

type Status string

Status represents the payout lifecycle state.

const (
	Pending   Status = "pending"
	InTransit Status = "in_transit"
	Failed    Status = "failed"
	Canceled  Status = "canceled"
)

Jump to

Keyboard shortcuts

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