This is 👉 Unofficial Paddle SDK for .NET
‼️ Paddle Billing API ONLY!
SDK designed to provide a developer experience similar to the Paddle Node.js SDK
- Products
- Prices
- Customers
- Customer Portal Sessions
- Businesses
- Addresses
- Subscriptions
- Transactions (no preview api yet)
- Notifications (in progress)
- .NET Version: The SDK is built to support .NET 9.0.
- Credentials: Paddle
API key
.
// Add the Paddle to the services collection
builder.Services.AddPaddleClient(options => {
options.ApiKey = "YOUR_API_KEY";
options.Environment = PaddleEnvironment.Sandbox; // or PaddleEnvironment.Production
});
// Inject the client in your endpoint/controller
app.MapGet("/products", async (IPaddle paddle) => {
var products = await paddle.Products.ListAsync();
return products;
});
// Initialize the Paddle client
var paddle = new Paddle(
apiKey: "YOUR_API_KEY",
environment: PaddleEnvironment.Sandbox // Or PaddleEnvironment.Production
);
// Example: Fetch and display product information
var products = await paddle.Products.ListAsync();
Console.WriteLine("Products:");
foreach (var product in products)
{
Console.WriteLine($"ID: {product.Id}, Name: {product.Name}");
}
// Clean up the client (dispose resources)
paddle.Dispose();
To include the Paddle SDK in your project, add a reference to the SDK package or include it directly in your solution.
- Clone the repository or download it.
- Build the SDK project if not already compiled.
- Add a reference to the SDK DLL in your solution.
Nuget package will be available soon
For detailed information about Paddle's API, visit Paddle API Documentation
Contributions to the Paddle SDK are welcome! If you encounter any issues or have ideas for improvements, feel free to open an issue or submit a pull request.
- Fork this repository.
- Create a new branch for your feature/fix.
- Commit your changes and push them to your branch.
- Open a pull request for review.
This SDK is licensed under the MIT License. See the See the LICENSE.md file for more details. file for more details.
If you encounter any issues or require assistance, you can contact the repository maintainers or refer to Paddle API Documentation for additional guidance.