This library provides developers with a simple set of bindings to help you integrate Mercado Pago API to a website and start receiving payments.
.net >= 5.0
First time using Mercado Pago? Create your Mercado Pago account, if you donβt have one already.
Using Package Manager
PM> Install-Package MercadoPagoCore -Version 5.0.0
Using .Net CLI
> dotnet add package MercadoPagoCore --version 5.0.0
Using Paket CLI
> paket add MercadoPagoCore --version 5.0.0
Using Package Reference
<PackageReference Include="MercadoPagoCore" Version="5.0.0" />
Copy the access_token in the credentials section of the page and replace YOUR_ACCESS_TOKEN with it.
That's it! MercadoPagoCore SDK has been successfully installed.
Simple usage looks like:
using System;
using System.Threading.Tasks;
using MercadoPago.Client.Payment;
using MercadoPago.Config;
using MercadoPago.Resource.Payment;
MercadoPagoConfig.AccessToken = "YOUR_ACCESS_TOKEN";
var request = new PaymentCreateRequest
{
TransactionAmount = 10,
Token = "CARD_TOKEN",
Description = "Payment description",
Installments = 1,
PaymentMethodId = "visa",
Payer = new PaymentPayerRequest
{
Email = "[email protected]",
}
};
var client = new PaymentClient();
Payment payment = await client.CreateAsync(request);
Console.WriteLine($"Payment ID: {payment.Id}");
Visit our Dev Site for further information regarding:
- Payments APIs: Spanish / Portuguese
- Mercado Pago checkout: Spanish / Portuguese
- Web Tokenize checkout: Spanish / Portuguese
If you require technical support, please contact our support team at developers.mercadopago.com
MIT license. Copyright (c) 2020
For more information, see the LICENSE file.