Versions in this module Expand all Collapse all v0 v0.1.3 Feb 22, 2026 v0.1.2 Feb 22, 2026 v0.1.0 Feb 21, 2026 Changes in this version + const DefaultBaseURL + const DefaultTimeout + const Version + type APIConnectionError struct + func NewAPIConnectionError(p ErrorParams) *APIConnectionError + func (e *APIConnectionError) Unwrap() error + type APIError struct + func NewAPIError(p ErrorParams) *APIError + func (e *APIError) Unwrap() error + type AuthenticationError struct + func NewAuthenticationError(p ErrorParams) *AuthenticationError + func (e *AuthenticationError) Unwrap() error + type CancelOptions struct + CancelNow bool + type Client struct + Subscription *SubscriptionService + func NewClient(apiKey string, opts ...Option) (*Client, error) + func (c *Client) Close() + type ErrorParams struct + Code string + HTTPBody string + HTTPStatus int + Headers map[string]string + JSONBody map[string]any + Message string + type InvalidRequestError struct + func NewInvalidRequestError(p ErrorParams) *InvalidRequestError + func (e *InvalidRequestError) Unwrap() error + type ListOptions struct + Page int + PageSize int + type NotFoundError struct + func NewNotFoundError(p ErrorParams) *NotFoundError + func (e *NotFoundError) Unwrap() error + type Option func(*clientConfig) + func WithBaseURL(url string) Option + func WithHTTPClient(client *http.Client) Option + func WithTimeout(timeout time.Duration) Option + type PaginatedList struct + Items []T + Page int + PageSize int + Total int + TotalPages int + func (p *PaginatedList[T]) HasMore() bool + type PaylioError struct + Code string + HTTPBody string + HTTPStatus int + Headers map[string]string + JSONBody map[string]any + Message string + func (e *PaylioError) Error() string + type Period struct + End string + Start string + type Plan struct + Amount float64 + Currency string + Interval string + Name string + Slug string + type RateLimitError struct + func NewRateLimitError(p ErrorParams) *RateLimitError + func (e *RateLimitError) Unwrap() error + type Subscription struct + CancelAtPeriodEnd bool + CanceledAt *string + CreatedAt string + ID string + Object string + Plan Plan + Provider string + Status string + SubscriptionPeriod Period + UserID string + type SubscriptionCancel struct + CancelAtPeriodEnd bool + ID string + Object string + Success bool + type SubscriptionHistoryItem struct + CreatedAt string + CurrentPeriodEnd string + CurrentPeriodStart string + ID string + PlanAmount float64 + PlanCurrency string + PlanInterval string + PlanName string + PlanSlug string + Status string + UserID string + type SubscriptionService struct + func (s *SubscriptionService) Cancel(ctx context.Context, subscriptionID string, opts *CancelOptions) (*SubscriptionCancel, error) + func (s *SubscriptionService) List(ctx context.Context, userID string, opts *ListOptions) (*PaginatedList[SubscriptionHistoryItem], error) + func (s *SubscriptionService) Retrieve(ctx context.Context, userID string) (*Subscription, error)