Versions in this module Expand all Collapse all v0 v0.1.0 Nov 15, 2026 Changes in this version + const DefaultLogBodyBytes + const DefaultMaxRetries + const DefaultRetryWaitMax + const DefaultRetryWaitMin + const DefaultTimeout + const DefaultUserAgent + const EnvBaseURL + const EnvBusinessID + const EnvEnvironment + const EnvMaxRetries + const EnvPublicKey + const EnvSecretKey + const EnvTimeout + const EnvWebhookSecret + const LiveBaseURL + const SandboxBaseURL + const Version + const WebhookSignatureHeader + var ErrInvalidParameter = api.ErrInvalidParameter + var ErrMissingRequiredParameter = api.ErrMissingRequiredParameter + func DefaultMaskedHeaders() []string + func DefaultMaskedJSONFields() []string + func DefaultMaskedQueryParams() []string + func SignWebhookPayload(secret string, payload []byte) string + func VerifyWebhookSignature(secret string, payload []byte, signature string) bool + type APIError struct + Body []byte + Details json.RawMessage + Err error + ErrorType string + Message string + Method string + Path string + RequestID string + Retryable bool + StatusCode int + func IsAPIError(err error) (*APIError, bool) + func (e *APIError) Error() string + func (e *APIError) IsForbidden() bool + func (e *APIError) IsNotFound() bool + func (e *APIError) IsRateLimited() bool + func (e *APIError) IsServerError() bool + func (e *APIError) IsUnauthorized() bool + func (e *APIError) Unwrap() error + type Client struct + Account *account.Service + Balances *balances.Service + Beneficiaries *beneficiaries.Service + Checkout *checkout.Service + Collections *collections.Service + Conversions *conversions.Service + DirectCharge *directcharge.Service + HTTPClient HTTPClient + Mandates *mandates.Service + Payouts *payouts.Service + VirtualAccounts *virtualaccounts.Service + func New(opts ...Option) (*Client, error) + func NewWithConfig(cfg *Config, opts ...Option) (*Client, error) + func (c *Client) BaseURL() string + func (c *Client) BusinessID() string + func (c *Client) Config() Config + func (c *Client) VerifyWebhookSignature(payload []byte, signature string) bool + type Config struct + BaseURL string + BusinessID string + Environment Environment + HTTPClient *http.Client + Log LogConfig + MaxRetries int + PublicKey string + RetryWaitMax time.Duration + RetryWaitMin time.Duration + SecretKey string + Timeout time.Duration + UserAgent string + WebhookSecret string + func ConfigFromEnv() (*Config, error) + func DefaultConfig() *Config + func (c *Config) ApplyEnv() error + func (c *Config) Clone() *Config + func (c *Config) ResolveBaseURL() string + func (c *Config) Validate() error + func (c Config) String() string + type ConfigError struct + Field string + Reason string + Value string + func (e *ConfigError) Error() string + type Environment string + const EnvironmentLive + const EnvironmentSandbox + func ParseEnvironment(s string) (Environment, error) + func (e Environment) BaseURL() string + func (e Environment) String() string + type HTTPClient = api.Backend + type LogConfig struct + Depth LogDepth + Level slog.Level + Logger *slog.Logger + MaskHeaders []string + MaskJSONFields []string + MaskQueryParams []string + MaxBodyBytes int + func (l LogConfig) Clone() LogConfig + type LogDepth int + const LogDepthBasic + const LogDepthBody + const LogDepthHeaders + const LogDepthNone + func (d LogDepth) String() string + type Option func(*Config) error + func WithBaseURL(baseURL string) Option + func WithBusinessID(id string) Option + func WithEnvironment(env Environment) Option + func WithEnvironmentName(name string) Option + func WithHTTPClient(client *http.Client) Option + func WithLogBodyLimit(bytes int) Option + func WithLogConfig(logConfig LogConfig) Option + func WithLogDepth(depth LogDepth) Option + func WithLogLevel(level slog.Level) Option + func WithLogMaskHeaders(headers ...string) Option + func WithLogMaskJSONFields(fields ...string) Option + func WithLogMaskQueryParams(params ...string) Option + func WithLogger(logger *slog.Logger) Option + func WithMaxRetries(n int) Option + func WithPublicKey(key string) Option + func WithRetryWait(min, max time.Duration) Option + func WithSecretKey(key string) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(userAgent string) Option + func WithWebhookSecret(secret string) Option + type RequestOption = func(*http.Request) + func WithRequestHeader(key, value string) RequestOption