Versions in this module Expand all Collapse all v0 v0.0.13 Nov 7, 2026 Changes in this version + var ErrPending = errors.New("purchases: waiting for approval") + func Consume(ctx context.Context, r Receipt) error + func Finish(ctx context.Context, r Receipt) error + type Cashier struct + Key string + URL string + User string + func (c Cashier) Customer(ctx context.Context) (Customer, error) + func (c Cashier) Deliver(ctx context.Context, r Receipt) (Customer, error) + func (c Cashier) Sync(ctx context.Context, receipts ...Receipt) (Customer, error) + type CashierError struct + Code string + Message string + Status int + func (e *CashierError) Error() string + type Customer struct + Entitlements []string + Expires time.Time + Products []string + User string + func (c Customer) Entitled(id string) bool + type Product struct + Amount float64 + Currency string + Description string + ID string + Period string + Price string + Title string + func Products(ctx context.Context, ids ...string) ([]Product, error) + type Receipt struct + Finished bool + ID string + Platform string + ProductID string + RenewalInfo string + Token string + func Buy(ctx context.Context, id string) (Receipt, error) + func Owned(ctx context.Context) ([]Receipt, error) + func Restore(ctx context.Context) ([]Receipt, error)