stripe_smart_checkout 0.1.1 copy "stripe_smart_checkout: ^0.1.1" to clipboard
stripe_smart_checkout: ^0.1.1 copied to clipboard

Modern Flutter package for Stripe Checkout integration with support for one-time payments and subscriptions. Clean architecture, type-safe, cross-platform.

0.1.1 #

Example App Improvements ๐ŸŽจ #

Simplified and enhanced the example application for better user experience and easier understanding.

Changes

  • ๐Ÿ“ฑ Single-Page Example - Consolidated the multi-screen example into a unified, scrollable single-page interface
    • All products (one-time payments and subscriptions) visible at once
    • No navigation required - tap any product to start checkout immediately
    • Cleaner, more intuitive user experience
  • ๐ŸŽฏ Simplified Dependencies - Removed unnecessary dependencies from example app
    • Removed: flutter_riverpod, go_router, cached_network_image, freezed, json_serializable
    • Now only requires: flutter and stripe_smart_checkout package
    • Reduced complexity and faster setup
  • โœ… Fixed Dialog Display Issues - Improved success/error dialog handling
    • Added proper delay to ensure navigation completes before showing dialogs
    • Fixed black background issue when dialogs appear
    • Added context safety checks with context.mounted
  • ๐Ÿ“ฆ Better Documentation - Enhanced inline documentation and setup instructions
    • Clear setup instructions displayed in the app
    • Test card information readily available
    • Line number references for API key configuration

Example App Structure

The example is now contained in a single file (example/lib/main.dart) with ~580 lines that demonstrate:

  • ๐Ÿ’ณ 3 One-time payment products
  • ๐Ÿ”„ 3 Subscription plans (weekly, monthly, annual with trials)
  • โœจ Professional UI with Material Design
  • ๐ŸŽจ Color-coded product cards (blue for payments, purple for subscriptions)
  • ๐Ÿงช Built-in test card reference
  • โœ… Complete success/error handling with detailed dialogs

Breaking Changes: None

Migration Guide: Existing code using v0.1.0 will continue to work without any changes


0.1.0 #

Initial Release ๐ŸŽ‰ #

Complete Stripe Checkout integration for Flutter with support for both one-time payments and recurring subscriptions.

Features

  • โœ… One-Time Payments - Single transaction checkout for products and services
  • โœ… Subscriptions - Recurring payments with flexible billing intervals
  • โœ… Billing Intervals - Support for daily, weekly, monthly, and yearly billing
  • โœ… Free Trials - Optional trial periods for subscriptions
  • โœ… Custom Intervals - Bill every N intervals (e.g., quarterly, bi-weekly)
  • โœ… Named Constructors - CheckoutItem.payment() and CheckoutItem.subscription()
  • โœ… WebView Integration - Embedded Stripe Checkout experience
  • โœ… External Browser - Option to open checkout in default browser
  • โœ… Comprehensive Error Handling - Specific exception types for different error scenarios
  • โœ… Type Safety - Full type safety with proper enums and models
  • โœ… Clean Architecture - Separation of concerns with clear layer boundaries
  • โœ… Cross-Platform - Works on iOS, Android, Web, macOS, Windows, and Linux
  • โœ… Zero Native Code - Pure Dart implementation
  • โœ… Test Mode - Easy switching between test and production environments

API

Core Classes
  • StripeCheckoutWidget - Main widget for displaying checkout
  • StripeCheckoutConfig - Configuration for Stripe API keys
  • CheckoutItem - Item class with payment and subscription constructors
  • CheckoutSession - Represents a completed checkout session
  • StripeCheckoutRepository - Repository interface for advanced usage
Enums
  • CheckoutMode - Payment modes (payment, subscription)
  • BillingInterval - Billing frequencies (day, week, month, year)
Exceptions
  • StripeCheckoutException - Base exception class
  • StripePaymentException - Payment-specific errors
  • StripeNetworkException - Network-related errors

Example App

Comprehensive example demonstrating:

  • One-time payment products
  • Subscription plans with trials
  • Dynamic mode detection
  • Success/error handling
  • Clean Architecture with Riverpod

Documentation

  • Complete README with integration guides
  • API reference documentation
  • Usage examples for both payment types
  • Testing guide with test cards
  • Architecture documentation

Breaking Changes: None (initial release)

Migration Guide: N/A (initial release)

1
likes
130
points
145
downloads

Publisher

verified publishersnippetcoder.com

Weekly Downloads

Modern Flutter package for Stripe Checkout integration with support for one-time payments and subscriptions. Clean architecture, type-safe, cross-platform.

Homepage

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

dio, flutter, flutter_riverpod, freezed_annotation, json_annotation, url_launcher, webview_flutter

More

Packages that depend on stripe_smart_checkout