Skip to content

πŸš€ A modern .NET SDK for Paddle API, supporting .NET Standard 2.0/2.1. Seamlessly integrate payments, subscriptions, and billing into your .NET applications with full type safety and async support.

License

Notifications You must be signed in to change notification settings

yazilimacademy/paddle-wrapper

Repository files navigation

PaddleWrapper Logo

PaddleWrapper

πŸš€ A modern, powerful, and developer-friendly .NET SDK for Paddle API. Accelerate your development process with type-safe API design, comprehensive documentation, and rich feature set.

NuGet Downloads License

Features

  • βš„1οΏ½7 Async/await first design
  • πŸ› οΈ„1οΏ½7 Built with modern C# features
  • 🎯 Full support for Paddle API v2
  • πŸ“ Comprehensive XML documentation
  • 🌐 Supports both .NET Standard 2.0 and 2.1
  • πŸ”’ Type-safe API with full IntelliSense support
  • πŸ“¦ No external dependencies except System.Text.Json

Installation

Install via NuGet Package Manager:

Install-Package PaddleWrapper

Or via .NET CLI:

dotnet add package PaddleWrapper

Quick Start

// Initialize the client
var client = new PaddleClient("your-api-key");

// List all products
var products = await client.Products.ListAsync();

// Get a specific product
var product = await client.Products.GetAsync("prod_123");

// Create a new customer
var customer = await client.Customers.CreateAsync(new Customer 
{
    Email = "customer@example.com",
    Name = "John Doe"
});

// Create a subscription
var subscription = await client.Subscriptions.CreateAsync(new Subscription 
{
    CustomerId = customer.Id,
    Items = new[] 
    {
        new SubscriptionItem 
        {
            PriceId = "pri_123",
            Quantity = 1
        }
    }
});

Supported APIs

  • βœ„1οΏ½7 Products API
  • βœ„1οΏ½7 Prices API
  • βœ„1οΏ½7 Customers API
  • βœ„1οΏ½7 Transactions API
  • βœ„1οΏ½7 Subscriptions API
  • βœ„1οΏ½7 Webhooks API
  • βœ„1οΏ½7 Notifications API
  • βœ„1οΏ½7 Discounts API
  • βœ„1οΏ½7 Addresses API
  • βœ„1οΏ½7 Businesses API

Detailed Usage Examples

Working with Products

// List all products
var products = await client.Products.ListAsync();

// Get a specific product
var product = await client.Products.GetAsync("prod_123");

// Create a new product
var newProduct = await client.Products.CreateAsync(new Product 
{
    Name = "My Product",
    Description = "Product description"
});

// Update a product
var updatedProduct = await client.Products.UpdateAsync("prod_123", product);

Working with Subscriptions

// Create a subscription
var subscription = await client.Subscriptions.CreateAsync(new Subscription 
{
    CustomerId = "ctm_123",
    Items = new[] 
    {
        new SubscriptionItem 
        {
            PriceId = "pri_123",
            Quantity = 1
        }
    }
});

// Pause a subscription
await client.Subscriptions.PauseAsync("sub_123");

// Resume a subscription
await client.Subscriptions.ResumeAsync("sub_123");

// Cancel a subscription
await client.Subscriptions.CancelAsync("sub_123");

Error Handling

try 
{
    var product = await client.Products.GetAsync("prod_123");
} 
catch (HttpRequestException ex) 
{
    // Handle API errors
    Console.WriteLine($"API error: {ex.Message}");
}

Target Frameworks

  • .NET Standard 2.0
  • .NET Standard 2.1

This means the library can be used in:

  • .NET Core 2.0+
  • .NET 5+
  • .NET Framework 4.6.1+
  • Xamarin.iOS 10.14+
  • Xamarin.Mac 3.8+
  • Xamarin.Android 8.0+
  • Universal Windows Platform 10.0.16299+
  • Unity 2018.1+

Contributing

Contributions are welcome! Feel free to submit a Pull Request. Please read our Contributing Guidelines before submitting a PR.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by official Paddle SDKs for other languages
  • Thanks to Paddle for their excellent API documentation

Support

If you encounter any issues or need help, please:

  1. Search in existing issues
  2. Create a new issue if your problem is not addressed yet

Disclaimer

This is an unofficial SDK and is not affiliated with, maintained, authorized, endorsed or sponsored by Paddle.

About

πŸš€ A modern .NET SDK for Paddle API, supporting .NET Standard 2.0/2.1. Seamlessly integrate payments, subscriptions, and billing into your .NET applications with full type safety and async support.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Languages