transfer

package
v1.49.64 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 5 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

Overview

Package transfer records that a payable was PAID — the annotation a human writes after paying out-of-band. Commerce executes no payout; a Transfer is a fact about one that already happened.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Transfer

type Transfer struct {
	mixin.Model[Transfer]

	// FeeId is the payable this settles; PayeeId is who was paid.
	FeeId   string `json:"feeId"`
	PayeeId string `json:"payeeId,omitempty"`

	// Settles is how much of the payable this clears, in the payable's asset.
	// Sent is what actually left, in whatever asset it left in — the two differ
	// when a dollar-denominated payable is paid in ETH.
	Settles currency.Money `json:"settles"`
	Sent    currency.Money `json:"sent,omitempty"`

	// (Type, Reference) names one real-world payment, so recording it twice
	// settles once.
	Type      Type      `json:"type"`
	Reference string    `json:"reference,omitempty"`
	PaidAt    time.Time `json:"paidAt,omitempty"`
	Actor     string    `json:"actor,omitempty"`
	Note      string    `json:"note,omitempty"`
}

Transfer is one payment against one payable.

func New

func New(db *datastore.Datastore) *Transfer

type Type

type Type string

Type is HOW it was paid. The three are one shape — method, reference, money, when, who — so nothing branches on which one it is. Anything a method needs that the others do not goes in Reference.

const (
	ETH   Type = "eth"   // on-chain; Reference is the tx hash
	Wire  Type = "wire"  // bank wire; Reference is the wire/confirmation ref
	Other Type = "other" // anything else; Reference describes it
)

Jump to

Keyboard shortcuts

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