Versions in this module Expand all Collapse all v1 v1.1.0 Sep 14, 2026 Changes in this version + const ErrCodeAuthentication + const ErrCodeCommunication + const ErrCodeEncryption + const ErrCodeInvalidCashMethod + const ErrCodeInvalidConfig + const ErrCodeInvalidData + const ErrCodeInvalidPublicKey + const ErrCodeNoCommunication + const ErrCodeUnknown + const ErrCodeUnsupportedMethod + func VerifySignature(pCustIDCliente, pKey string, payload WebhookPayload) bool + type AddTokenParams struct + CardToken string + CustomerID string + type Bank struct + Code string + Name string + func (b *Bank) UnmarshalJSON(data []byte) error + type CardToken struct + Card struct{ ... } + Data struct{ ... } + ID string + Object string + Status bool + Success bool + Type string + type CashEntity struct + ID string + Name string + type CashService struct + func (s *CashService) Create(ctx context.Context, params CreateCashParams) (*CashTransaction, error) + func (s *CashService) ListEntities(ctx context.Context) ([]CashEntity, error) + type CashTransaction struct + Address string + Authorization string + Bank string + City string + CodeProject int + ConversionFactor float64 + Currency string + Date string + Description string + DocType string + Document string + Email string + ErrorCode string + ExpirationDate string + Franchise string + IP string + Ico float64 + Invoice string + LastName string + Name string + PaymentDate string + Pesos float64 + Pin string + Receipt string + RefPayco int + Response string + ResponseCode int + Status string + Tax float64 + TaxBase float64 + TestMode int + Total float64 + Value float64 + func (c *CashTransaction) UnmarshalJSON(data []byte) error + type ChargeService struct + func (s *ChargeService) Create(ctx context.Context, params CreateChargeParams) (*ChargeTransaction, error) + func (s *ChargeService) Get(ctx context.Context, referencePayco string) (*TransactionDetail, error) + type ChargeSubscriptionParams struct + Customer string + DocNumber string + DocType string + IDPlan string + IP string + TokenCard string + type ChargeTransaction struct + Address string + Authorization string + Bank string + CardTokenID string + City string + Currency string + CustomerID string + Date string + Description string + DocType string + Document string + Email string + ErrorCode string + Franchise string + IP string + Ico float64 + Invoice string + LastName string + Name string + NetValue float64 + NetworkResponse NetworkResponse + Receipt string + RefPayco int + Response string + ResponseCode int + State string + Tax float64 + TaxBase float64 + Value float64 + type Client struct + Cash *CashService + Charges *ChargeService + Customers *CustomerService + Daviplata *DaviplataService + PSE *PSEService + Plans *PlanService + Safetypay *SafetypayService + Standard *StandardService + Subscriptions *SubscriptionService + Tokens *TokenService + func New(apiKey, privateKey string, opts ...Option) (*Client, error) + type ConfirmDaviplataParams struct + IDSessionToken string + OTP string + RefPayco string + type ConfirmPSEParams struct + TransactionID int64 + type ConfirmStandardParams struct + AuthorizationCode string + Channel string + CurrentStatusTransaction string + RefEpayco string + StatusTransaction string + Value string + type CreateCardParams struct + CardCVC string + CardExpMonth string + CardExpYear string + CardNumber string + type CreateCashParams struct + CellPhone string + Currency string + Description string + DocNumber string + DocType string + Email string + EndDate string + IP string + Invoice string + LastName string + MethodConfirmation string + Name string + PaymentMethod string + Tax string + TaxBase string + TypePerson string + URLConfirmation string + URLResponse string + Value string + type CreateChargeParams struct + Address string + CardCVC string + CardExpMonth string + CardExpYear string + CardNumber string + CardTokenID string + CellPhone string + City string + Country string + Currency string + CustomerID string + Description string + DocNumber string + DocType string + Dues string + Email string + IP string + Invoice string + LastName string + MethodConfirmation string + Name string + Phone string + Tax string + TaxBase string + TypePerson string + URLConfirmation string + URLResponse string + Value string + type CreateDaviplataParams struct + Address string + City string + Country string + Currency string + Description string + DocType string + Document string + Email string + IP string + IndCountry string + Invoice string + LastName string + MethodConfirmation string + Name string + Phone string + Tax string + TaxBase string + URLConfirmation string + URLResponse string + Value string + type CreatePSEParams struct + Bank string + CellPhone string + DocNumber string + DocType string + Email string + IP string + LastName string + Name string + URLConfirmation string + URLResponse string + Value string + type CreateParams struct + Address string + CardTokenID string + CellPhone string + City string + DocNumber string + DocType string + Email string + LastName string + Name string + Phone string + RequireCardToken bool + type CreatePlanParams struct + AdditionalChargePercentage float64 + Amount float64 + Currency string + Description string + DiscountPercentage float64 + DiscountValue float64 + FirstPaymentAdditionalCost float64 + GreetMessage string + IDPlan string + Ico float64 + ImgURL string + Interval string + IntervalCount int + LinkExpirationDate string + Name string + PlanLink string + SubscriptionLimit int + Tax float64 + TransactionalLimit int + TrialDays int + type CreateSafetypayParams struct + Address string + Cash string + City string + Country string + Currency string + Description string + DocType string + Document string + Email string + ExpirationDate string + IP string + Ico string + IndCountry string + LastName string + MethodConfirmation string + Name string + Phone string + Tax string + TaxBase string + URLConfirmation string + URLResponse string + Value string + type CreateStandardParams struct + Address string + CellPhone string + Channel string + City string + Description string + DocNumber string + DocType string + Email string + Extra1 string + Extra2 string + Extra3 string + Extra4 string + IP string + Invoice string + LastName string + MethodConfimation string + Name string + Phone string + URLConfirmation string + URLResponse string + Value string + type CreateSubscriptionParams struct + Customer string + DocNumber string + DocType string + IDPlan string + MethodConfirmation string + TokenCard string + URLConfirmation string + type Customer struct + Data struct{ ... } + Object string + Status bool + Success bool + Type string + type CustomerCard struct + Created string + Default bool + Franchise string + Mask string + Token string + type CustomerDetail struct + Cards []CustomerCard + Created string + DocNumber string + DocType string + Email string + ID string + Name string + type CustomerService struct + func (s *CustomerService) AddToken(ctx context.Context, params AddTokenParams) error + func (s *CustomerService) Create(ctx context.Context, params CreateParams) (*Customer, error) + func (s *CustomerService) DeleteToken(ctx context.Context, params DeleteTokenParams) error + func (s *CustomerService) Get(ctx context.Context, customerID string) (*CustomerDetail, error) + func (s *CustomerService) List(ctx context.Context) ([]CustomerSummary, error) + func (s *CustomerService) SetDefaultToken(ctx context.Context, params SetDefaultTokenParams) error + func (s *CustomerService) Update(ctx context.Context, params UpdateParams) error + type CustomerSummary struct + Created string + Email string + ID string + Name string + Object string + Phone string + type DaviplataConfirmation struct + Date string + IDTransactionAutorization string + IDTransactionDaviplata int64 + NumApproval string + RefPayco string + Response string + Status string + type DaviplataService struct + func (s *DaviplataService) Confirm(ctx context.Context, params ConfirmDaviplataParams) (*DaviplataConfirmation, error) + func (s *DaviplataService) Create(ctx context.Context, params CreateDaviplataParams) (*DaviplataTransaction, error) + type DaviplataTransaction struct + Address string + Authorization string + Bank string + City string + Currency string + Date string + Description string + DocType string + Document string + Email string + ErrorCode string + Franchise string + IDSessionToken string + IP string + Ico float64 + Invoice string + LastName string + Name string + NetoValue float64 + Receipt string + RefPayco int + Response string + ResponseCode int + Status string + Tax float64 + TaxBase float64 + TestMode int + Value float64 + func (d *DaviplataTransaction) UnmarshalJSON(data []byte) error + type DeleteTokenParams struct + CustomerID string + Franchise string + Mask string + type Error struct + Code int + Err error + HTTPStatus int + Message string + func (e *Error) Error() string + func (e *Error) Unwrap() error + type NetworkResponse struct + Code string + Message string + type Option func(*Client) + func WithApifyBaseURL(url string) Option + func WithBaseURL(url string) Option + func WithHTTPClient(hc *http.Client) Option + func WithLang(lang string) Option + func WithRetries(n int) Option + type PSEConfirmation struct + Address string + Authorization string + Bank string + City string + Currency string + Date string + Description string + DocType string + Document string + Email string + Franchise string + Invoice string + LastNames string + Names string + Receipt string + RefPayco int + Response string + State string + Tax float64 + TaxBase float64 + TicketID int64 + TransactionID string + Value float64 + type PSEService struct + func (s *PSEService) Confirm(ctx context.Context, params ConfirmPSEParams) (*PSEConfirmation, error) + func (s *PSEService) Create(ctx context.Context, params CreatePSEParams) (*PSETransaction, error) + func (s *PSEService) ListBanks(ctx context.Context) ([]Bank, error) + type PSETransaction struct + Authorization string + BankURL string + Currency string + Date string + Description string + Invoice string + Receipt string + RefPayco int + Response string + State string + Tax float64 + TaxBase float64 + TicketID string + TransactionID string + Value float64 + type PlanService struct + func (s *PlanService) Create(ctx context.Context, params CreatePlanParams) (json.RawMessage, error) + func (s *PlanService) Delete(ctx context.Context, id string) (json.RawMessage, error) + func (s *PlanService) Get(ctx context.Context, id string) (json.RawMessage, error) + func (s *PlanService) List(ctx context.Context) (json.RawMessage, error) + func (s *PlanService) Update(ctx context.Context, id string, params UpdatePlanParams) (json.RawMessage, error) + type SafetypayService struct + func (s *SafetypayService) Create(ctx context.Context, params CreateSafetypayParams) (*SafetypayTransaction, error) + type SafetypayTransaction struct + Authorization string + BankURL string + City string + Country string + Currency string + Date string + Description string + ErrorCode string + Ico float64 + Invoice string + Receipt string + RefPayco int + Response string + ResponseCode string + Status string + Tax float64 + TaxBase float64 + TicketID string + TransactionID int64 + Value float64 + func (s *SafetypayTransaction) UnmarshalJSON(data []byte) error + type SetDefaultTokenParams struct + CardToken string + CustomerID string + Franchise string + Mask string + type StandardConfirmation struct + Address string + AuthorizationCode string + Bank string + Channel string + City string + Currency string + DateTime string + Description string + DocNumber string + DocType string + Email string + IP string + Invoice string + LastName string + Name string + Receipt string + RefEpayco int + ResponseCode int + State string + StateMessage string + Tax float64 + TaxBase float64 + Value float64 + type StandardService struct + func (s *StandardService) Confirm(ctx context.Context, params ConfirmStandardParams) (*StandardConfirmation, error) + func (s *StandardService) Create(ctx context.Context, params CreateStandardParams) (*StandardTransaction, error) + type StandardTransaction struct + Address string + AuthorizationCode string + Bank string + Channel string + City string + Currency string + DateTime string + Description string + DocNumber string + DocType string + Email string + IP string + Invoice string + LastName string + Name string + Receipt string + RefEpayco int + ResponseCode int + State string + StateMessage string + Tax string + TaxBase string + URLRedirect string + Value string + type SubscriptionService struct + func (s *SubscriptionService) Cancel(ctx context.Context, id string) (json.RawMessage, error) + func (s *SubscriptionService) Charge(ctx context.Context, params ChargeSubscriptionParams) (json.RawMessage, error) + func (s *SubscriptionService) Create(ctx context.Context, params CreateSubscriptionParams) (json.RawMessage, error) + func (s *SubscriptionService) Get(ctx context.Context, id string) (json.RawMessage, error) + func (s *SubscriptionService) List(ctx context.Context) (json.RawMessage, error) + type TokenService struct + func (s *TokenService) Create(ctx context.Context, params CreateCardParams) (*CardToken, error) + type TransactionDetail struct + Address string + Amount string + AmountCountry string + AmountOk string + Authorization string + Bank string + BaseTax string + CardNumber string + City string + ClientID string + CodTransactionState string + CodeResponse int + Country string + Currency string + Date string + Description string + DocType string + Document string + Email string + ErrorCode string + Franchise string + IP string + Ico int + IndCountry string + Invoice string + LastName string + Name string + NameBusiness string + Phone string + Quotas string + RefPayco int + Response string + ResponseReasonText string + Signature string + Status string + Tax string + TestMode string + TransactionID string + func (t *TransactionDetail) UnmarshalJSON(data []byte) error + type UpdateParams struct + CustomerID string + Name string + type UpdatePlanParams struct + AdditionalChargePercentage float64 + AfterPayment string + Amount float64 + Currency string + Description string + IP string + Ico float64 + Interval string + IntervalCount int + Name string + Tax float64 + TransactionalLimit int + TrialDays int + type WebhookPayload struct + Amount string + AmountBase string + AmountCountry string + AmountOk string + ApprovalCode string + Business string + CurrencyCode string + CustIDCliente string + CustomerAddress string + CustomerCity string + CustomerCountry string + CustomerDocType string + CustomerDocument string + CustomerEmail string + CustomerIP string + CustomerLastname string + CustomerName string + CustomerPhone string + Description string + Extras [10]string + Franchise string + InvoiceID string + RefPayco string + Response string + ResponseReasonText string + Signature string + Tax string + TestRequest string + TransactionDate string + TransactionID string + TransactionState string + func ParseWebhookPayload(r *http.Request) (*WebhookPayload, error)