Advanced integrations - Checkout Pro - Mercado Pago Developers
Developers
API Reference
Support
Sign in

    Home

    Getting started

    Online Payments

    Checkout Pro

    Checkout API

    Payment Link

    Marketplace

    Mobile Checkout

    Web Tokenize Checkout

    In person payments

    QR Code

    Plugins and platforms

    WooCommerce

    Prestashop

    Magento 2

    Shopify

    Tiendanube

    VTEX

    SDKs

    Notifications

    Webhooks

    IPN

    Account Management

    Requirements for production environment

    Get payments

    Reports

    Cashback and Cancellations

    Chargeback Management

    Improves approval

    Resources

    Localization

    Changelog

    Status

IN THIS PAGE

Suggest edit
Help us improve the documentation
Did you see wrong information and would you like us to explain something else or improve our manuals? Please leave your suggestions on GitHub.

Advanced Integration

Receive Payment Notifications

IPN (Instant Payment Notification) notifications are the automatic form of notice of the creation of new payments and updates of their status. For example if they were approved, rejected or if they are pending. They allow you to manage your stock and keep your system in sync.

Receive IPN notifications

Additional information for the preference

Improve the approval of payments and the experience of your buyers by adding information in your preference.

We recommend detailing all possible information about the item and the buyer.

Buyer Details

  • php
  • node
  • java
  • ruby
  • csharp
          
<?php
  // ...
  $payer = new MercadoPago\Payer();
  $payer->name = "Charles";
  $payer->surname = "Luevano";
  $payer->email = "charles@hotmail.com";
  $payer->date_created = "2018-06-02T12:58:41.425-04:00";
  $payer->phone = array(
    "area_code" => "",
    "number" => "949 128 866"
  );
  
  $payer->identification = array(
    "type" => "DNI",
    "number" => "12345678"
  
  );
  $payer->address = array(
    "street_name" => "Cuesta Miguel Armendáriz",
    "street_number" => 1004,
    "zip_code" => "11020"
  );
  // ...
?>

        
          
// ...
var payer = {
  name: "Charles",
  surname: "Luevano",
  email: "charles@hotmail.com",
  date_created: "2015-06-02T12:58:41.425-04:00",
  phone: {
    area_code: "",
    number: "949 128 866"
  },
  
  identification: {
    type: "DNI",
    number: "12345678"
  
  },
  address: {
    street_name: "Cuesta Miguel Armendáriz",
    street_number: "1004",
    zip_code: "11020"
  }
}
// ...

        
          
// ...
Payer payer = new Payer();
payer.setName("Charles")
     .setSurname("Luevano")
     .setEmail("charles@hotmail.com")
     .setDateCreated("2018-06-02T12:58:41.425-04:00")
     .setPhone(new Phone()
        .setAreaCode("")
        .setPhoneNumber("949 128 866"))
        
     .setIdentification(new Identification()
        .setType("DNI")
        .setNumber("12345678"))
        
     .setAddress(new Address()
        .setStreetName("Cuesta Miguel Armendáriz")
        .setBuildingNumber("1004")
        .setZipCode("11020"));
// ...

        
          
# ...
payer = MercadoPago::Payer.new({
  name: "Charles"
  surname: "Luevano"
  email: "charles@hotmail.com"
  date_created: Time.now
  phone: MercadoPago::Phone.new({
    area_code: "",
    number: "949 128 866"
  })
  
  identification: MercadoPago::Identification.new({
    type: "DNI",
    number: "12345678"
  })
  
  address: MercadoPago::Address.new ({
    street_name: "Cuesta Miguel Armendáriz",
    street_number: "1004",
    zip_code: "11020"
  })
})
# ...

        
          
using MercadoPago;
using MercadoPago.Resources;
using MercadoPago.DataStructures.Preference;
// ...
Payer payer = new Payer()
{
    Name = "Charles",
    Surname = "Luevano",
    Email = "charles@hotmail.com",
    Phone = new Phone()
    {
        AreaCode = "",
        Number = "949 128 866"
    },
    
    Identification = new Identification()
    {
        Type = "DNI",
        Number = "12345678"
    },
    
    Address = new Address()
    {
        StreetName = "Cuesta Miguel Armendáriz",
        StreetNumber = int.Parse("1004"),
        ZipCode = "11020"
    }
};
// ...

        

Item Details

  • php
  • node
  • java
  • ruby
  • csharp
          
<?php
  $item = new MercadoPago\Item();
  $item->id = "1234";
  $item->title = "Heavy Duty Plastic Table";
  $item->description = "Table is made of heavy duty white plastic and is 96 inches wide and 29 inches tall";
  $item->category_id = "home";
  $item->quantity = 7;
  $item->currency_id = "COP";
  $item->unit_price = 75.56;
  // ...
?>

        
          
// ...
items: [
    {
      id: '1234',
      title: 'Lightweight Paper Table',
      description: 'Inspired by the classic foldable art of origami',
      category_id: 'home',
      quantity: 3,
      currency_id: 'COP',
      unit_price: 55.41
    }
  ]// ...

        
          
// ...
Item item = new Item();
item.setId("1234")
    .setTitle("Lightweight Paper Table")
    .setDescription("Inspired by the classic foldable art of origami")
    .setCategoryId("home")
    .setQuantity(3)
    .setCurrencyId("COP")
    .setUnitPrice((float) 55.41);
// ...

        
          
# ...
item = MercadoPago::Item.new({
  id: "1234",
  title: "Lightweight Paper Table",
  description: "Inspired by the classic foldable art of origami",
  category_id: "home",
  quantity: 3,
  currency_id: "COP",
  unit_price: 55.41
})# ...

        
          
// ...
preference.Items.Add(
  new Item()
  {
    Id = "1234",
    Title = "Lightweight Paper Table",
    Description = "Inspired by the classic foldable art of origami",
    CategoryId = "home",
    Quantity = 3,
    CurrencyId = "COP",
    UnitPrice = (float)55.41
  }
);
// ...

        
You can find the list of categories for your item in the following link. If you cannot find the category of your product, send the value others as category_id.

Return URL

At the end of the payment process you have the option to redirect the buyer to your website. In order to do this you need to add the back_urls attribute and define where you want the return to site button to redirect the buyer depending on the payment status.

If you want this redirection to be made automatically you need to also add the auto_return attribute with value approved.

Note
Note that the auto_return only works for redirect and mobile mode. It does not work for modal mode since the buyer stays on your website.

autoreturn

AttributeDescription
auto_returnAutomatically redirect to your site when the payment is successful. Possible value is approved.
back_urlssuccess. Return URL for approved payment.

pending. Return URL for pending payment.

failure. Return URL for canceled payment.

Through the back_urls the following parameters will return:

ParameterDescription
payment_idPayment ID of Mercado Pago.
statusPayment status. For example: approved for an approved payment or pending for a pending payment.
external_referenceValue that you sent when creating the payment preference.
merchant_order_idPayment order ID created in Mercado Pago.
The information of the parameters will depend on the finalization of the payment at the Checkout Pro and on the fact that the flow has not been abandoned before returning to your site through the back_urls of failure.
  • php
  • node
  • java
  • ruby
  • csharp
          
<?php
$preference = new MercadoPago\Preference();
//...
$preference->back_urls = array(
    "success" => "https://www.tu-sitio/success",
    "failure" => "http://www.tu-sitio/failure",
    "pending" => "http://www.tu-sitio/pending"
);
$preference->auto_return = "approved";
// ...
?>

        
          
var preference = {}
preference = {
  // ...
  "back_urls": {
        "success": "https://www.tu-sitio/success",
        "failure": "http://www.tu-sitio/failure",
        "pending": "http://www.tu-sitio/pending"
    },
    "auto_return": "approved",
  // ...
}

        
          
Preference preference = new Preference();
// ...
BackUrls backUrls = new BackUrls(
                    "https://www.tu-sitio/success",
                    "http://www.tu-sitio/pending",
                    "http://www.tu-sitio/failure");

preference.setBackUrls(backUrls);
// ...

        
          
preference = MercadoPago::Preference.new
# ...
preference.back_urls = {
  success: "https://www.tu-sitio/success",
  failure: "http://www.tu-sitio/failure",
  pending: "http://www.tu-sitio/pendings"
}
preference.auto_return = "approved"
# ...

        
          
Preference preference = new Preference();
 preference.BackUrls = new BackUrls()
  {
    Success = "https://www.tu-sitio/success",
    Failure = "http://www.tu-sitio/failure",
    Pending = "http://www.tu-sitio/pendings"
  };
  preference.AutoReturn = AutoReturnType.approved;

        

Prevent payment rejection

A payment can be rejected because the issuer for the selected method detected a problem or because of non-compliance with security requirements.

Avoid rejected payments with our recommendations and improve the approval process.

Cancellations and Returns

Cancellations are made when the cash payment was not completed before the expiration date and the seller decides to cancel it. And the returns happen when the payment was made but the seller decides to cancel it totally or partially.

You can find all the information in the Returns and Cancellations section.

Manage Chargebacks

A chargeback occurs when the buyer contacts the entity that issued the card and communicates that they do not recognize the payment. This means that the seller's money for that payment will be withheld from their Mercado Pago account until it is settled.

Manage Chargebacks


Next steps

Other functionalities

Set up your payment and adapt the Checkout Pro to your business.

Customization

Adapt the style of your brand in the shopping experience.

Was this information helpful?

Copyright © 2021 Mercado Pago Colombia Ltda.

Terms and conditionsHow we take care of your privacy
Partners Mercado Pago

Al navegar en este sitio aceptas las cookies que utilizamos para mejorar tu experiencia. Más información.