Coflnet.Payments.Client
0.23.0
dotnet add package Coflnet.Payments.Client --version 0.23.0
NuGet\Install-Package Coflnet.Payments.Client -Version 0.23.0
<PackageReference Include="Coflnet.Payments.Client" Version="0.23.0" />
<PackageVersion Include="Coflnet.Payments.Client" Version="0.23.0" />
<PackageReference Include="Coflnet.Payments.Client" />
paket add Coflnet.Payments.Client --version 0.23.0
#r "nuget: Coflnet.Payments.Client, 0.23.0"
#:package Coflnet.Payments.Client@0.23.0
#addin nuget:?package=Coflnet.Payments.Client&version=0.23.0
#tool nuget:?package=Coflnet.Payments.Client&version=0.23.0
Payments
Handles payments, and access to digital goods and services
Configuration
Configuration is handled via asp.net configuration providers
Keys with defaults are set in appsettings.json
How purchases work
- Start top up
- wait till payment is verified
- (optional) plan purchase (locks some amount of balance)
- purchase product/service
Setup
Becuase it is the esiest by default stripe is used.
To configure stripe get your stripe KEY and SIGNING_SECRET from stripe.com and set them as configuration.
(either modify appsettings.json or set the enviromentvariables STRIPE__KEY and STRIPE__SIGNING_SECRET)
Next create a webhook callback to /Callback/stripe that triggers on confirmed purchase.
Stripe — Minimal API Key Permissions
The Stripe API key (STRIPE__KEY) is used for Checkout Sessions and pre-capture country validation:
| Operation | API Call | Permission |
|---|---|---|
| Create checkout session with manual capture | SessionService.CreateAsync() |
Write |
| List sessions by PaymentIntent | SessionService.ListAsync() |
Read |
| Expire stale sessions | SessionService.ExpireAsync() |
Write |
| Read card country and capture/cancel authorization | PaymentIntentService |
Read & Write |
Webhook verification uses the signing secret. The PaymentIntent is retrieved after authorization so the issuing-card country can be checked before funds are captured and coins are credited.
Restricted key: Enable Checkout Sessions → Read & Write and Payment Intents → Read & Write.
CoinGate country verification
CoinGate requests must set TopUpOptions.Country from an explicit user selection and
TopUpOptions.UserIp from the trusted ingress. The service looks up the IP country using
IP_COUNTRY__BASE_URL (default: https://ipapi.co/) and creates the order only when both
ISO country codes match and the country is eligible.
Paypal
Paypal can be configured with PAYPAL__SECRET, PAYPAL__ID and PAYPAL__IS_SANDBOX
Create a webhook callback to /Callback/paypal to allow for payments to be verified.
PayPal — Minimal API Permissions
PayPal uses the Orders API v2 (PayPalCheckoutSdk). The REST API app credentials (PAYPAL__ID / PAYPAL__SECRET) are used for three operations:
| Operation | API Call | Permission |
|---|---|---|
| Create order | OrdersCreateRequest |
Accept payments |
| Capture order (complete payment) | OrdersCaptureRequest |
Accept payments |
| Get order details | OrdersGetRequest |
Accept payments |
The code handles these webhook events (no API key needed — events carry their own data):
CHECKOUT.ORDER.APPROVED→ triggers capturePAYMENT.CAPTURE.COMPLETED→ updates transaction referencePAYMENT.CAPTURE.REFUNDED→ reverts purchase locally
No PayPal Payouts, Disputes, Subscriptions, Invoicing, Vault, or Transaction Search APIs are used.
Live app features: In the PayPal Developer Dashboard, enable only the "Accept payments" feature for the live REST API app. Disable Payouts, Customer disputes, Transaction search, Invoicing, Subscriptions, Partner referrals, Vault, and Webhooks management.
Events
This microservice can produce transaction events into a Kafka Topic.
To configure it set the configuration variables KAFKA_HOST and KAFKA__TRANSACTION_TOPIC__NAME.
The format and fields of the events can be seen in the TransactionEvent class
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
-
net8.0
- JsonSubTypes (>= 2.0.1)
- Newtonsoft.Json (>= 13.0.3)
- Polly (>= 8.1.0)
- RestSharp (>= 112.0.0)
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 |
|---|---|---|
| 0.23.0 | 42 | 7/25/2026 |
| 0.22.0 | 823 | 4/8/2026 |
| 0.21.0 | 1,023 | 2/8/2026 |
| 0.20.0 | 607 | 1/4/2026 |
| 0.19.0 | 742 | 11/30/2025 |
| 0.18.1 | 521 | 10/31/2025 |
| 0.18.0 | 305 | 10/30/2025 |
| 0.17.3 | 274 | 10/29/2025 |
| 0.17.2 | 273 | 10/29/2025 |
| 0.17.1 | 278 | 10/28/2025 |
| 0.17.0 | 270 | 10/28/2025 |
| 0.16.1 | 4,148 | 10/31/2024 |
| 0.16.0 | 761 | 10/9/2024 |
| 0.15.0 | 490 | 10/5/2024 |
| 0.14.0 | 836 | 8/27/2024 |
| 0.13.0 | 1,599 | 6/15/2024 |
| 0.12.1 | 944 | 4/24/2024 |
| 0.12.0 | 2,367 | 10/14/2023 |
| 0.11.2 | 2,233 | 2/13/2023 |
| 0.11.1 | 446 | 2/11/2023 |
Minor update