Procharge.Core 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package Procharge.Core --version 1.0.6
                    
NuGet\Install-Package Procharge.Core -Version 1.0.6
                    
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="Procharge.Core" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Procharge.Core" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Procharge.Core" />
                    
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 Procharge.Core --version 1.0.6
                    
#r "nuget: Procharge.Core, 1.0.6"
                    
#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 Procharge.Core@1.0.6
                    
#: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=Procharge.Core&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Procharge.Core&version=1.0.6
                    
Install as a Cake Tool

version net8 sdk Downloads License

Procharge.Core C# API

If you are interested in processing payments with Electronic Payments click here Merchant Signup to start the process.

A .NET 8 client to process sales, authorizations, ticket captures, voids, refunds and balance inquiries with the Procharge API.

Requirements

Use of the Procharge.Core API requires:

  • .NET 8

Installation

The package needs to be configured with your account's application key and user login credentials, which is available in the Procharge Gateway.

Additional documentation can be found here Procharge API Documentation which contains examples and schema information under the Card Transactions section.

All the below examples are using an invalid merchant number and credit card and are for documentation purposes only so be sure to enter valid information when invoking the client.

Within the Procharge API Documentation there is a list of mock card numbers you can use for sandbox testing.

PM> Install-Package procharge

API Reference

Methods

Gift Cards

Request Access Token

using Procharge.Core;
                
try
{
    Options opts = new Options { env = Procharge.Environment.Development };

    Credentials creds = new Credentials { userName = "johndoe", passWord = "Test1234", pin = "12345678", application = "your app name here" };
    Client client = new Client(opts);

    AuthResponse respone = await client.getAccessToken(creds, opts);

    Console.WriteLine(respone.access_token);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Request Access Token Response

{
    "access_token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRGllZ28gR2lsIiwidXNlcm5hbWUiOiJqb2huZG9lIiwicm9sZXMiOlsidXNlcnMiLCJwcm9jaGFyZ2UiXSwidXNlciI6eyJhY2Nlc3NfdG9rZW4iOiIiLCJyZWZyZXNoX3Rva2VuIjoiIiwiYnVzaW5lc3NOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiZmlyc3ROYW1lIjoiRGllZ28iLCJsYXN0TmFtZSI6IkdpbCIsImdyb3VwcyI6WyJ1c2VycyIsInByb2NoYXJnZSJdLCJlbWFpbCI6ImRpZWdvQGVsZWN0cm9uaWNwYXltZW50cy5jb20iLCJtZXJjaGFudE51bWJlciI6Ijg4OTkwMTU1MDU5NDcwMiIsInBheW1lbnRHYXRld2F5SUQiOiI1IiwibWVyY2hhbnRJRCI6MTM2NDQ3NzYsInByb2ZpbGVJRCI6MTcxNDk4MDYsInByb2ZpbGVOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiYWNxdWlyZXJJRCI6IjQxMTc2MyIsInRlcm1pbmFsSUQiOiJQUk9DSEcwMiIsImNyZWF0ZWREYXRlIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwibGFzdExvZ2luIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwiaW5kdXN0cnlUeXBlIjo2fSwiaXNSZWZyZXNoVG9rZW4iOmZhbHNlLCJpYXQiOjE3MzIwMTk2MDMsImV4cCI6MTczMjA3NzIwM30.pR2LI9PkvDmizHSTNnRvjwz3IGv_45l6p0To3Z2EnVw",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRGllZ28gR2lsIiwidXNlcm5hbWUiOiJqb2huZG9lIiwicm9sZXMiOlsidXNlcnMiLCJwcm9jaGFyZ2UiXSwidXNlciI6eyJhY2Nlc3NfdG9rZW4iOiIiLCJyZWZyZXNoX3Rva2VuIjoiIiwiYnVzaW5lc3NOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiZmlyc3ROYW1lIjoiRGllZ28iLCJsYXN0TmFtZSI6IkdpbCIsImdyb3VwcyI6WyJ1c2VycyIsInByb2NoYXJnZSJdLCJlbWFpbCI6ImRpZWdvQGVsZWN0cm9uaWNwYXltZW50cy5jb20iLCJtZXJjaGFudE51bWJlciI6Ijg4OTkwMTU1MDU5NDcwMiIsInBheW1lbnRHYXRld2F5SUQiOiI1IiwibWVyY2hhbnRJRCI6MTM2NDQ3NzYsInByb2ZpbGVJRCI6MTcxNDk4MDYsInByb2ZpbGVOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiYWNxdWlyZXJJRCI6IjQxMTc2MyIsInRlcm1pbmFsSUQiOiJQUk9DSEcwMiIsImNyZWF0ZWREYXRlIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwibGFzdExvZ2luIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwiaW5kdXN0cnlUeXBlIjo2fSwiaXNSZWZyZXNoVG9rZW4iOnRydWUsImlhdCI6MTczMjAxOTYwMywiZXhwIjoxNzMyNjI0NDAzfQ.dD3-SXCX2qV6LrVnizo95VtcYzVpMMGLSrk1hbmirgU",
    "lastLogin": "2024-11-19T12:33:23.839Z"
}

Refresh Token

using Procharge.Core;
                
try
{
    Options opts = new Options { env = Procharge.Environment.Development };
    Client client = new Client(opts);

    AuthResponse respone = await client.getRefreshToken(creds, opts);

    Console.WriteLine(respone.access_token);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Refresh Token Response

{
    "access_token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRGllZ28gR2lsIiwidXNlcm5hbWUiOiJqb2huZG9lIiwicm9sZXMiOlsidXNlcnMiLCJwcm9jaGFyZ2UiXSwidXNlciI6eyJhY2Nlc3NfdG9rZW4iOiIiLCJyZWZyZXNoX3Rva2VuIjoiIiwiYnVzaW5lc3NOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiZmlyc3ROYW1lIjoiRGllZ28iLCJsYXN0TmFtZSI6IkdpbCIsImdyb3VwcyI6WyJ1c2VycyIsInByb2NoYXJnZSJdLCJlbWFpbCI6ImRpZWdvQGVsZWN0cm9uaWNwYXltZW50cy5jb20iLCJtZXJjaGFudE51bWJlciI6Ijg4OTkwMTU1MDU5NDcwMiIsInBheW1lbnRHYXRld2F5SUQiOiI1IiwibWVyY2hhbnRJRCI6MTM2NDQ3NzYsInByb2ZpbGVJRCI6MTcxNDk4MDYsInByb2ZpbGVOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiYWNxdWlyZXJJRCI6IjQxMTc2MyIsInRlcm1pbmFsSUQiOiJQUk9DSEcwMiIsImNyZWF0ZWREYXRlIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwibGFzdExvZ2luIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwiaW5kdXN0cnlUeXBlIjo2fSwiaXNSZWZyZXNoVG9rZW4iOmZhbHNlLCJpYXQiOjE3MzIwMTk2MDMsImV4cCI6MTczMjA3NzIwM30.pR2LI9PkvDmizHSTNnRvjwz3IGv_45l6p0To3Z2EnVw",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiRGllZ28gR2lsIiwidXNlcm5hbWUiOiJqb2huZG9lIiwicm9sZXMiOlsidXNlcnMiLCJwcm9jaGFyZ2UiXSwidXNlciI6eyJhY2Nlc3NfdG9rZW4iOiIiLCJyZWZyZXNoX3Rva2VuIjoiIiwiYnVzaW5lc3NOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiZmlyc3ROYW1lIjoiRGllZ28iLCJsYXN0TmFtZSI6IkdpbCIsImdyb3VwcyI6WyJ1c2VycyIsInByb2NoYXJnZSJdLCJlbWFpbCI6ImRpZWdvQGVsZWN0cm9uaWNwYXltZW50cy5jb20iLCJtZXJjaGFudE51bWJlciI6Ijg4OTkwMTU1MDU5NDcwMiIsInBheW1lbnRHYXRld2F5SUQiOiI1IiwibWVyY2hhbnRJRCI6MTM2NDQ3NzYsInByb2ZpbGVJRCI6MTcxNDk4MDYsInByb2ZpbGVOYW1lIjoiQ3lnbWEgQnJhbmRjZXJ0IiwiYWNxdWlyZXJJRCI6IjQxMTc2MyIsInRlcm1pbmFsSUQiOiJQUk9DSEcwMiIsImNyZWF0ZWREYXRlIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwibGFzdExvZ2luIjoiMjAyNC0xMS0xOVQxMjozMzoyMy44MzlaIiwiaW5kdXN0cnlUeXBlIjo2fSwiaXNSZWZyZXNoVG9rZW4iOnRydWUsImlhdCI6MTczMjAxOTYwMywiZXhwIjoxNzMyNjI0NDAzfQ.dD3-SXCX2qV6LrVnizo95VtcYzVpMMGLSrk1hbmirgU",
    "lastLogin": "2024-11-19T12:33:23.839Z"
}

Sale

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.amount = "0.05";
    transaction.taxAmount = "0.01";
    transaction.tipAmount = "0.00";
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.cardNumber = "5204730000001003";
    transaction.ccExpMonth = "12";
    transaction.ccExpYear = "25";
    transaction.cvv = "100";    // <-- Only set if performing cvv verification
    transaction.aci = "Y";      // <-- Only set if performing avs verification
    transaction.name = "John Doe";
    transaction.street1 = "7305 test street";
    transaction.street2 = "";
    transaction.city = "Omaha";
    transaction.state = "NE";
    transaction.postalCode = "68114";
    transaction.email = "jdoe@widget.com";
    transaction.companyName = "Joes Moving Company";
    transaction.orderNumber = "123456";

    TransactionResponse respone = await client.processSale(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Void Sale

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);
                
    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.transactionID = "429811000636";
    transaction.approvalCode = "097502";

    TransactionResponse respone = await client.voidSale(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Auth Only

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);
                
    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.amount = "0.05";
    transaction.cardNumber = "5204730000001003";
    transaction.ccExpMonth = "12";
    transaction.ccExpYear = "25";
    transaction.cvv = "100";    // <-- Only set if performing cvv verification
    transaction.aci = "Y";      // <-- Only set if performing avs verification
    transaction.name = "John Doe";
    transaction.street1 = "7305 test street";
    transaction.street2 = "";
    transaction.city = "Omaha";
    transaction.state = "NE";
    transaction.postalCode = "68114";
    transaction.email = "jdoe@widget.com";
    transaction.companyName = "Joes Moving Company";
    transaction.orderNumber = "123456";

    TransactionResponse respone = await client.authorizeOnly(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Void Auth Only

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);
               
    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.transactionID = "429811000636";     // <-- Use transactionID returned in original auth only request
    transaction.approvalCode = "097502";            // <-- Use approvalCode returned in original auth only request
    transaction.invoiceID = 447803694;
    transaction.paymentID = 447857739;
    transaction.cardNotPresent = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 

    TransactionResponse respone = await client.voidAuthOnly(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Ticket Completion

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);
        
    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.transactionID = "429811000636";    
    transaction.approvalCode = "097502";
    transaction.invoiceID = 447803694;
    transaction.paymentID = 447857739;
    transaction.cardNotPresent = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.amount = "0.05";
    transaction.taxAmount = "0.01";

    TransactionResponse respone = await client.completeTicket(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Void Ticket

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.transactionID = "429811000636";
    transaction.approvalCode = "097502";
    transaction.cardNotPresent = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 

    TransactionResponse respone = await client.voidTicketOnly(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Refund

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.amount = "0.05";
    transaction.taxAmount = "0.01";
    transaction.tipAmount = "0.00";
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.cardNumber = "5204730000001003";
    transaction.ccExpMonth = "12";
    transaction.ccExpYear = "25";
    transaction.cvv = "100";                // <-- Only set if performing cvv verification
    transaction.aci = "N";                  // <-- No avs verification on refunds

    TransactionResponse respone = await client.processRefund(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Void Refund

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.transactionID = "429811000636";
    transaction.approvalCode = "097502";
    transaction.cardNotPresent = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 

    TransactionResponse respone = await client.voidRefund(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

PrePaid Balance Inquiry

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.cardNumber = "5204730000001003";
    transaction.ccExpMonth = "12";
    transaction.ccExpYear = "25";
    transaction.cvv = "100";
    transaction.amount = "0.00";
    transaction.taxAmount = "0.00";
    transaction.aci = "N";
    transaction.isPurchaseCard = true;
    transaction.cardNotPresent = true;
    transaction.cardTypeIndicator = "P";    // C - Credit, D - Debit, P - Debit PrePaid 

    TransactionResponse respone = await client.prePaidBalanceInquiry(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Validate Card

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isEcommerce = true;
    transaction.amount = "0.00";        // <-- Leave 0.00 amount for validation
    transaction.taxAmount = "0.00";     // <-- Leave 0.00 amount for validation
    transaction.tipAmount = "0.00";
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.aci = "Y";                  // <-- Only set if performing avs verification
    transaction.name = "John Doe";
    transaction.street1 = "7305 test street";
    transaction.postalCode = "68114";

    TransactionResponse respone = await client.validateCard(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

EMV

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isRetail = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.emv = "5F2A020840820258008407A0000000031010950502800080009A031806259C01009F02060000000020009F03060000000000009F0902008C9F100706011203A000009F1A0208409F1E0832343437383135335F24032212319F2608B4E599A67DD0828E9F2701809F3303E0F8C89F34031E03009F3501229F360200029F3704B71461199F4104000006755F340101";
    transaction.aci = "N";

    TransactionResponse respone = await client.processSale(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Swiped Sale

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    Transaction transaction = new Transaction();
    transaction.isRetail = true;
    transaction.cardTypeIndicator = "C";    // C - Credit, D - Debit, P - Debit PrePaid 
    transaction.trackData = "5204730000001003D25122010000000000000";
    transaction.aci = "N";

    TransactionResponse respone = await client.processSale(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Gift Cards

entryMode values

Value Description
-1 OMITTED
0 OTHER
1 MAGNETIC
2 MANUAL
3 BARCODE
4 CONTACTLESS
5 EMV

industryType values

Value Description
0 INACTIVE
1 RETAIL
2 RESTAURANT
3 HOTEL
4 FUEL
10 HOUSE ACCOUNT

Swiped Versus Manual Entry

Swiped entries use the track2 property

transaction.track2 = "6265555707036313=0000"

Manual entries use the cardNo property

transaction.cardNo = "6265555707036313"


Gift Card Activation

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    let transaction: GiftCardTransaction = new GiftCardTransaction();
    transaction.track2 = "6265555707036313=0000";
    transaction.entryMode = "1";
    transaction.industryType = "1"; 

    GiftCardTransactionResponse respone = await client.activateGiftCard(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Redeem Gift Card

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    let transaction: GiftCardTransaction = new GiftCardTransaction();
    transaction.track2 = "6265555707036313=0000";
    transaction.entryMode = "1";
    transaction.industryType = "1";
    transaction.amount = 0.05;

    GiftCardTransactionResponse respone = await client.redeemGiftCard(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Gift Card Balance Transfer

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    let transaction: GiftCardTransaction = new GiftCardTransaction();
    transaction.fromCardNo = "6265555707036313";
    transaction.cardNo = "6609603310096204";
    transaction.entryMode = "2";
    transaction.industryType = "1";
    transaction.amount = 5.00;

    GiftCardTransactionResponse respone = await client.transferGiftCardBalance(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Gift Card Balance Inquiry

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    let transaction: GiftCardTransaction = new GiftCardTransaction();
    transaction.track2 = "6265555707036313=0000";
    transaction.entryMode = "1";
    transaction.industryType = "1";
    transaction.amount = 0.00;

    GiftCardTransactionResponse respone = await client.giftCardBalanceInquiry(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Gift Card Void

using Procharge.Core;

try
{
    Options opts = new Options { env = Procharge.Environment.Development, applicationKey = "<your app key here>", authToken: "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."};
    Client client = new Client(opts);

    let transaction: GiftCardTransaction = new GiftCardTransaction();
    transaction.entryMode = "2";
    transaction.industryType = "1";
    transaction.amount = 1.00;
    transaction.transactionID = "255410";

    GiftCardTransactionResponse respone = await client.voidGiftCardSale(transaction, opts);

    Console.WriteLine(respone);
}            
catch (Exception ex)
{
    Console.WriteLine(ex.Message);
}

Deprecated APIs

  • procharge-api
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.
  • net8.0

    • No dependencies.

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.11 257 6/9/2025
1.0.10 261 6/9/2025
1.0.9 231 6/9/2025
1.0.8 118 2/4/2025
1.0.7 108 2/3/2025
1.0.6 110 2/3/2025
1.0.5 104 11/19/2024
1.0.4 114 11/4/2024
1.0.3 113 11/4/2024
1.0.2 109 11/4/2024
1.0.1 113 10/31/2024
1.0.0 108 10/31/2024