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.
Keep these aspects in mind before you start integrating:
1. Access to an account
In order to start the integration, it is necessary to have a Mercado Pago or Mercado Libre account.
2. Install 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> sdk-java </artifactId> <version> 1.8.0 </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 on your terminal:
nuget install mercadopago-sdk
The Mercado Pago SDK is available as a pip, to install it you must execute the following code on the command line:
pip3 install mercadopago
3. Have your credentials handy
Your credentials are the keys we provide you to configure your integrations.
To find them, go to the Credentials section.