MaxiPago 3.0.17

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

MaxiPago SDK client

The MaxiPago gateway SDK for .NET projects

GitHub license

MaxiPago


CI/CD

Build status Last commit Tests Coverage Code Smells LoC
Build status GitHub last commit AppVeyor tests (branch) Coverage Code Smells Lines of Code

Code Quality (main branch)

Codacy Badge Codacy Badge

codecov CodeFactor

Quality Gate Status Maintainability Rating

Technical Debt Duplicated Lines (%)

Reliability Rating Security Rating

Bugs Vulnerabilities


Features

Implements all features of MaxiPago API available at Integration Documentation

  • Add customer
  • Delete customer
  • Update customer
  • Add card on file
  • Delete card on file
  • Cancel recurring
  • Sale (with card data)
  • Sale (with saved card)
  • Sale (with card data, saving the card for future use)
  • Auth (with card data)
  • Auth (with saved card)
  • Auth (with card data, saving the card for future use)
  • Boleto (bank slip / bank bill - Brazil only!)
  • Capture (capture a pre auth request)
  • Return
  • Void
  • Recurring (with card data)
  • Recurring (with saved card)
  • Online Debit (Brazil only!)
  • Transactions report
  • Transaction detailed report
  • Transaction detailed report by order id
  • Check request status

Usage

Adding a customer


//For each environment (TEST and LIVE) this information is different!
var merchantId = "your-merchant-id"; //get this information with MaxiPago
var merchantKey = "your-merchant-key"; //get this information with MaxiPago

var api = new Api { Environment = "TEST" }; //TEST or LIVE
var response = api.AddConsumer(
    MerchantId,
    MerchantKey,
    userIdInYourSystem,
    firstName,
    lastName,
    addressLineOne, //if you don't has this information, use null instead
    addressLineTwo, //if you don't has this information, use null instead
    city, //if you don't has this information, use null instead
    state, //if you don't has this information, use null instead
    zipCode, //if you don't has this information, use null instead
    phone, //if you don't has this information, use null instead
    email,
    dateOfBirth, //if you don't has this information, use null instead
    document,
    gender); //M for Male and F for Female

if(!string.IsNullOrWhiteSpace(response.ErrorMessage))
    //handle the error message.
return response.Result.CustomerId; //store this customer id value for update or delete the customer in future.

Delete customer


//For each environment (TEST and LIVE) this information is different!
var merchantId = "your-merchant-id"; //get this information with MaxiPago
var merchantKey = "your-merchant-key"; //get this information with MaxiPago

var api = new Api { Environment = "TEST" }; //TEST or LIVE

var response = api.DeleteCustomer(merchantId, merchantKey, customerId); //this information was returned by the AddCustomer method.
if(!string.IsNullOrWhiteSpace(response.ErrorMessage))
    //handle the error message.

Update customer


//For each environment (TEST and LIVE) this information is different!
var merchantId = "your-merchant-id"; //get this information with MaxiPago
var merchantKey = "your-merchant-key"; //get this information with MaxiPago

var api = new Api { Environment = "TEST" }; //TEST or LIVE

var response = api.UpdatedCustomer(
    merchantId,
    merchantKey,
    customerId,
    userIdOnYourSystem,
    firstName,
    lastName,
    null,
    null,
    null,
    null,
    null,
    "+5511123456789", //updates the telephone
    email,
    null,
    null,
    "M");

if(!string.IsNullOrWhiteSpace(response.ErrorMessage))
    //handle the error message.

Save card


//For each environment (TEST and LIVE) this information is different!
var merchantId = "your-merchant-id"; //get this information with MaxiPago
var merchantKey = "your-merchant-key"; //get this information with MaxiPago

var api = new Api { Environment = "TEST" }; //TEST or LIVE

var response = api.AddCardOnFile(
    merchantId,
    merchantKey,
    customerId,
    creditCardNumber,
    expirationMonth,
    expirationYear,
    billingName,
    billingAddressLineOne,
    billingAddressLineTwo,
    billingCity,
    billingState,
    billingZip,
    billingCountry,
    billingPhone,
    billingEmail,
    onFileEndDate, //Deadline to keep the card in the base
    onFilePermission, //Limit duration for the use of the saved card. "ongoing" = indefinitely / "use_once" = only once after the 1st payment
    onFileComment,
    onFileMaxChargeAmount); //Maximum amount that this card is authorized to be charged.

if(!string.IsNullOrWhiteSpace(response.ErrorMessage))
    //handle the error message.
return response.Result.Token; //store this token for future use (remove card, sale, auth...)

Create recurring payment


//For each environment (TEST and LIVE) this information is different!
var merchantId = "your-merchant-id"; //get this information with MaxiPago
var merchantKey = "your-merchant-key"; //get this information with MaxiPago

var transaction = new Transaction { Environment = "TEST" }; //TEST or LIVE

var response = transaction.Recurring(
        merchantId,
        merchantKey,
        transactionId,
        value,
        creditCardNumber,
        expirationMonth,
        expirationYear,
        null,
        creditCardSecureCode,
        processorId, //TEST SIMULATOR = 1 | Rede = 2 | GetNet = 3 | Cielo = 4 | TEF = 5 | Elavon = 6 | ChasePaymentech = 8 
        6, //installments
        "N", //charge interest
        ipAddress,
        "new",
        startDate, //the date of first charge
        frequency, //combined with period, so if frequency is 1, every "period" will be charged. So if period is "weekly" and frequency is "2", every two weeks will be charged.
        period, //The charge recurring period: daily, weekly, monthly
        numberOfTimes, //The number of times to repeat the charge (use 999 as max value for "indefinitely" time, after 999 times, this recurring will need to be created again).
        failureThreshold, //Number of failed attempts needed to trigger email notification to merchant.
        "BRL"); //currency of the charge.

if(response.IsErrorResponse){
    if(response is ErrorResponse errorResult)
        Console.WriteLine(errorResult.ErrorMsg); //handle the error message.
}
if(!(response is TransactionResponse result))
    //some other erro, handle it

var orderId = result.OrderId;
var responseCode = result.ResponseCode;
if(responseCode != 0) {
    Console.WriteLine(result.ErrorMessage); //handle it

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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
3.0.781 84 10/27/2025
3.0.778 80 10/27/2025
3.0.773 161 10/20/2025
3.0.768 195 10/6/2025
3.0.765 171 9/29/2025
3.0.762 217 9/22/2025
3.0.759 263 9/15/2025
3.0.756 184 9/8/2025
3.0.753 168 9/8/2025
3.0.748 197 9/3/2025
3.0.745 224 8/29/2025
3.0.740 196 8/29/2025
3.0.735 313 8/25/2025
3.0.726 179 8/18/2025
3.0.719 263 8/7/2025
3.0.716 535 7/24/2025
3.0.713 526 7/24/2025
3.0.706 183 7/14/2025
3.0.702 181 7/14/2025
3.0.698 217 6/20/2025
3.0.694 269 6/9/2025
3.0.687 217 5/26/2025
3.0.680 201 5/19/2025
3.0.674 207 5/5/2025
3.0.669 234 4/29/2025
3.0.654 476 3/24/2025
3.0.651 203 2/24/2025
3.0.648 190 2/17/2025
3.0.645 176 2/10/2025
3.0.639 202 1/21/2025
3.0.636 146 1/13/2025
3.0.633 119 1/13/2025
3.0.630 110 1/13/2025
3.0.625 117 1/13/2025
3.0.616 165 1/6/2025
3.0.613 139 1/6/2025
3.0.604 171 12/23/2024
3.0.601 166 12/23/2024
3.0.598 180 12/9/2024
3.0.595 181 11/25/2024
3.0.590 170 11/18/2024
3.0.587 176 10/28/2024
3.0.583 174 10/14/2024
3.0.580 173 10/3/2024
3.0.577 166 10/3/2024
3.0.572 181 9/23/2024
3.0.569 232 9/16/2024
3.0.566 182 9/9/2024
3.0.563 170 9/9/2024
3.0.558 201 9/2/2024
3.0.555 181 8/28/2024
3.0.547 174 8/28/2024
3.0.544 164 8/27/2024
3.0.537 177 8/26/2024
3.0.528 228 8/24/2024
3.0.522 183 8/19/2024
3.0.519 184 8/12/2024
3.0.516 172 8/5/2024
3.0.504 192 7/15/2024
3.0.501 190 7/15/2024
3.0.496 171 7/8/2024
3.0.493 209 7/3/2024
3.0.489 200 6/16/2024
3.0.484 176 6/16/2024
3.0.481 192 6/16/2024
3.0.476 194 5/27/2024
3.0.473 178 5/27/2024
3.0.468 178 5/27/2024
3.0.461 189 5/19/2024
3.0.457 196 5/14/2024
3.0.454 189 4/30/2024
3.0.451 216 4/30/2024
3.0.444 194 4/29/2024
3.0.435 163 4/22/2024
3.0.432 170 4/22/2024
3.0.427 197 4/22/2024
3.0.422 187 4/15/2024
3.0.419 189 4/15/2024
3.0.414 193 4/8/2024
3.0.411 259 3/18/2024
3.0.408 294 2/26/2024
3.0.405 298 2/20/2024
3.0.401 333 2/19/2024
3.0.389 331 2/14/2024
3.0.386 296 2/14/2024
3.0.380 347 2/12/2024
3.0.377 291 2/12/2024
3.0.372 411 1/30/2024
3.0.369 348 1/29/2024
3.0.364 366 1/29/2024
3.0.356 369 1/22/2024
3.0.353 371 1/22/2024
3.0.350 376 1/22/2024
3.0.343 393 1/16/2024
3.0.340 401 1/16/2024
3.0.335 420 1/15/2024
3.0.328 420 1/8/2024
3.0.325 408 12/25/2023
3.0.322 396 12/25/2023
3.0.317 431 12/18/2023
3.0.297 447 12/14/2023
3.0.291 474 12/11/2023
3.0.288 445 12/11/2023
3.0.283 462 12/11/2023
3.0.280 473 12/11/2023
3.0.271 488 12/4/2023
3.0.268 499 12/4/2023
3.0.263 418 11/27/2023
3.0.260 405 11/20/2023
3.0.255 439 11/20/2023
3.0.250 434 11/20/2023
3.0.243 448 11/14/2023
3.0.238 467 11/14/2023
3.0.235 415 11/13/2023
3.0.230 384 11/9/2023
3.0.224 402 11/6/2023
3.0.221 458 11/6/2023
3.0.216 453 10/30/2023
3.0.213 457 10/30/2023
3.0.206 537 10/23/2023
3.0.203 507 10/16/2023
3.0.200 496 10/16/2023
3.0.195 475 10/16/2023
3.0.188 499 10/8/2023
3.0.179 529 9/23/2023
3.0.176 553 9/19/2023
3.0.173 557 9/19/2023
3.0.168 539 9/19/2023
3.0.152 517 9/12/2023
3.0.149 581 9/12/2023
3.0.144 562 9/4/2023
3.0.141 634 8/24/2023
3.0.138 612 8/14/2023
3.0.135 656 8/14/2023
3.0.132 562 8/14/2023
3.0.123 613 8/14/2023
3.0.118 604 8/8/2023
3.0.115 624 7/23/2023
3.0.112 610 7/23/2023
3.0.102 643 7/23/2023
3.0.98 615 7/23/2023
3.0.96 620 7/23/2023
3.0.76 627 7/19/2023
3.0.70 746 7/14/2023
3.0.65 642 7/14/2023
3.0.62 610 7/13/2023
3.0.59 657 7/11/2023
3.0.56 535 7/11/2023
3.0.51 625 7/3/2023
3.0.48 615 6/19/2023
3.0.47 661 6/15/2023
3.0.44 599 6/5/2023
3.0.43 624 6/5/2023
3.0.40 587 6/5/2023
3.0.35 626 5/22/2023
3.0.32 595 5/22/2023
3.0.25 644 5/4/2023
3.0.22 663 5/3/2023
3.0.17 744 4/8/2023
3.0.11 659 4/4/2023
3.0.6 842 3/26/2023
3.0.2 673 3/26/2023
2.0.95 734 3/26/2023
2.0.80 591 3/26/2023
2.0.73 707 3/26/2023
2.0.70 688 3/22/2023
2.0.65 802 3/5/2023
2.0.61 713 3/3/2023
2.0.58 731 3/3/2023
2.0.50 691 3/3/2023
2.0.0 757 2/27/2023
1.0.49 1,432 4/18/2020
1.0.41 1,062 4/18/2020
1.0.24 1,080 4/18/2020

Add support to .NET Standard 2.0