stripe

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Provider)

Option customizes Provider behavior.

func WithSkipVerify

func WithSkipVerify(skip bool) Option

WithSkipVerify allows skipping webhook signature verification (dev only).

type Provider

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

Provider implements ports.PaymentProvider using Stripe Checkout + webhooks.

func New

func New(secretKey, webhookSecret string, opts ...Option) *Provider

New returns a Stripe-backed payment provider.

func (*Provider) CreateCheckoutSession

func (p *Provider) CreateCheckoutSession(ctx context.Context, req ports.CheckoutSessionRequest) (ports.CheckoutSession, error)

CreateCheckoutSession creates a hosted checkout session for a single line item.

func (*Provider) ListPrices

func (p *Provider) ListPrices(ctx context.Context) ([]ports.Price, error)

ListPrices fetches active prices from Stripe.

func (*Provider) ParseWebhook

func (p *Provider) ParseWebhook(ctx context.Context, payload []byte, sigHeader string) (ports.WebhookEvent, error)

ParseWebhook verifies and parses the Stripe webhook payload.

Jump to

Keyboard shortcuts

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