Aeroverra.PayPalSharp
0.0.1
See the version list below for details.
dotnet add package Aeroverra.PayPalSharp --version 0.0.1
NuGet\Install-Package Aeroverra.PayPalSharp -Version 0.0.1
<PackageReference Include="Aeroverra.PayPalSharp" Version="0.0.1" />
<PackageVersion Include="Aeroverra.PayPalSharp" Version="0.0.1" />
<PackageReference Include="Aeroverra.PayPalSharp" />
paket add Aeroverra.PayPalSharp --version 0.0.1
#r "nuget: Aeroverra.PayPalSharp, 0.0.1"
#:package Aeroverra.PayPalSharp@0.0.1
#addin nuget:?package=Aeroverra.PayPalSharp&version=0.0.1
#tool nuget:?package=Aeroverra.PayPalSharp&version=0.0.1
AeroPayPalSharp
A strict-typed PayPal REST client for modern .NET, with first-class partner / platform (multiparty) support.
Why
The existing .NET options for PayPal are dated and loosely typed, and none cleanly support the partner APIs (acting on behalf of sellers). AeroPayPalSharp is generated from PayPal's official OpenAPI specs and then tightened so responses are actually typed instead of everything-nullable. It wraps all of PayPal's REST APIs behind one injectable client, handles OAuth for you, and makes partner flows (auth assertion, attribution) first-class.
- All of PayPal's REST APIs, one injectable
IPayPalApiClient - Strongly-typed models (enums are strings, so new PayPal values never crash deserialization)
- OAuth2 fetched, cached, and refreshed automatically
- Partner attribution and auth assertion built in, including a clean
ActingAsMerchantscope - .NET 10, Newtonsoft.Json
Install
dotnet add package AeroPayPalSharp
Getting started
Configure and inject (keep the client id / secret in user-secrets or env vars):
services.AddPayPalSharp(options =>
{
options.Environment = PayPalEnvironment.Sandbox; // or Live
options.ClientId = config["PayPal:ClientId"];
options.ClientSecret = config["PayPal:ClientSecret"];
});
Create an order and read it back:
public sealed class Checkout(IPayPalApiClient paypal)
{
public async Task<string> CreateOrder()
{
var order = new Order_request
{
Intent = "CAPTURE",
Purchase_units = new List<Purchase_units>
{
new Purchase_units { Amount = new Amount3 { Currency_code = "USD", Value = "10.00" } },
},
};
Order created = await paypal.Orders.CreateAsync(order, payPal_Request_Id: Guid.NewGuid().ToString("N"));
Order fetched = await paypal.Orders.GetAsync(created.Id);
return fetched.Status; // "CREATED"
}
}
As a partner, acting for a seller
Direct the funds to the seller with payee.merchant_id, and run the call on their behalf with an
ActingAsMerchant scope (it adds the PayPal-Auth-Assertion header for that merchant):
using (paypal.ActingAsMerchant(sellerMerchantId))
{
var order = new Order_request
{
Intent = "CAPTURE",
Purchase_units = new List<Purchase_units>
{
new Purchase_units
{
Amount = new Amount3 { Currency_code = "USD", Value = "10.00" },
Payee = new Payee3 { Merchant_id = sellerMerchantId }, // who gets the money
},
},
};
Order created = await paypal.Orders.CreateAsync(order, payPal_Request_Id: Guid.NewGuid().ToString("N"));
}
Documentation
Everything else lives in the wiki:
- Configuration
- Authentication
- Partner and platform (acting for sellers)
- Multi-tenant: clients from raw credentials
- The clients
- Error handling
- Models and nullability
- Regenerating the clients
- Testing
License
MIT. See LICENSE.md.
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Http (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
- Microsoft.Extensions.Options (>= 10.0.0)
- Newtonsoft.Json (>= 13.0.3)
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 |
|---|---|---|
| 1.0.17 | 130 | 7/7/2026 |
| 0.0.16 | 104 | 7/7/2026 |
| 0.0.15 | 105 | 7/7/2026 |
| 0.0.14 | 104 | 7/7/2026 |
| 0.0.13 | 108 | 7/7/2026 |
| 0.0.12 | 113 | 7/7/2026 |
| 0.0.11 | 111 | 7/7/2026 |
| 0.0.10 | 104 | 7/7/2026 |
| 0.0.9 | 101 | 7/7/2026 |
| 0.0.8 | 102 | 7/6/2026 |
| 0.0.7 | 110 | 7/6/2026 |
| 0.0.6 | 95 | 7/6/2026 |
| 0.0.5 | 106 | 7/6/2026 |
| 0.0.4 | 103 | 7/5/2026 |
| 0.0.3 | 104 | 7/5/2026 |
| 0.0.2 | 104 | 7/5/2026 |
| 0.0.1 | 102 | 7/5/2026 |
| 0.0.0 | 106 | 7/5/2026 |