Versions in this module Expand all Collapse all v1 v1.0.0 Jun 7, 2026 Changes in this version + const DefaultBaseURL + const DefaultTolerance + const SignatureHeader + var ErrInvalidSignature = errors.New("wire: webhook signature verification failed") + type Charge struct + Amount int64 + AmountRefunded int64 + Created int64 + FailureCode *string + FailureMessage *string + Fee int64 + ID string + Livemode bool + Object string + Operator string + OperatorChargeID *string + PaymentIntent string + Status string + type ChargeService struct + func (s *ChargeService) List(ctx context.Context, p *ListParams) *Iter[Charge] + func (s *ChargeService) Retrieve(ctx context.Context, id string) (*Charge, error) + type Client struct + Charges *ChargeService + Events *EventService + PaymentIntents *PaymentIntentService + WebhookEndpoints *WebhookEndpointService + Webhooks *WebhooksService + func NewClient(apiKey string, opts ...Option) *Client + type Deleted struct + Deleted bool + ID string + Object string + type Error struct + Code string + DocURL string + Message string + OperatorDeclineCode string + Param string + RequestID string + StatusCode int + Type string + func (e *Error) Error() string + type Event struct + APIVersion string + Created int64 + Data json.RawMessage + ID string + Livemode bool + Object string + Type string + type EventService struct + func (s *EventService) List(ctx context.Context, p *ListParams) *Iter[Event] + func (s *EventService) Retrieve(ctx context.Context, id string) (*Event, error) + type Iter struct + func (it *Iter[T]) Current() T + func (it *Iter[T]) Err() error + func (it *Iter[T]) Next() bool + type List struct + Data []T + HasMore bool + Object string + type ListParams struct + EndingBefore string + Limit int + StartingAfter string + type Option func(*Client) + func WithBackoff(d time.Duration) Option + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxRetries(n int) Option + func WithTimeout(d time.Duration) Option + type PaymentIntent struct + AllowedOperators []string + Amount int64 + AutomaticOperator bool + ClientSecret string + Created int64 + Currency string + ExpiresAt *int64 + ID string + Livemode bool + Metadata map[string]string + NextAction json.RawMessage + Object string + SelectedOperator *string + Status string + type PaymentIntentConfirmParams struct + IdempotencyKey string + ReturnURL string + type PaymentIntentCreateParams struct + AllowedOperators []string + Amount int64 + AutomaticOperator *bool + Currency string + IdempotencyKey string + Metadata map[string]string + type PaymentIntentService struct + func (s *PaymentIntentService) Cancel(ctx context.Context, id string) (*PaymentIntent, error) + func (s *PaymentIntentService) Confirm(ctx context.Context, id string, p *PaymentIntentConfirmParams) (*PaymentIntent, error) + func (s *PaymentIntentService) Create(ctx context.Context, p *PaymentIntentCreateParams) (*PaymentIntent, error) + func (s *PaymentIntentService) List(ctx context.Context, p *ListParams) *Iter[PaymentIntent] + func (s *PaymentIntentService) Retrieve(ctx context.Context, id string) (*PaymentIntent, error) + type WebhookEndpoint struct + Created int64 + EnabledEvents []string + ID string + Livemode bool + Object string + Secret string + Status string + URL string + type WebhookEndpointCreateParams struct + EnabledEvents []string + IdempotencyKey string + URL string + type WebhookEndpointService struct + func (s *WebhookEndpointService) Create(ctx context.Context, p *WebhookEndpointCreateParams) (*WebhookEndpoint, error) + func (s *WebhookEndpointService) Delete(ctx context.Context, id string) (*Deleted, error) + func (s *WebhookEndpointService) List(ctx context.Context, p *ListParams) *Iter[WebhookEndpoint] + func (s *WebhookEndpointService) Retrieve(ctx context.Context, id string) (*WebhookEndpoint, error) + func (s *WebhookEndpointService) Update(ctx context.Context, id string, p *WebhookEndpointUpdateParams) (*WebhookEndpoint, error) + type WebhookEndpointUpdateParams struct + EnabledEvents []string + IdempotencyKey string + Status *string + URL *string + type WebhooksService struct + func (s *WebhooksService) Verify(payload []byte, header, secret string) (*Event, error) + func (s *WebhooksService) VerifyWithTolerance(payload []byte, header, secret string, tolerance time.Duration) (*Event, error)