Soenneker.Stripe.PaymentMethods 4.0.1253

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Stripe.PaymentMethods --version 4.0.1253
                    
NuGet\Install-Package Soenneker.Stripe.PaymentMethods -Version 4.0.1253
                    
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.Stripe.PaymentMethods" Version="4.0.1253" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Stripe.PaymentMethods" Version="4.0.1253" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Stripe.PaymentMethods" />
                    
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.Stripe.PaymentMethods --version 4.0.1253
                    
#r "nuget: Soenneker.Stripe.PaymentMethods, 4.0.1253"
                    
#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 Soenneker.Stripe.PaymentMethods@4.0.1253
                    
#: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=Soenneker.Stripe.PaymentMethods&version=4.0.1253
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Stripe.PaymentMethods&version=4.0.1253
                    
Install 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

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

Create, retrieve, update, attach, detach, and auto-page through Stripe payment methods with customer and type filtering.

Installation

dotnet add package Soenneker.Stripe.PaymentMethods

Configuration

{
  "Stripe": {
    "SecretKey": "sk_test_..."
  }
}

Usage

using Soenneker.Stripe.Enums.PaymentMethodTypes;
using Soenneker.Stripe.PaymentMethods.Abstract;
using Soenneker.Stripe.PaymentMethods.Registrars;
using Stripe;

services.AddStripePaymentMethodsUtilAsScoped();

List<PaymentMethod>? cards = await paymentMethodsUtil.GetAllByUserIdAndType(
    "cus_...",
    StripePaymentMethodType.Card,
    cancellationToken);

PaymentMethod? defaultCard = await paymentMethodsUtil.GetFirstByUserIdAndType(
    "cus_...",
    StripePaymentMethodType.Card,
    cancellationToken);

await paymentMethodsUtil.Attach(
    "pm_...",
    new PaymentMethodAttachOptions { Customer = "cus_..." },
    cancellationToken: cancellationToken);

GetAll, GetAllByUserIdAndType, and GetAllByUserIdAndTypes follow Stripe pagination and materialize every result, so use them carefully for large accounts. Despite its historical name, Delete detaches the payment method from its customer; it does not erase the payment method object from Stripe.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Soenneker.Stripe.PaymentMethods:

Package Downloads
Soenneker.Stripe.Suite

Bundle and register Soenneker's Stripe customer, payment, invoice-item, and subscription libraries.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.1254 120 10/1/2026
4.0.1253 55 10/1/2026
4.0.1252 88 9/30/2026
4.0.1251 155 9/29/2026
4.0.1250 80 9/29/2026
4.0.1249 164 9/26/2026
4.0.1248 104 9/26/2026
4.0.1247 133 9/25/2026
4.0.1246 93 9/25/2026
4.0.1245 128 9/24/2026
4.0.1244 88 9/24/2026
4.0.1243 334 9/17/2026
4.0.1242 133 9/16/2026
4.0.1241 119 9/16/2026
4.0.1240 96 9/16/2026
4.0.1239 120 9/16/2026
4.0.1238 94 9/16/2026
4.0.1237 146 9/15/2026
4.0.1235 200 9/13/2026
4.0.1234 109 9/13/2026
Loading failed

Updated Multiple NuGet packages