Help us shape the future of Go! Take the 2026 Go Developer Survey

stripe

package
v1.3.250 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const Env = "env"

Variables

This section is empty.

Functions

This section is empty.

Types

type IStripe

type IStripe interface {
	CreateAccount(accountParams *stripe.AccountParams) (*stripe.Account, error)
	UpdateAccount(accountID string, accountParams *stripe.AccountParams) (*stripe.Account, error)
	GetAccount(accountID string, accountParams *stripe.AccountParams) (*stripe.Account, error)
	CreateCustomer(customerParams *stripe.CustomerParams) (*stripe.Customer, error)
	UpdateCustomer(customerID string, customerParams *stripe.CustomerParams) (*stripe.Customer, error)
	CreateCheckoutSession(checkoutSessionParams *stripe.CheckoutSessionParams) (*stripe.CheckoutSession, error)
	GetSubscription(subscriptionID string, subscriptionParams *stripe.SubscriptionParams) (*stripe.Subscription, error)
	CreateSubscription(subscriptionParams *stripe.SubscriptionParams) (*stripe.Subscription, error)
	UpdateSubscription(subscriptionID string, subscriptionParams *stripe.SubscriptionParams) (*stripe.Subscription, error)
	CancelSubscription(subscriptionID string, subscriptionCancelParams *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)
	CreateSetupIntent(setupIntentParams *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
	GetSetupIntent(setupIntentID string, setupIntentParams *stripe.SetupIntentParams) (*stripe.SetupIntent, error)
	GetPaymentMethod(paymentMethodID string, paymentMethodParams *stripe.PaymentMethodParams) (*stripe.PaymentMethod, error)
	DetachPaymentMethod(paymentMethodID string, paymentMethodDetachParams *stripe.PaymentMethodDetachParams) (*stripe.PaymentMethod, error)
	CreateBillingPortalSession(billingPortalSessionParams *stripe.BillingPortalSessionParams) (*stripe.BillingPortalSession, error)
	CreateAccountLink(accountLinkParams *stripe.AccountLinkParams) (*stripe.AccountLink, error)
	GetPaymentIntent(paymentIntentID string, paymentIntentParams *stripe.PaymentIntentParams) (*stripe.PaymentIntent, error)
	CreatePaymentIntent(paymentIntentParams *stripe.PaymentIntentParams) (*stripe.PaymentIntent, error)
	ConfirmPaymentIntent(paymentIntentID string, paymentIntentConfirmParams *stripe.PaymentIntentConfirmParams) (*stripe.PaymentIntent, error)
	CancelPaymentIntent(paymentIntentID string, paymentIntentCancelParams *stripe.PaymentIntentCancelParams) (*stripe.PaymentIntent, error)
	CreatePaymentIntentMultiparty(paymentIntentParams *stripe.PaymentIntentParams, linkedAccountID string) (*stripe.PaymentIntent, error)
	CreateRefundMultiparty(refundParams *stripe.RefundParams, linkedAccountID string) (*stripe.Refund, error)
	ConstructWebhookEvent(reqBody []byte, signature string, webhookKey string) (stripe.Event, error)
	NewCheckoutSession(
		paymentMethods []string,
		mode string,
		successURL string,
		CancelURL string,
		lineItems []*stripe.CheckoutSessionLineItemParams,
		discounts []*stripe.CheckoutSessionDiscountParams,
	) *stripe.CheckoutSession
}

type Stripe

type Stripe struct {
	// contains filtered or unexported fields
}

func NewStripe

func NewStripe(token string, webhookSecrets map[string]string, appService *app.App) *Stripe

func (*Stripe) CancelPaymentIntent added in v1.3.250

func (s *Stripe) CancelPaymentIntent(paymentIntentID string, paymentIntentCancelParams *stripe.PaymentIntentCancelParams) (*stripe.PaymentIntent, error)

func (*Stripe) CancelSubscription added in v1.0.69

func (s *Stripe) CancelSubscription(subscriptionID string, subscriptionCancelParams *stripe.SubscriptionCancelParams) (*stripe.Subscription, error)

func (*Stripe) ConfirmPaymentIntent added in v1.3.250

func (s *Stripe) ConfirmPaymentIntent(paymentIntentID string, paymentIntentConfirmParams *stripe.PaymentIntentConfirmParams) (*stripe.PaymentIntent, error)

func (*Stripe) ConstructWebhookEvent

func (s *Stripe) ConstructWebhookEvent(reqBody []byte, signature string, webhookKey string) (stripe.Event, error)

func (*Stripe) CreateAccount added in v1.0.56

func (s *Stripe) CreateAccount(accountParams *stripe.AccountParams) (*stripe.Account, error)
func (s *Stripe) CreateAccountLink(accountLinkParams *stripe.AccountLinkParams) (*stripe.AccountLink, error)

func (*Stripe) CreateBillingPortalSession added in v1.0.65

func (s *Stripe) CreateBillingPortalSession(billingPortalSessionParams *stripe.BillingPortalSessionParams) (*stripe.BillingPortalSession, error)

func (*Stripe) CreateCheckoutSession added in v1.0.65

func (s *Stripe) CreateCheckoutSession(checkoutSessionParams *stripe.CheckoutSessionParams) (*stripe.CheckoutSession, error)

func (*Stripe) CreateCustomer added in v1.0.64

func (s *Stripe) CreateCustomer(customerParams *stripe.CustomerParams) (*stripe.Customer, error)

func (*Stripe) CreatePaymentIntent added in v1.3.250

func (s *Stripe) CreatePaymentIntent(paymentIntentParams *stripe.PaymentIntentParams) (*stripe.PaymentIntent, error)

func (*Stripe) CreatePaymentIntentMultiparty added in v1.0.56

func (s *Stripe) CreatePaymentIntentMultiparty(
	paymentIntentParams *stripe.PaymentIntentParams,
	linkedAccountID string,
) (*stripe.PaymentIntent, error)

func (*Stripe) CreateRefundMultiparty added in v1.0.99

func (s *Stripe) CreateRefundMultiparty(refundParams *stripe.RefundParams, linkedAccountID string) (*stripe.Refund, error)

func (*Stripe) CreateSetupIntent added in v1.0.70

func (s *Stripe) CreateSetupIntent(setupIntentParams *stripe.SetupIntentParams) (*stripe.SetupIntent, error)

func (*Stripe) CreateSubscription added in v1.0.69

func (s *Stripe) CreateSubscription(subscriptionParams *stripe.SubscriptionParams) (*stripe.Subscription, error)

func (*Stripe) DetachPaymentMethod added in v1.3.250

func (s *Stripe) DetachPaymentMethod(paymentMethodID string, paymentMethodDetachParams *stripe.PaymentMethodDetachParams) (*stripe.PaymentMethod, error)

func (*Stripe) GetAccount added in v1.0.97

func (s *Stripe) GetAccount(accountID string, params *stripe.AccountParams) (*stripe.Account, error)

func (*Stripe) GetPaymentIntent added in v1.1.0

func (s *Stripe) GetPaymentIntent(paymentIntentID string, paymentIntentParams *stripe.PaymentIntentParams) (*stripe.PaymentIntent, error)

func (*Stripe) GetPaymentMethod added in v1.3.250

func (s *Stripe) GetPaymentMethod(paymentMethodID string, paymentMethodParams *stripe.PaymentMethodParams) (*stripe.PaymentMethod, error)

func (*Stripe) GetSetupIntent added in v1.3.250

func (s *Stripe) GetSetupIntent(setupIntentID string, setupIntentParams *stripe.SetupIntentParams) (*stripe.SetupIntent, error)

func (*Stripe) GetSubscription added in v1.0.76

func (s *Stripe) GetSubscription(subscriptionID string, params *stripe.SubscriptionParams) (*stripe.Subscription, error)

func (*Stripe) NewCheckoutSession

func (s *Stripe) NewCheckoutSession(
	paymentMethods []string,
	mode string,
	successURL string,
	CancelURL string,
	lineItems []*stripe.CheckoutSessionLineItemParams,
	discounts []*stripe.CheckoutSessionDiscountParams,
) *stripe.CheckoutSession

func (*Stripe) UpdateAccount added in v1.2.42

func (s *Stripe) UpdateAccount(accountID string, accountParams *stripe.AccountParams) (*stripe.Account, error)

func (*Stripe) UpdateCustomer added in v1.0.71

func (s *Stripe) UpdateCustomer(customerID string, customerParams *stripe.CustomerParams) (*stripe.Customer, error)

func (*Stripe) UpdateSubscription added in v1.0.69

func (s *Stripe) UpdateSubscription(subscriptionID string, subscriptionParams *stripe.SubscriptionParams) (*stripe.Subscription, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL