Versions in this module Expand all Collapse all v0 v0.1.0 Jun 24, 2026 Changes in this version + type Charger interface + CreateSubscription func(ctx context.Context, customer, plan string, meta map[string]string) (string, error) + type Plan struct + CreatedAt string + Currency string + Features string + ID string + Interval string + Name string + Price float64 + type Service struct + func (s *Service) Cancel(ctx context.Context, id string) error + func (s *Service) Change(ctx context.Context, id, planID string) error + func (s *Service) CreatePlan(ctx context.Context, p Plan) (*Plan, error) + func (s *Service) ListPlans(ctx context.Context) ([]Plan, error) + func (s *Service) ListSubscriptions(ctx context.Context, userID string) ([]Subscription, error) + func (s *Service) Subscribe(ctx context.Context, userID, planID string, trialDays int) (*Subscription, error) + type Subscription struct + CanceledAt string + CreatedAt string + CurrentPeriodEnd string + ID string + PlanID string + ProviderRef string + Status string + TrialEndsAt string + UserID string