Prerequisites to get started
We know some terms are new. Before getting started, we'll give you a hand.
|Preference||It is the information of the product or service that you want to offer. Among the most important attributes of a preference are defined: the description, the amount and the items. When generating it, you get the URL to start the payment flow.|
|Credentials||Your credentials are the keys we provide so you can configure your integrations.|
There are two types:
Public Key. Public key of the application to know, for example, the payment methods and encrypt card details. You must use it only for your integrations.
Access Token. Private key of the application to generate payments. You must use it only for your integrations.
To find them, go to your credentials and select the productive ones.
|Initial Point (init_point)||It is the URL obtained at the time of generating the preference and that starts the payment flow of the Checkout Pro.|
|Ítem||It refers to the product or service you want to offer. It can be one or a list.|
|Application||The applications are used to process the seller's payments. Each application identifies a particular integration, since each one has its own credentials. One Mercado Pago account can have multiple applications.|
You can find the information of each one in Credentials. Upon entering, one will be created automatically or you can create an application every time you need one.
To continue, check the necessary prerequisites:
1. Access to the Mercado Pago or Mercado Libre account
In order to start the integration, it is necessary to have a Mercado Pago or Mercado Libre account.. If you don't have one yet, you can create a Mercado Pago account whenever you want.
2. Installations of Mercado Pago SDK
Install the official SDK to simplify your interaction with our APIs.
Install Composer to use the SDK. Then run the following code on the command line:
php composer.phar require "mercadopago/dx-php"
To install the SDK you must execute the following code on the command line of your terminal using npm:
npm install mercadopago
To install the SDK in your Maven project, add the following dependency in your pom.xml file and then run ´maven install´.
<dependency> <groupId> com.mercadopago </groupId> <artifactId> dx-java </artifactId> <version> 1.0.33 </version> </dependency>
The Mercado Pago SDK is available as a gema, to install it you must execute the following code on the command line:
gem install mercadopago-sdk
Use NuGet to install the Mercado Pago SDK .NET. To do this, run the following command in the NuGet Package Manager console:
PM> Install-Package mercadopago-sdk -Version 1.0.57