refund

package
v1.49.30 Latest Latest
Warning

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

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

type Refund struct {
	mixin.Model[Refund]

	Amount          int64                  `json:"amount"`
	Currency        currency.Type          `json:"currency"`
	Status          Status                 `json:"status"`
	ProviderRef     string                 `json:"providerRef"`
	Reason          string                 `json:"reason,omitempty"`
	ReceiptNumber   string                 `json:"receiptNumber,omitempty"`
	FailureReason   string                 `json:"failureReason,omitempty"`
	PaymentIntentId string                 `json:"paymentIntentId,omitempty"`
	InvoiceId       string                 `json:"invoiceId,omitempty"`
	Metadata        map[string]interface{} `json:"metadata,omitempty"`
}

Refund represents a reversal of a previous payment.

func New

func New(db *datastore.Datastore) *Refund

func (*Refund) Defaults

func (r *Refund) Defaults()

func (*Refund) MarkFailed

func (r *Refund) MarkFailed(reason string) error

MarkFailed transitions the refund to Failed with a reason.

func (*Refund) MarkSucceeded

func (r *Refund) MarkSucceeded() error

MarkSucceeded transitions the refund to Succeeded.

type Status

type Status string

Status represents the state of a refund.

const (
	Pending   Status = "pending"
	Succeeded Status = "succeeded"
	Failed    Status = "failed"
	Canceled  Status = "canceled"
)

Jump to

Keyboard shortcuts

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