Soenneker.Blazor.Stripe.Elements 3.0.200

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Blazor.Stripe.Elements --version 3.0.200
                    
NuGet\Install-Package Soenneker.Blazor.Stripe.Elements -Version 3.0.200
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blazor.Stripe.Elements" Version="3.0.200" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.Stripe.Elements" Version="3.0.200" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blazor.Stripe.Elements" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blazor.Stripe.Elements --version 3.0.200
                    
#r "nuget: Soenneker.Blazor.Stripe.Elements, 3.0.200"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Soenneker.Blazor.Stripe.Elements&version=3.0.200
                    
Install Soenneker.Blazor.Stripe.Elements as a Cake Addin
#tool nuget:?package=Soenneker.Blazor.Stripe.Elements&version=3.0.200
                    
Install Soenneker.Blazor.Stripe.Elements as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Blazor.Stripe.Elements

A modular, strongly-typed Blazor library for Stripe Elements โ€” designed to provide first-class C# configuration and deep interop with Stripe.js. Built for modern Blazor projects using Stripe's Payment, Link Authentication, and Address Elements.

โœจ Features

  • ๐Ÿ”Œ Blazor-native components for <StripeElements>, <StripePaymentElement>, <StripeLinkAuthenticationElement>, and <StripeAddressElement>
  • ๐Ÿง  Fully configurable via C# โ€” with strong typing for all supported options, including appearance, locale, currency, developer tools, and more
  • ๐ŸŽจ Appearance API support with extensible theming and rule control
  • ๐Ÿ“ฆ Supports SetupIntents, on-submit hooks, and validation workflows
  • ๐Ÿงช Compatible with Stripe test environments and developer tooling
  • ๐Ÿ’ฌ Built-in callback support for validation and error responses
  • ๐Ÿ”„ Seamless async interop with Stripe.js lifecycle

<img src="https://github.com/user-attachments/assets/a2f8777a-02e0-40de-afd6-fe4d1211427b" width="80%"></img>

๐Ÿ“ฆ Installation

dotnet add package Soenneker.Blazor.Stripe.Elements

๐Ÿ› ๏ธ Usage

1. Register Stripe in your Blazor project

builder.Services.AddStripeElementsInteropAsScoped();

2. Add the components to your Razor page

<StripeElements @ref="_stripeElements"
                StripeElementsConfiguration="_config"
                OnSubmitPayment="HandleStripeSubmit"
                OnValidatePayment="HandleStripeValidate">

    <StripeAddressElement />
    <StripeLinkAuthenticationElement />
    <StripePaymentElement />

    <Button Clicked="Submit">Submit</Button>
</StripeElements>

3. Configure Stripe using C#

_config = new StripeElementsConfiguration
{
    PublishableKey = "pk_test_...",
    ElementsOptions = new StripeElementsOptions
    {
        Locale = "auto",
        Currency = CurrencyCode.Usd,
        Mode = StripeElementsMode.Setup,
        Appearance = new StripeAppearance
        {
            Theme = StripeElementsTheme.Flat,
            Variables = new StripeAppearanceVariablesExtended
            {
                ColorPrimary = "#0570de",
                BorderRadius = "4px"
            }
        }
    },
    AddressOptions = new StripeAddressOptions
    {
        Mode = StripeAddressMode.Billing,
        AllowedCountries = ["US", "CA"],
        Fields = new StripeAddressFields
        {
            Phone = StripeAddressFieldsPhoneOption.Auto
        }
    }
};

โœ… Components

Component Purpose
StripeElements Wrapper and manager for all child elements
StripePaymentElement Handles card and express payments
StripeLinkAuthenticationElement Collects email and links with Stripe Link
StripeAddressElement Collects billing or shipping address
StripeElementsConfiguration Full C# model to control everything

๐Ÿ”„ Event Callbacks

Event Description
OnValidatePayment Triggered before attempting to submit a payment (for preflight validation)
OnSubmitPayment Triggered after attempting to submit the payment intent or method
public async Task HandleStripeValidate(StripeErrorDto? error) { ... }
public async Task HandleStripeSubmit(StripeErrorDto? error) { ... }

๐Ÿ”— Official Stripe Docs

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.255 67 5/15/2025
3.0.254 64 5/14/2025
3.0.253 81 5/14/2025
3.0.252 59 5/14/2025
3.0.251 58 5/14/2025
3.0.250 58 5/13/2025
3.0.249 95 5/13/2025
3.0.248 146 5/8/2025
3.0.247 119 5/8/2025
3.0.246 125 5/8/2025
3.0.245 129 5/8/2025
3.0.244 123 5/8/2025
3.0.243 121 5/8/2025
3.0.242 120 5/8/2025
3.0.241 123 5/8/2025
3.0.240 124 5/8/2025
3.0.239 120 5/8/2025
3.0.238 125 5/7/2025
3.0.237 124 5/7/2025
3.0.236 134 5/7/2025
3.0.235 122 5/7/2025
3.0.234 125 5/6/2025
3.0.233 129 5/6/2025
3.0.232 119 5/6/2025
3.0.231 123 5/6/2025
3.0.230 121 5/6/2025
3.0.229 121 5/6/2025
3.0.228 121 5/6/2025
3.0.227 118 5/6/2025
3.0.226 117 5/6/2025
3.0.225 121 5/6/2025
3.0.224 127 5/6/2025
3.0.223 124 5/6/2025
3.0.222 122 5/5/2025
3.0.221 126 5/5/2025
3.0.220 122 5/5/2025
3.0.219 127 5/5/2025
3.0.218 119 5/5/2025
3.0.217 120 5/5/2025
3.0.216 124 5/5/2025
3.0.215 124 5/5/2025
3.0.214 123 5/5/2025
3.0.213 122 5/5/2025
3.0.212 130 5/5/2025
3.0.211 126 5/5/2025
3.0.210 124 5/5/2025
3.0.209 122 5/5/2025
3.0.208 122 5/5/2025
3.0.207 121 5/5/2025
3.0.206 124 5/5/2025
3.0.203 121 5/5/2025
3.0.202 128 5/5/2025
3.0.201 123 5/4/2025
3.0.200 123 5/4/2025
3.0.199 130 5/4/2025
3.0.198 50 5/3/2025
3.0.197 65 5/2/2025
3.0.196 67 5/2/2025
3.0.195 72 5/2/2025
3.0.194 72 5/2/2025
3.0.193 75 5/2/2025
3.0.192 75 5/2/2025
3.0.191 71 5/2/2025
3.0.190 66 5/2/2025
3.0.189 66 5/2/2025
3.0.188 177 4/29/2025
3.0.187 124 4/27/2025
3.0.186 74 4/26/2025
3.0.185 61 4/26/2025
3.0.184 76 4/26/2025
3.0.183 146 4/24/2025
3.0.182 245 4/10/2025
3.0.181 190 4/9/2025
3.0.180 152 4/9/2025
3.0.179 151 4/9/2025
3.0.178 149 4/9/2025
3.0.177 140 4/8/2025
3.0.176 142 4/8/2025
3.0.175 137 4/8/2025
3.0.174 147 4/8/2025
3.0.173 142 4/8/2025
3.0.172 146 4/8/2025
3.0.171 144 4/8/2025
3.0.170 146 4/8/2025
3.0.169 145 4/8/2025
3.0.168 143 4/8/2025
3.0.167 140 4/8/2025
3.0.166 152 4/8/2025
3.0.165 147 4/8/2025
3.0.164 145 4/8/2025
3.0.163 143 4/8/2025
3.0.162 142 4/8/2025
3.0.161 146 4/8/2025
3.0.160 149 4/8/2025
3.0.159 146 4/8/2025
3.0.158 141 4/8/2025
3.0.157 145 4/8/2025
3.0.156 137 4/8/2025
3.0.155 141 4/8/2025
3.0.154 150 4/7/2025
3.0.153 157 4/7/2025
3.0.152 140 4/7/2025
3.0.151 148 4/7/2025
3.0.150 158 4/7/2025
3.0.149 150 4/7/2025
3.0.148 152 4/7/2025
3.0.147 144 4/7/2025
3.0.146 157 4/7/2025
3.0.145 152 4/7/2025
3.0.144 141 4/7/2025
3.0.143 161 4/7/2025
3.0.142 153 4/7/2025
3.0.141 155 4/7/2025
3.0.140 143 4/7/2025
3.0.139 140 4/7/2025
3.0.138 150 4/7/2025
3.0.137 158 4/7/2025
3.0.136 155 4/7/2025
3.0.135 157 4/7/2025
3.0.134 165 4/7/2025
3.0.133 145 4/7/2025
3.0.132 151 4/7/2025
3.0.131 152 4/7/2025
3.0.130 150 4/7/2025
3.0.129 149 4/7/2025
3.0.128 154 4/7/2025
3.0.127 150 4/7/2025
3.0.126 150 4/7/2025
3.0.125 150 4/7/2025
3.0.124 145 4/7/2025
3.0.123 140 4/7/2025
3.0.122 150 4/7/2025
3.0.121 148 4/6/2025
3.0.120 145 4/6/2025
3.0.119 143 4/6/2025
3.0.118 144 4/6/2025
3.0.117 145 4/6/2025
3.0.116 155 4/6/2025
3.0.115 152 4/6/2025
3.0.114 152 4/6/2025
3.0.113 148 4/6/2025
3.0.112 120 4/6/2025
3.0.111 116 4/6/2025
3.0.110 117 4/6/2025
3.0.109 128 4/6/2025
3.0.108 122 4/6/2025
3.0.107 129 4/6/2025
3.0.106 128 4/6/2025
3.0.105 128 4/6/2025
3.0.104 102 4/6/2025
3.0.103 98 4/6/2025
3.0.102 102 4/6/2025
3.0.101 95 4/6/2025
3.0.100 97 4/6/2025
3.0.99 92 4/6/2025
3.0.98 104 4/6/2025
3.0.97 91 4/6/2025
3.0.96 101 4/6/2025
3.0.95 98 4/6/2025
3.0.94 113 4/6/2025
3.0.93 103 4/5/2025
3.0.92 79 4/5/2025
3.0.91 75 4/5/2025
3.0.90 89 4/5/2025
3.0.89 73 4/5/2025
3.0.88 77 4/5/2025
3.0.87 83 4/5/2025
3.0.86 80 4/5/2025
3.0.85 81 4/5/2025
3.0.84 75 4/5/2025
3.0.83 79 4/5/2025
3.0.82 81 4/5/2025
3.0.81 87 4/5/2025
3.0.80 70 4/5/2025
3.0.79 77 4/5/2025
3.0.78 75 4/5/2025
3.0.77 81 4/5/2025
3.0.76 76 4/4/2025
3.0.75 84 4/4/2025
3.0.74 125 4/4/2025
3.0.73 121 4/4/2025
3.0.72 133 4/4/2025
3.0.71 127 4/4/2025
3.0.70 139 4/4/2025
3.0.69 134 4/4/2025
3.0.68 163 4/4/2025
3.0.67 142 4/4/2025
3.0.66 152 4/4/2025
3.0.65 145 4/4/2025
3.0.64 143 4/2/2025
3.0.63 126 4/1/2025
3.0.62 137 4/1/2025
3.0.61 137 4/1/2025
3.0.60 133 4/1/2025
3.0.59 136 4/1/2025
3.0.58 135 4/1/2025
3.0.57 130 4/1/2025
3.0.56 134 4/1/2025
3.0.55 131 4/1/2025
3.0.54 138 4/1/2025
3.0.53 133 4/1/2025
3.0.52 129 4/1/2025
3.0.51 138 4/1/2025
3.0.50 139 4/1/2025
3.0.49 134 4/1/2025
3.0.48 136 4/1/2025
3.0.47 133 4/1/2025
3.0.46 131 4/1/2025
3.0.45 135 4/1/2025
3.0.44 135 4/1/2025
3.0.43 132 4/1/2025
3.0.41 134 3/31/2025
3.0.40 134 3/31/2025
3.0.39 145 3/31/2025
3.0.38 137 3/31/2025
3.0.37 145 3/31/2025
3.0.36 143 3/31/2025
3.0.35 137 3/31/2025
3.0.34 136 3/30/2025
3.0.33 137 3/30/2025
3.0.32 131 3/29/2025
3.0.31 65 3/29/2025
3.0.30 72 3/29/2025
3.0.29 76 3/29/2025
3.0.28 74 3/29/2025
3.0.27 79 3/29/2025
3.0.26 72 3/29/2025
3.0.25 73 3/29/2025
3.0.24 80 3/29/2025
3.0.23 77 3/29/2025
3.0.22 120 3/27/2025
3.0.21 119 3/27/2025
3.0.20 123 3/27/2025
3.0.19 451 3/26/2025
3.0.18 448 3/26/2025
3.0.17 450 3/26/2025
3.0.16 452 3/26/2025
3.0.15 452 3/25/2025
3.0.14 455 3/25/2025
3.0.13 453 3/25/2025
3.0.12 451 3/25/2025
3.0.11 457 3/25/2025
3.0.10 449 3/25/2025
3.0.9 452 3/25/2025
3.0.8 454 3/25/2025
3.0.7 466 3/25/2025
3.0.6 466 3/25/2025
3.0.5 472 3/25/2025
3.0.4 470 3/24/2025
3.0.3 449 3/24/2025
3.0.2 444 3/24/2025
3.0.1 448 3/24/2025