Versions in this module Expand all Collapse all v0 v0.1.0 Aug 6, 2026 Changes in this version + var ErrInvalidCallback = errors.New("plisio: invalid callback verify_hash") + type APIError struct + Code int + HTTPStatus int + Message string + Name string + func (e *APIError) Error() string + type Balance struct + Balance Number + Currency CryptoCurrency + LockedBalance Number + type Callback struct + Amount Number + Confirmations Number + Currency string + InvoiceTotalSum Number + OrderName string + OrderNumber string + SourceAmount Number + SourceCurrency string + Status OperationStatus + TxnID string + VerifyHash string + type Client struct + func NewClient(apiKey string, opts ...ClientOption) *Client + func (c *Client) CreateInvoice(ctx context.Context, opts ...InvoiceOption) (*Invoice, error) + func (c *Client) GetBalance(ctx context.Context, currency CryptoCurrency) (*Balance, error) + func (c *Client) GetCommission(ctx context.Context, currency CryptoCurrency, opts ...CommissionOption) (*Commission, error) + func (c *Client) GetCurrencies(ctx context.Context, fiat ...FiatCurrency) ([]Currency, error) + func (c *Client) GetFee(ctx context.Context, currency CryptoCurrency, addresses []string, ...) (*Fee, error) + func (c *Client) GetFeePlan(ctx context.Context, currency CryptoCurrency) (json.RawMessage, error) + func (c *Client) GetOperation(ctx context.Context, id string) (*Operation, error) + func (c *Client) GetOperations(ctx context.Context, opts ...OperationsOption) (*Operations, error) + func (c *Client) ParseCallback(body []byte) (*Callback, error) + func (c *Client) ValidateCallback(body []byte) bool + func (c *Client) Withdraw(ctx context.Context, currency CryptoCurrency, opts ...WithdrawOption) (*Withdraw, error) + type ClientOption func(*Client) + func WithBaseURL(u string) ClientOption + func WithHTTPClient(hc *http.Client) ClientOption + func WithTimeout(d time.Duration) ClientOption + func WithUserAgent(ua string) ClientOption + type Commission struct + Commission Number + Custom CustomRange + CustomFeeRate Number + Errors Number + Fee Number + MaxAmount Number + Plan PlanName + UseWallet Number + UseWalletBalance Number + type CommissionOption func(*commissionParams) + func WithCommissionAddresses(addrs ...string) CommissionOption + func WithCommissionAmounts(amounts ...float64) CommissionOption + func WithCommissionFeePlan(n PlanName) CommissionOption + func WithCommissionType(t OperationType) CommissionOption + func WithCustomFeeRate(rate int) CommissionOption + type CryptoCurrency string + const BCH + const BNB + const BTC + const BTT_TRX + const BUSD + const DASH + const DOGE + const ETC + const ETH + const LTC + const SHIB + const TRX + const TUSD + const TZEC + const USDC + const USDT + const USDT_BSC + const USDT_TRX + const XMR + const ZEC + type Currency struct + Currency CryptoCurrency + Fiat FiatCurrency + FiatRate Number + Hidden Number + Icon string + InvoiceCommissionPercentage Number + Maintenance bool + MinSumIn Number + Name string + Precision Number + PriceUSD Number + RateUSD Number + func (c *Currency) UnmarshalJSON(b []byte) error + type CustomRange struct + Borders Number + Default Number + Max Number + Min Number + Unit string + type Fee struct + Currency CryptoCurrency + Fee Number + Plan PlanName + type FiatCurrency string + const AUD + const EUR + const USD + type Invoice struct + Amount Number + Currency string + ExpectedConfirmations string + ExpireUtc string + InvoiceCommission Number + InvoiceSum Number + InvoiceTotalSum Number + InvoiceURL string + PendingAmount Number + PsysCid string + QrCode string + SourceCurrency string + SourceRate string + Status string + TxnID string + VerifyHash string + WalletHash string + type InvoiceOption func(*invoiceParams) + func WithAllowedCurrencies(cc ...CryptoCurrency) InvoiceOption + func WithAmount(f float64) InvoiceOption + func WithCallbackURL(s string) InvoiceOption + func WithCurrency(c CryptoCurrency) InvoiceOption + func WithDescription(s string) InvoiceOption + func WithEmail(s string) InvoiceOption + func WithExpireMin(n int) InvoiceOption + func WithFailCallbackURL(s string) InvoiceOption + func WithFailInvoiceURL(s string) InvoiceOption + func WithLanguage(s string) InvoiceOption + func WithOrderName(s string) InvoiceOption + func WithOrderNumber(n int) InvoiceOption + func WithPlugin(s string) InvoiceOption + func WithRedirectToInvoice(b bool) InvoiceOption + func WithReturnExisting(b bool) InvoiceOption + func WithSourceAmount(f float64, fiat FiatCurrency) InvoiceOption + func WithSuccessCallbackURL(s string) InvoiceOption + func WithSuccessInvoiceURL(s string) InvoiceOption + func WithVersion(s string) InvoiceOption + type Number struct + func (n *Number) UnmarshalJSON(b []byte) error + func (n Number) Float64() (float64, error) + func (n Number) Int64() (int64, error) + func (n Number) IsNull() bool + func (n Number) MarshalJSON() ([]byte, error) + func (n Number) String() string + type Operation struct + ActualCommission Number + ActualFee Number + ActualInvoiceSum Number + ActualSum Number + Amount Number + ChildIDs []string + Commission Number + Confirmations Number + CreatedAtUTC Number + Currency CryptoCurrency + ExpireAtUTC Number + Fee Number + ID string + Params OperationParams + ParentID string + PendingSum Number + SendMany map[string]Number + ShopID string + SourceCurrency FiatCurrency + SourceRate Number + Status OperationStatus + StatusCode Number + Sum Number + Tx []OperationTx + TxID []string + TxURL Strings + Type OperationType + UserID Number + WalletHash string + type OperationParams struct + Amount Number + Currency CryptoCurrency + Email string + OrderName string + OrderNumber string + SourceAmount Number + SourceCurrency FiatCurrency + SourceRate Number + USDRate Number + type OperationStatus string + const StatusCancelled + const StatusCancelledDuplicate + const StatusCompleted + const StatusError + const StatusExpired + const StatusMismatch + const StatusNew + const StatusPending + const StatusPendingInternal + type OperationTx struct + Block Number + Confirmations Number + FailRetry Number + FeeRate Number + FeeRateUnit string + Processed bool + TxID string + URL string + Value Number + WalletHash []string + type OperationType string + const OpCashIn + const OpCashOut + const OpInvoice + const OpMassCashOut + const OpPayIn + type Operations struct + Links map[string]map[string]string + Meta map[string]Number + Operations []Operation + type OperationsOption func(*operationsParams) + func WithLimit(n int) OperationsOption + func WithOperationCurrency(c CryptoCurrency) OperationsOption + func WithPage(n int) OperationsOption + func WithSearch(s string) OperationsOption + func WithShopID(id string) OperationsOption + func WithStatus(s OperationStatus) OperationsOption + func WithType(t OperationType) OperationsOption + type PlanName string + const PlanCustom + const PlanEconomy + const PlanNormal + const PlanPriority + type Strings []string + func (s *Strings) UnmarshalJSON(b []byte) error + type Withdraw struct + Amount Number + Currency CryptoCurrency + Fee Number + ID string + SendMany map[string]Number + SourceCurrency FiatCurrency + SourceRate Number + Status string + TxID []string + TxURL string + Type OperationType + WalletHash string + type WithdrawOption func(*withdrawParams) + func WithAmounts(amounts ...float64) WithdrawOption + func WithFeePlan(n PlanName) WithdrawOption + func WithFeeRate(f float64) WithdrawOption + func WithTo(addrs ...string) WithdrawOption + func WithWithdrawType(t OperationType) WithdrawOption