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
                    
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="Coflnet.Payments.Client" Version="0.23.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Coflnet.Payments.Client" Version="0.23.0" />
                    
Directory.Packages.props
<PackageReference Include="Coflnet.Payments.Client" />
                    
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 Coflnet.Payments.Client --version 0.23.0
                    
#r "nuget: Coflnet.Payments.Client, 0.23.0"
                    
#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 Coflnet.Payments.Client@0.23.0
                    
#: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=Coflnet.Payments.Client&version=0.23.0
                    
Install as a Cake Addin
#tool nuget:?package=Coflnet.Payments.Client&version=0.23.0
                    
Install as a Cake Tool

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

  1. Start top up
  2. wait till payment is verified
  3. (optional) plan purchase (locks some amount of balance)
  4. 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 capture
  • PAYMENT.CAPTURE.COMPLETED → updates transaction reference
  • PAYMENT.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Minor update