Versions in this module Expand all Collapse all v1 v1.1.0 Jun 2, 2021 v1.0.0 Apr 22, 2021 Changes in this version + func Bool(v bool) *bool + func Float64(v float64) *float64 + func Int(v int) *int + func Int64(v int64) *int64 + func ParsePayload(payload map[string]string) (interface{}, error) + func String(v string) *string + func ValidatePayload(r *http.Request, publicKey []byte) (map[string]string, error) + type AppliedCoupon struct + Code *string + Discount *float64 + type Checkout struct + CheckoutID *string + ImageURL *string + Title *string + type Client struct + BaseURL *url.URL + Coupons *CouponsService + Modifiers *ModifiersService + OneOffCharges *OneOffChargesService + OrderDetails *OrderDetailsService + PayLink *PayLinkService + Payments *PaymentsService + Plans *PlansService + Prices *PricesService + Products *ProductsService + RefundPayment *RefundPaymentService + UserHistory *UserHistoryService + Users *UsersService + VendorAuthCode *string + VendorID *string + Webhooks *WebhooksService + func NewCheckoutClient(httpClient *http.Client) *Client + func NewClient(vendorID, vendorAuthCode string, httpClient *http.Client) *Client + func NewSandboxCheckoutClient(httpClient *http.Client) *Client + func NewSandboxClient(vendorID, vendorAuthCode string, httpClient *http.Client) *Client + func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error) + func (c *Client) NewRequest(method, urlStr string, options interface{}) (*http.Request, error) + type Coupon struct + AllowedUses *int + Coupon *string + Description *string + DiscountAmount *float64 + DiscountCurrency *string + DiscountType *string + Expires *string + IsRecurring *bool + TimesUsed *int + type CouponCodes struct + CouponCode []string + type CouponCreate struct + AllowedUses int + CouponCode string + CouponPrefix string + CouponType string + Currency string + Description string + DiscountAmount float64 + DiscountType string + Expires string + Group string + NumCoupons int + ProductIds string + Recurring int + type CouponCreateOptions struct + AllowedUses int + CouponCode string + CouponPrefix string + Currency string + Description string + Expires string + Group string + NumCoupons int + ProductIds string + Recurring int + type CouponCreateResponse struct + Response *CouponCodes + Success bool + type CouponDelete struct + CouponCode *string + ProductID *int + type CouponDeleteOptions struct + ProductID int + type CouponDeleteResponse struct + Success bool + type CouponUpdateOptions struct + AllowedUses int + CouponCode string + Currency string + DiscountAmount float64 + Expires string + Group string + NewCouponCode string + NewGroup string + ProductIds string + Recurring int + type CouponUpdateResponse struct + Response ... + Success bool + type CouponsOptions struct + ProductID int + type CouponsResponse struct + Response []*Coupon + Success bool + type CouponsService service + func (s *CouponsService) Create(ctx context.Context, couponType, discountType string, discountAmount float64, ...) (*CouponCodes, *http.Response, error) + func (s *CouponsService) Delete(ctx context.Context, couponCode string, options *CouponDeleteOptions) (bool, *http.Response, error) + func (s *CouponsService) List(ctx context.Context, productID int) ([]*Coupon, *http.Response, error) + func (s *CouponsService) Update(ctx context.Context, options *CouponUpdateOptions) (*int, *http.Response, error) + type Customer struct + Email *string + MarketingConsent *bool + type Error struct + Code int + Message string + type ErrorResponse struct + ErrorField Error + Success bool + type EventData struct + AlertName *string + Attempts *int + CreatedAt *string + Fields *EventField + ID *int + Status *string + UpdatedAt *string + type EventField struct + Amount *string + Currency *string + Email *string + MarketingConsent *int + OrderID *int + type FulfillmentWebhook struct + EventTime *string + PCountry *string + PCoupon *string + PCouponSavings *string + PCurrency *string + PEarnings *string + POrderID *string + PPaddleFee *string + PPrice *string + PProductID *string + PQuantity *string + PSaleGross *string + PTaxAmount *string + PUsedPriceOverride *string + Passthrough *string + Quantity *string + type HighRiskTransactionCreatedAlert struct + AlertID *string + AlertName *string + CaseID *string + CheckoutID *string + CreatedAt *string + CustomerEmailAddress *string + CustomerUserID *string + EventTime *string + MarketingConsent *int + Passthrough *string + ProductID *string + RiskScore *string + Status *string + type HighRiskTransactionUpdatedAlert struct + AlertID *string + AlertName *string + CaseID *string + CheckoutID *string + CreatedAt *string + CustomerEmailAddress *string + CustomerUserID *string + EventTime *string + MarketingConsent *int + OrderID *string + Passthrough *string + ProductID *string + RiskScore *string + type InvoiceOverdueAlert struct + AlertID *string + AlertName *string + Amount *string + BalanceCurrency *string + ContractEndDate *string + ContractID *string + ContractStartDate *string + Country *string + Currency *string + CustomerAddress *string + CustomerCity *string + CustomerCompanyNumber *string + CustomerID *string + CustomerName *string + CustomerState *string + CustomerVatNumber *string + CustomerZipcode *string + DateCreated *string + Earnings *string + Email *string + EventTime *string + Fee *string + InvoicedAt *string + Passthrough *string + PaymentID *string + PaymentMethod *string + PaymentTax *string + ProductAdditionalInformation *string + ProductID *string + ProductName *string + PurchaseOrderNumber *string + SaleGross *string + Status *string + TermDays *string + type InvoicePaidAlert struct + AlertID *string + AlertName *string + Amount *string + BalanceCurrency *string + BalanceEarnings *string + BalanceFee *string + BalanceGross *string + BalanceTax *string + ContractEndDate *string + ContractID *string + ContractStartDate *string + Country *string + Currency *string + CustomerAddress *string + CustomerCity *string + CustomerCompanyNumber *string + CustomerID *string + CustomerName *string + CustomerState *string + CustomerVatNumber *string + CustomerZipcode *string + DateCreated *string + DateReconciled *string + Earnings *string + Email *string + EventTime *string + Fee *string + InvoicedAt *string + Passthrough *string + PaymentID *string + PaymentMethod *string + PaymentTax *string + ProductAdditionalInformation *string + ProductID *string + ProductName *string + PurchaseOrderNumber *string + SaleGross *string + Status *string + TermDays *string + type InvoiceSentAlert struct + AlertID *string + AlertName *string + Amount *string + BalanceCurrency *string + ContractEndDate *string + ContractID *string + ContractStartDate *string + Country *string + Currency *string + CustomerAddress *string + CustomerCity *string + CustomerCompanyNumber *string + CustomerID *string + CustomerName *string + CustomerState *string + CustomerVatNumber *string + CustomerZipcode *string + DateCreated *string + Earnings *string + Email *string + EventTime *string + Fee *string + InvoicedAt *string + Passthrough *string + PaymentID *string + PaymentMethod *string + PaymentTax *string + ProductAdditionalInformation *string + ProductID *string + ProductName *string + PurchaseOrderNumber *string + SaleGross *string + Status *string + TermDays *string + type ListOptions struct + Page int + ResultsPerPage int + type Locker struct + Download *string + Instructions *string + LicenseCode *string + LockerID *int + ProductID *int + ProductName *string + type LockerProcessedAlert struct + AlertID *string + AlertName *string + CheckoutID *string + CheckoutRecovery *string + Coupon *string + Download *string + Email *string + EventTime *string + Instructions *string + Licence *string + MarketingConsent *int + OrderID *string + ProductID *string + Quantity *string + Source *string + type Modifier struct + Amount *string + Currency *string + Description *string + IsRecurring *bool + ModifierID *int + SubscriptionID *int + type ModifierCreate struct + ModifierAmount float64 + ModifierDescription string + ModifierRecurring bool + SubscriptionID int + type ModifierCreateOptions struct + ModifierDescription string + ModifierRecurring bool + type ModifierCreateResponse struct + Response *Modifier + Success bool + type ModifierDelete struct + ModifierID int + type ModifierDeleteResponse struct + Success bool + type ModifiersOptions struct + PlanID int + SubscriptionID int + type ModifiersResponse struct + Response []*Modifier + Success bool + type ModifiersService service + func (s *ModifiersService) Create(ctx context.Context, subscriptionID int, modifierAmount float64, ...) (*Modifier, *http.Response, error) + func (s *ModifiersService) Delete(ctx context.Context, modifierID int) (bool, *http.Response, error) + func (s *ModifiersService) List(ctx context.Context, options *ModifiersOptions) ([]*Modifier, *http.Response, error) + type NewAudienceMemberAlert struct + AlertID *string + AlertName *string + CreatedAt *string + Email *string + EventTime *string + MarketingConsent *int + Products *string + Source *string + Subscribed *string + UserID *string + type OneOffCharge struct + Amount *float64 + Currency *string + InvoiceID *int + OrderID *string + PaymentDate *string + ReceiptUrl *string + Status *string + SubscriptionID *int + type OneOffChargeCreate struct + Amount float64 + ChargeName string + type OneOffChargeResponse struct + Response *OneOffCharge + Success bool + type OneOffChargesService service + func (s *OneOffChargesService) Create(ctx context.Context, subscriptionID int, amount float64, chargeName string) (*OneOffCharge, *http.Response, error) + type OneTimeProduct struct + BasePrice *float64 + Currency *string + Description *string + ID *int + Icon *string + Name *string + SalePrice *string + Screenshots *[]map[string]interface{} + type OneTimeProducts struct + Count *int + Products []*OneTimeProduct + Total *int + type Order struct + Completed *OrderCompleted + CouponCode *string + Currency *string + Customer *Customer + CustomerSuccessRedirectURL *string + FormattedTax *string + FormattedTotal *string + HasLocker *bool + IsSubscription *bool + OrderID *int + ProductID *int + Quantity *int + ReceiptUrl *string + SubscriptionID *int + SubscriptionOrderID *string + Total *string + TotalTax *string + type OrderCompleted struct + Date *string + TimeZone *string + TimeZoneType *int + type OrderDetails struct + Checkout *Checkout + Lockers []*Locker + Order *Order + State *string + type OrderDetailsResponse struct + Response *OrderDetails + Success bool + type OrderDetailsService service + func (s *OrderDetailsService) Get(ctx context.Context, checkoutID string) (*OrderDetails, *http.Response, error) + type PayLinkCreate struct + Affiliates string + CouponCode string + CustomMessage string + CustomerCountry string + CustomerEmail string + CustomerPostcode string + Discountable int + Expires string + ImageURL string + MarketingConsent int + Passthrough string + Prices string + ProductID int + Quantity int + QuantityVariable int + RecurringAffiliateLimit int + RecurringPrices string + ReturnURL string + Title string + TrialDays int + VatCity string + VatCompanyName string + VatCountry string + VatNumber string + VatPostcode string + VatState string + VatStreet string + WebhookURL string + type PayLinkCreateResponse struct + Response ... + Success bool + type PayLinkService service + func (s *PayLinkService) Create(ctx context.Context, payLink *PayLinkCreate) (*string, *http.Response, error) + type Payment struct + Amount *int + Currency *string + ID *int + IsOneOffCharge *int + IsPaid *int + PayoutDate *string + ReceiptUrl *string + SubscriptionID *int + type PaymentDisputeClosedAlert struct + AlertID *string + AlertName *string + Amount *string + CheckoutID *string + Currency *string + Email *string + EventTime *string + FeeUsd *string + MarketingConsent *int + OrderID *string + Passthrough *string + Status *string + type PaymentDisputeCreatedAlert struct + AlertID *string + AlertName *string + Amount *string + CheckoutID *string + Currency *string + Email *string + EventTime *string + FeeUsd *string + MarketingConsent *int + OrderID *string + Passthrough *string + Status *string + type PaymentInformation struct + CardType *string + ExpiryDate *string + LastFourDigits *string + PaymentMethod *string + type PaymentRefundedAlert struct + AlertID *string + AlertName *string + Amount *string + BalanceCurrency *string + BalanceEarningsDecrease *string + BalanceFeeRefund *string + BalanceGrossRefund *string + BalanceTaxRefund *string + CheckoutID *string + Currency *string + EarningsDecrease *string + Email *string + EventTime *string + FeeRefund *string + GrossRefund *string + MarketingConsent *int + OrderID *string + Passthrough *string + Quantity *string + RefundReason *string + RefundType *string + TaxRefund *string + type PaymentSucceededAlert struct + AlertID *string + AlertName *string + BalanceCurrency *string + BalanceEarnings *string + BalanceFee *string + BalanceGross *string + BalanceTax *string + CheckoutID *string + Country *string + Coupon *string + Currency *string + CustomerName *string + Earnings *string + Email *string + EventTime *string + Fee *string + IP *string + MarketingConsent *int + OrderID *string + Passthrough *string + PaymentMethod *string + PaymentTax *string + ProductID *string + ProductName *string + Quantity *string + ReceiptURL *string + SaleGross *string + UsedPriceOverride *string + type PaymentUpdate struct + Date string + PaymentID int + type PaymentUpdateResponse struct + Success bool + type PaymentsOptions struct + From string + IsOneOffCharge bool + IsPaid int + Plan int + SubscriptionID int + To string + type PaymentsResponse struct + Response []*Payment + Success bool + type PaymentsService service + func (s *PaymentsService) List(ctx context.Context, options *PaymentsOptions) ([]*Payment, *http.Response, error) + func (s *PaymentsService) Update(ctx context.Context, paymentID int, date string) (bool, *http.Response, error) + type Plan struct + BillingPeriod *int + BillingType *string + ID *int + InitialPrice map[string]interface{} + Name *string + RecurringPrice map[string]interface{} + TrialDays *int + type PlanCreate struct + MainCurrencyCode string + PlanLength int + PlanName string + PlanTrialDays int + PlanType string + RecurringPriceEur string + RecurringPriceGbp string + RecurringPriceUsd string + type PlanCreateOptions struct + MainCurrencyCode string + PlanTrialDays int + RecurringPriceEur string + RecurringPriceGbp string + RecurringPriceUsd string + type PlanCreateResponse struct + Response *Product + Success bool + type PlansOptions struct + PlanID int + type PlansResponse struct + Response []*Plan + Success bool + type PlansService service + func (s *PlansService) Create(ctx context.Context, planName, planType string, planLength int, ...) (*Product, *http.Response, error) + func (s *PlansService) List(ctx context.Context, options *PlansOptions) ([]*Plan, *http.Response, error) + type Price struct + Gross *float64 + Net *float64 + Tax *float64 + type Prices struct + CustomerCountry *string + Products []*Product + type PricesOptions struct + Coupons string + CustomerCountry string + CustomerIP string + type PricesResponse struct + Response *Prices + Success bool + type PricesService service + func (s *PricesService) Get(ctx context.Context, productIDs string, options *PricesOptions) (*Prices, *http.Response, error) + type Product struct + AppliedCoupon *AppliedCoupon + Currency *string + ListPrice *Price + Price *Price + ProductID *int + ProductTitle *string + VendorSetPricesIncludedTax *bool + type ProductsResponse struct + Response *OneTimeProducts + Success bool + type ProductsService service + func (s *ProductsService) List(ctx context.Context) (*OneTimeProducts, *http.Response, error) + type RefundPayment struct + Amount float64 + OrderID string + Reason string + type RefundPaymentOptions struct + Amount float64 + Reason string + type RefundPaymentResponse struct + Response ... + Success bool + type RefundPaymentService service + func (s *RefundPaymentService) Refund(ctx context.Context, orderID string, options *RefundPaymentOptions) (*int, *http.Response, error) + type SubscriptionCancelledAlert struct + AlertID *string + AlertName *string + CancellationEffectiveDate *string + CheckoutID *string + Currency *string + Email *string + EventTime *string + MarketingConsent *int + Passthrough *string + Quantity *string + Status *string + SubscriptionID *string + SubscriptionPlanID *string + UnitPrice *string + UserID *string + type SubscriptionCreatedAlert struct + AlertID *string + AlertName *string + CancelURL *string + CheckoutID *string + Currency *string + Email *string + EventTime *string + MarketingConsent *int + NextBillDate *string + Passthrough *string + Quantity *string + Source *string + Status *string + SubscriptionID *string + SubscriptionPlanID *string + UnitPrice *string + UpdateURL *string + UserID *string + type SubscriptionPaymentFailedAlert struct + AlertID *string + AlertName *string + Amount *string + AttemptNumber *string + CancelURL *string + CheckoutID *string + Currency *string + Email *string + EventTime *string + Instalments *string + MarketingConsent *int + NextRetryDate *string + OrderID *string + Passthrough *string + Quantity *string + Status *string + SubscriptionID *string + SubscriptionPaymentID *string + SubscriptionPlanID *string + UnitPrice *string + UpdateURL *string + UserID *string + type SubscriptionPaymentRefundedAlert struct + AlertID *string + AlertName *string + Amount *string + BalanceCurrency *string + BalanceEarningsDecrease *string + BalanceFeeRefund *string + BalanceGrossRefund *string + BalanceTaxRefund *string + CheckoutID *string + Currency *string + EarningsDecrease *string + Email *string + EventTime *string + FeeRefund *string + GrossRefund *string + InitialPayment *int + Instalments *string + MarketingConsent *int + OrderID *string + Passthrough *string + Quantity *string + RefundReason *string + RefundType *string + Status *string + SubscriptionID *string + SubscriptionPaymentID *string + SubscriptionPlanID *string + TaxRefund *string + UnitPrice *string + UserID *string + type SubscriptionPaymentSucceededAlert struct + AlertID *string + AlertName *string + BalanceCurrency *string + BalanceEarnings *string + BalanceFee *string + BalanceGross *string + BalanceTax *string + CheckoutID *string + Country *string + Coupon *string + Currency *string + CustomerName *string + Earnings *string + Email *string + EventTime *string + Fee *string + InitialPayment *int + Instalments *string + MarketingConsent *int + NextBillDate *string + NextPaymentAmount *string + OrderID *string + Passthrough *string + PaymentMethod *string + PaymentTax *string + PlanName *string + Quantity *string + ReceiptURL *string + SaleGross *string + Status *string + SubscriptionID *string + SubscriptionPaymentID *string + SubscriptionPlanID *string + UnitPrice *string + UserID *string + type SubscriptionUpdatedAlert struct + AlertID *string + AlertName *string + CancelURL *string + CheckoutID *string + Currency *string + Email *string + EventTime *string + MarketingConsent *int + NewPrice *string + NewQuantity *string + NewUnitPrice *string + NextBillDate *string + OldNextBillDate *string + OldPrice *string + OldQuantity *string + OldStatus *string + OldSubscriptionPlanID *string + OldUnitPrice *string + Passthrough *string + PausedAt *string + PausedFrom *string + PausedReason *string + Status *string + SubscriptionID *string + SubscriptionPlanID *string + UpdateURL *string + UserID *string + type TransferCreatedAlert struct + AlertID *string + AlertName *string + Amount *string + Currency *string + EventTime *string + PayoutID *string + Status *string + type TransferPaidAlert struct + AlertID *string + AlertName *string + Amount *string + Currency *string + EventTime *string + PayoutID *string + Status *string + type UpdateAudienceMemberAlert struct + AlertID *string + AlertName *string + EventTime *string + NewCustomerEmail *string + NewMarketingConsent *string + OldCustomerEmail *string + OldMarketingConsent *string + Products *string + Source *string + UpdatedAt *string + UserID *string + type User struct + CancelURL *string + LastPayment *UserPayment + MarketingConsent *bool + NextPayment *UserPayment + PausedAt *string + PausedFrom *string + PaymentInformation *PaymentInformation + PlanID *int + SignupDate *string + State *string + SubscriptionID *int + UpdateURL *string + UserEmail *string + UserID *int + type UserCancel struct + SubscriptionID int + type UserCancelResponse struct + Success bool + type UserHistory struct + Callback *string + Message *string + type UserHistoryOptions struct + ProductID *int64 + VendorID *int64 + type UserHistoryResponse struct + Response *UserHistory + Success bool + type UserHistoryService service + func (s *UserHistoryService) Get(ctx context.Context, email string, options *UserHistoryOptions) (*UserHistory, *http.Response, error) + type UserPayment struct + Amount *float64 + Currency *string + Date *string + type UserUpdate struct + BillImmediately bool + Currency string + KeepModifiers bool + Passthrough string + Pause bool + PlanID int + Prorate bool + Quantity int + RecurringPrice float64 + SubscriptionID int + type UserUpdateOptions struct + BillImmediately bool + Currency string + KeepModifiers bool + Passthrough string + Pause bool + PlanID int + Prorate bool + RecurringPrice float64 + type UserUpdateResponse struct + Response *User + Success bool + type UsersOptions struct + PlanID string + State string + SubscriptionID string + type UsersResponse struct + Response []*User + Success bool + type UsersService service + func (s *UsersService) Cancel(ctx context.Context, subscriptionID int) (bool, *http.Response, error) + func (s *UsersService) List(ctx context.Context, options *UsersOptions) ([]*User, *http.Response, error) + func (s *UsersService) Update(ctx context.Context, subscriptionID, quantity int, options *UserUpdateOptions) (*User, *http.Response, error) + type WebhookEvent struct + AlertsPerPage *int + CurrentPage *int + Data []*EventData + QueryHead *string + QueryTail *string + TotalAlerts *int + TotalPages *int + type WebhookEventOptions struct + AlertsPerPage string + QueryHead string + QueryTail string + type WebhookEventResponse struct + Response *WebhookEvent + Success bool + type WebhooksService service + func (s *WebhooksService) Get(ctx context.Context, options *WebhookEventOptions) (*WebhookEvent, *http.Response, error)