FonsecaFramework.Stripe 2026.5.20.1

dotnet add package FonsecaFramework.Stripe --version 2026.5.20.1
                    
NuGet\Install-Package FonsecaFramework.Stripe -Version 2026.5.20.1
                    
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="FonsecaFramework.Stripe" Version="2026.5.20.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FonsecaFramework.Stripe" Version="2026.5.20.1" />
                    
Directory.Packages.props
<PackageReference Include="FonsecaFramework.Stripe" />
                    
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 FonsecaFramework.Stripe --version 2026.5.20.1
                    
#r "nuget: FonsecaFramework.Stripe, 2026.5.20.1"
                    
#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.
#:package FonsecaFramework.Stripe@2026.5.20.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FonsecaFramework.Stripe&version=2026.5.20.1
                    
Install as a Cake Addin
#tool nuget:?package=FonsecaFramework.Stripe&version=2026.5.20.1
                    
Install as a Cake Tool

FonsecaFramework.Stripe

A simple Stripe payment integration client for .NET.

Overview

FonsecaFramework.Stripe is a .NET 9 library that wraps the Stripe.net SDK to provide a streamlined payment experience. It supports direct card payments via PaymentIntent and hosted checkout sessions via Stripe Checkout. The library reuses the Product and Reciept models from FonsecaFramework.PayPal for a consistent API across payment providers.

Installation

dotnet add package FonsecaFramework.Stripe

Features

Area Key Classes
Stripe Client StripeClient — process payments with card details or start hosted checkout sessions
Direct Payment ProcessPaymentWithPaymentMethod() — create and confirm a PaymentIntent with card details
Checkout Session StartCheckoutSessionAsync() — create a Stripe Checkout session and return a redirect URL
Shared Models Uses Product and Reciept from FonsecaFramework.PayPal

Examples

Process a Direct Card Payment

using FonsecaFramework.Stripe;
using FonsecaFramework.PayPal;

var stripe = new StripeClient("<your-stripe-secret-key>");

var products = new List<Product>
{
    new Product { Name = "T-Shirt", Price = 29.99m, CurrencyCode = "usd", Quantity = 2 }
};

bool success = await stripe.ProcessPaymentWithPaymentMethod(
    products: products,
    purchaseDescription: "Online Store Order #1234",
    cardNumber: "4242424242424242",
    expMonth: 12,
    expYear: 2026,
    cvc: "314");

Console.WriteLine(success ? "Payment succeeded!" : "Payment failed.");

Start a Stripe Checkout Session

using FonsecaFramework.Stripe;
using FonsecaFramework.PayPal;

var stripe = new StripeClient("<your-stripe-secret-key>");

var products = new List<Product>
{
    new Product { Name = "Widget", Price = 15.00m, CurrencyCode = "usd", Quantity = 3 },
    new Product { Name = "Gadget", Price = 45.00m, CurrencyCode = "usd", Quantity = 1 }
};

Reciept receipt = await stripe.StartCheckoutSessionAsync(
    products: products,
    successUrl: "https://mysite.com/success?session_id={CHECKOUT_SESSION_ID}",
    cancelUrl: "https://mysite.com/cancel",
    taxRate: 0.08m);

Console.WriteLine($"Checkout URL: {receipt.CheckoutUrl}");
Console.WriteLine($"Order ID: {receipt.OrderID}");
Console.WriteLine($"Total: {receipt.Total:C}");

Requirements

  • .NET 9.0
  • Stripe API key (test or live)

License

Copyright 2025 Steven Fonseca / VLR Creations

Licensed under the Apache License, Version 2.0. You may use this library free of charge, provided you include the required attribution notices. See the LICENSE file for full terms.

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
2026.5.20.1 33 5/20/2026
2026.5.12.1 81 5/13/2026
2026.5.11.1 96 5/11/2026
2026.5.7.2 95 5/7/2026
2026.5.7.1 84 5/7/2026
2026.5.6.1 88 5/6/2026
2026.5.5.1 90 5/5/2026
2026.5.2.1 88 5/2/2026
2026.4.30.1 94 4/30/2026
2026.4.29.1 111 4/29/2026
2026.4.27.1 94 4/28/2026
2026.4.22.1 92 4/22/2026
2026.4.21.1 90 4/21/2026
2026.4.20.1 99 4/20/2026
2026.4.15.1 100 4/15/2026
2026.4.13.1 98 4/13/2026
2026.4.10.1 97 4/10/2026
2026.4.8.1 99 4/8/2026
2026.4.7.1 108 4/7/2026
2026.4.3.1 101 4/3/2026
Loading failed