Versions in this module Expand all Collapse all v0 v0.1.0 Oct 27, 2026 Changes in this version + const DefaultBaseURL + const Version + func VerifyWebhook(rawBody []byte, timestamp, signature, secret string) bool + type APIError struct + Body []byte + ErrorCode string + Errors map[string][]string + Message string + StatusCode int + func (e *APIError) Error() string + type CancelResult struct + Message string + Status string + TrxID string + type Client struct + Fees *FeesService + PaymentChannels *PaymentChannelsService + PaymentInstructions *PaymentInstructionsService + PaymentLinks *PaymentLinksService + Transactions *TransactionsService + Wallet *WalletService + func NewClient(apiKey string, opts ...Option) (*Client, error) + type CreatePaymentLinkInput struct + Amount int64 + CustomerEmail string + CustomerName string + Description string + ExpiresInMinutes *int + IsSingleUse *bool + OrderItems []OrderItem + ReturnURL string + Title string + type CreateTransactionInput struct + Amount int64 + ChannelCode string + CustomerEmail string + CustomerName string + CustomerPhone string + OrderItems []OrderItem + ReferenceID string + ReturnURL string + type CreatedTransaction struct + Amount string + PayURL string + PaymentInfo PaymentInfo + ReferenceID string + SandboxMode *bool + SandboxNotice *string + Status string + TrxID string + type FeeEstimate struct + Code string + Fee struct{ ... } + FeeMode string + Flow string + Group string + Limits struct{ ... } + Name string + TotalFee struct{ ... } + Type string + type FeesService struct + func (s *FeesService) Calculate(ctx context.Context, amount int64, code string, opts ...RequestOption) ([]FeeEstimate, error) + type InstructionOptions struct + AllowHTML *bool + Amount *int64 + PayCode string + type ListTransactionsParams struct + ChannelCode string + DateFrom string + DateTo string + IsSandbox *bool + Page *int + PerPage *int + ReferenceID string + SortBy string + SortOrder string + Status string + type NetworkError struct + Err error + func (e *NetworkError) Error() string + func (e *NetworkError) Unwrap() error + type Option func(*Client) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(client *http.Client) Option + func WithTimeout(timeout time.Duration) Option + func WithUserAgent(userAgent string) Option + type OrderItem struct + Name string + Quantity int + type Pagination struct + CurrentPage int + HasMore bool + PerPage int + Total int + TotalPages int + type PaymentChannel struct + Code string + FeeFlat float64 + FeeMode string + FeePercent float64 + FlowType string + Group *string + Icon *string + MaxAmount *int64 + MinAmount *int64 + Name string + Type string + type PaymentChannelSummary struct + Code string + Name string + Type string + type PaymentChannelsService struct + func (s *PaymentChannelsService) List(ctx context.Context, opts ...RequestOption) ([]PaymentChannel, error) + type PaymentInfo struct + Bank *string + CheckoutURL *string + CheckoutURLApp *string + ExpirationDate *string + MerchantName *string + PaymentActions []map[string]any + PaymentCode *string + QRString *string + QRURL *string + Sandbox *bool + SimulatorURL *string + Store *string + TransactionID *string + TransactionStatus *string + VANumber *string + type PaymentInstruction struct + Steps []string + Title string + type PaymentInstructionsService struct + func (s *PaymentInstructionsService) Get(ctx context.Context, code string, options InstructionOptions, ...) ([]PaymentInstruction, error) + type PaymentLink struct + Amount float64 + CreatedAt string + CustomerEmail string + CustomerName string + Description *string + ExpiresAt string + ExpiresInMinutes *int + IsSingleUse bool + Items []OrderItem + LinkID string + PaymentURL string + ReturnURL *string + Status string + Title string + type PaymentLinkDetail struct + Tersedia bool + Transaksi ... + type PaymentLinksService struct + func (s *PaymentLinksService) Create(ctx context.Context, input CreatePaymentLinkInput, opts ...RequestOption) (*PaymentLink, error) + func (s *PaymentLinksService) Get(ctx context.Context, linkID string, opts ...RequestOption) (*PaymentLinkDetail, error) + type PendingBalance struct + ClearingDays int + Currency string + Formatted string + Note string + PendingBalance string + type RefundResult struct + MerchantRefundNo string + Message string + RefundAmount float64 + Status string + TrxID string + type RequestOption func(*requestConfig) + func WithIdempotencyKey(key string) RequestOption + type ResponseError struct + Body []byte + StatusCode int + func (e *ResponseError) Error() string + type Transaction struct + Amount string + AmountReceived string + CreatedAt string + CustomerEmail string + CustomerName string + CustomerPhone *string + IsSandbox bool + OrderItems []OrderItem + PaidAt *string + PayURL string + PaymentChannel *PaymentChannelSummary + ReferenceID string + Status string + TotalFee string + TrxID string + UpdatedAt string + type TransactionList struct + Data []Transaction + Pagination Pagination + type TransactionsService struct + func (s *TransactionsService) Cancel(ctx context.Context, trxID string, opts ...RequestOption) (*CancelResult, error) + func (s *TransactionsService) Create(ctx context.Context, input CreateTransactionInput, opts ...RequestOption) (*CreatedTransaction, error) + func (s *TransactionsService) Get(ctx context.Context, orderID string, opts ...RequestOption) (*Transaction, error) + func (s *TransactionsService) List(ctx context.Context, params ListTransactionsParams, opts ...RequestOption) (*TransactionList, error) + func (s *TransactionsService) Refund(ctx context.Context, trxID string, refundAmount int64, reason string, ...) (*RefundResult, error) + type WalletBalance struct + Balance string + Currency string + Formatted string + type WalletService struct + func (s *WalletService) Balance(ctx context.Context, opts ...RequestOption) (*WalletBalance, error) + func (s *WalletService) PendingBalance(ctx context.Context, opts ...RequestOption) (*PendingBalance, error)