FonsecaFramework.Visa 2026.5.21.1

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

FonsecaFramework.Visa

VISA REST API integration library for .NET.

Overview

FonsecaFramework.Visa is a .NET Standard 2.1 library that provides clients for the Visa Developer Platform REST APIs. It includes support for Visa Direct (pull and push funds), foreign exchange rate lookups, and an authenticated base client that handles X-Pay Token (HMAC-SHA256) generation automatically.

Installation

dotnet add package FonsecaFramework.Visa

Features

Area Key Classes
Base Client VisaXPayBaseClient — handles HMAC-SHA256 X-Pay Token authentication for all Visa API requests
Visa Direct VisaDirectService — pull funds from a sender card and push funds to a recipient card
Foreign Exchange ForeignExchangeRateClient — retrieve real-time foreign exchange rates
Models CardAcceptor — merchant / payee information, ExchangeRateResult — rate response

Examples

Pull Funds (Visa Direct)

using FonsecaFramework.Visa;

var visaDirect = new VisaDirectService(
    baseUri: "https://sandbox.api.visa.com",
    apiKey: "<your-api-key>",
    apiSecret: "<your-api-secret>");

var payee = new CardAcceptor
{
    Name = "Acme Merchant",
    TerminalId = "TID-001",
    IdCode = "CA-IDCode-77765",
    State = "CA",
    County = "San Mateo",
    Country = "840",
    ZipCode = "94404"
};

string result = await visaDirect.PullFundsAsync(
    senderCardNumber: "4111111111111111",
    amount: "100.00",
    currencyCode: "USD",
    recipientPrimaryAccountNumber: "4957030420210496",
    payee: payee,
    cardType: CardType.VisaCredit);

Console.WriteLine(result);

Push Funds (Visa Direct)

using FonsecaFramework.Visa;

var visaDirect = new VisaDirectService(
    baseUri: "https://sandbox.api.visa.com",
    apiKey: "<your-api-key>",
    apiSecret: "<your-api-secret>");

string result = await visaDirect.PushFundsAsync(
    recipientPrimaryAccountNumber: "4957030420210496",
    amount: "50.00",
    _: "USD");

Console.WriteLine(result);

Get Foreign Exchange Rate

using FonsecaFramework.Visa;

var fxClient = new ForeignExchangeRateClient(
    apiKey: "<your-api-key>",
    sharedSecret: "<your-shared-secret>");

ExchangeRateResult? rate = await fxClient.GetExchangeRateAsync(
    fromCurrency: "USD",
    toCurrency: "EUR");

if (rate != null)
{
    Console.WriteLine($"Rate: {rate.ConversionRate}");
    Console.WriteLine($"{rate.BaseCurrency} -> {rate.DestinationCurrency}");
}

Requirements

  • .NET Standard 2.1 compatible runtime
  • Visa Developer Platform credentials

License

Copyright 2025 Steven Fonseca / VLR Creations

Licensed under the Apache License, Version 2.0. You may use this library free of charge, provided you include the required attribution notices. See the LICENSE file for full terms.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
2026.5.21.1 39 5/22/2026
2026.5.20.1 77 5/20/2026
2026.5.12.1 90 5/13/2026
2026.5.11.1 88 5/11/2026
2026.5.7.2 93 5/7/2026
2026.5.7.1 87 5/7/2026
2026.5.6.1 86 5/6/2026
2026.5.5.1 90 5/5/2026
2026.5.2.1 89 5/2/2026
2026.4.30.1 97 4/30/2026
2026.4.29.1 100 4/29/2026
2026.4.27.1 95 4/28/2026
2026.4.22.1 98 4/22/2026
2026.4.21.1 98 4/21/2026
2026.4.20.1 108 4/20/2026
2026.4.15.1 95 4/15/2026
2026.4.13.1 98 4/13/2026
2026.4.10.1 101 4/10/2026
2026.4.8.1 98 4/8/2026
2026.4.7.1 96 4/7/2026
Loading failed