Mercado Pago

This documentation describes the integration with Mercado Pago payment platform and also explains about the settings that must be made at the Carat Portal environment.

Carat Portal supported Interfaces for integration#

It is possible to use the following interfaces for integration with Mercado Pago routing:

Required credentials#

The merchant must get at the Carat Portal-Portal the credentials listed below, and pass them on to Software Express or register on the Carat Portal-Portal.

ParameterDescriptionRequired
public_keyThe application's public key to know, for example, the means of payment and to encrypt card data.YES
access_tokenApplication private key to generate payments.YES

Authorizer codes#

Below are the codes to be used in this integration:

  • 440: PIX
  • 402: other forms of payment with Mercado Pago

Attention: In Mercado Pago's approval environment, it is not possible to simulate an approved PIX transaction. The transaction will be pending.

Mercado Pago specific parameters#

HTML payment creation service#

Below are the Mercado Pago-specific requisition parameters for the HTML payment creation service:

ParameterDescriptionSizeRequired
additional_dataAdditional transaction data.
application_feeMercado Pago commission amount in cents< 12 NNO
binary_modeBinary approval mode. When set to true, payment can only be approved or denied (not pending).< 5 ANNO
discount_campaign_idDiscount campaign identifier< 1024 ANNO
discount_amountDiscount coupon amount in cents< 12 NNO
acquirer_expiry_datePayment expiration date in format AAAA-MM-DDTHH:MM:SS= 19 ANNO
acquirer_expiry_date_fromDate from which payment initiation will be active in the format AAAA-MM-DDTHH:MM:SS= 19 ANNO
acquirer_expiry_date_toPayment initiation expiration date in the format AAAA-MM-DDTHH:MM:SS= 19 ANNO
acquirer_expiresBoolean indicating if payment initiation expires.< 5 ANNO
descriptionPayment reason or item title< 1024 ANNO
extra_infoAdditional Information< 1024 ANNO
max_installmentsMaximum installments number< 2 NNO
additional_data
.items[]
Shopping cart data. It is required to send at least one item, and the sum of the cart prices must be equal to the total transaction amount (amount field, in the JSON root).
idProduct ID< 1024 ANNO
titleItem name< 1024 ANNO
descriptionItem Description< 1024 ANNO
picture_urlItem Image URL< 1024 ANNO
category_idItem category: art, baby, coupon, donation, computing, camera, video_game, television, car_eletronic, automotive, entertainment, fashion, game, home, musical, phone, service, learning, ticket, travel, virtual_good or other< 1024 ANNO
quantityItem quantity< 7 NSIM
unit_priceItem unit price in cents< 12 NSIM
additional_data
.payer
Customer Data
nameCustomer's name< 1024 ANNO
surnameCustomer's surname< 1024 ANNO
emailCustomer's email.< 1024 ANNO
creation_dateDate of account creation in the format DD/MM/AAAA= 10 ANNO
identification_typeCustomer identification type< 1024 ANNO
identification_numberCustomer identification number< 1024 ANNO
typeType of identification of the associated payer: guest, customer ou registered< 10 ANNO
additional_data
.payer
.phones[]
Customer's phone
dddPhone area code< 1024 ANNO
numberCustomer's phone number< 1024 ANNO
additional_data
.payer
.address
Customer's address
street_nameCustomer's address< 1024 ANNO
street_numberCustomer's address number< 1024 ANNO
zip_codeCustomer's zip code< 1024 ANNO
additional_data
.shipment
Delivery address
modeShipping Mode:
  • custom = Customized
  • me2 = Market shipping
  • not_specified = Not specified
< 1024 ANNO
local_pickupPreference for removing packages in agency (boolean). Just for mode = me2.< 5 ANNO
dimensionsPackage size in cm x cm x cm, gr. Just for mode = me2.< 1024 ANNO
default_shipping_methodChoose a standard shipping method at checkout. Just for mode = me2.< 1024 ANNO
costCost of transportation in cents. Just for mode = custom.< 12 NNO
free_shipmentFree shipping preference (boolean). Just for mode = custom.< 5 ANNO
additional_data
.shipment
.free_methods[]
Offer a free shipping method. Just for mode = me2.
idShipping method identifier< 1024 ANNO
additional_data
.shipment
.address
Delivery address
zip_codeDelivery address zip code< 1024 ANNO
street_numberDelivery address number< 1024 ANNO
street_nameDelivery street name< 1024 ANNO
floorDelivery floor number< 1024 ANNO
apartmentDelivery apartment number< 1024 ANNO
cityDelivery city< 1024 ANNO
stateDelivery state< 1024 ANNO
additional_data
.payment_method
.excluded_payment_methods[]
Payment methods to be excluded from the Mercado Pago payment flow
idPayment method ID to be deleted:
  • debelo = Elo Debit
  • debmaster = Mastercard Debit
  • visa = Visa
  • master = Mastercard
  • hipercard = Hipercard
  • amex = American Express
  • elo = Elo
  • debvisa = Visa Debit
  • pec = Payment in lottery without bank slip
  • bolbradesco = payment slip
< 1024 ANNO
additional_data
.payment_method
.excluded_payment_types[]
Payment types to be excluded from the Mercado Pago payment flow.
idPayment type ID to be deleted: debit_card, credit_card ou ticket.< 1024 ANNO
additional_data
.payment_method
.ad_tracks[]
Tracks that will be executed during user interaction in the Payment flow.
typeTipo da track:
  • google_ad: Set up a Google Ads conversion tracking tag in GTM. Required values: conversion_id e conversion_label.
  • facebook_ad: Allows you to set up a Facebook pixel. Required values: pixel_id.
< 1024 ANNO
conversion_idTrack conversion ID< 1024 ANNO
conversion_labelTrack Conversion Label< 1024 ANNO
pixel_idTrack pixel ID< 1024 ANNO

JSON example:

{
"merchant_id": "LOJAMERCADOPAGO",
"merchant_usn": "123456",
"amount": "100",
"soft_descriptor": "softDescriptor",
"additional_data": {
"extra_info": "extraInfo",
"items": [
{
"title": "Camiseta",
"quantity": "1",
"unit_price": "100",
"picture_url": "https://abc.def/item/552292339/zoom/10.jpg",
"category_id": "fashion",
"description": "Camiseta Preta",
"id": "id"
}
],
"payer": {
"name": "Jonas",
"surname": "Melo",
"email": "a@b.com",
"date_created": "11/02/2015",
"address": {
"zip_code": "12345678",
"street_number": "751",
"street_name": "Rua Major Vitor"
},
"phones": [
{
"number": "912341234",
"ddd": "11"
}
],
"identification_type": "CPF",
"identification_number": "86670573049"
},
"payment_method": {
"excluded_payment_methods": [
{
"id": "debelo"
}
],
"excluded_payment_types": [
{
"id": "debit_card"
}
]
},
"shipment": {
"mode": "not_specified",
"local_pickup": "true",
"dimensions": "23x23x23, 23g",
"default_shipping_method": "45",
"cost": "2",
"free_shipment": "true",
"address": {
"zip_code": "87654321",
"street_number": "920",
"street_name": "Rua General Henrique",
"floor": "1",
"apartment": "23",
"city": "São Mateus",
"state": "AM"
},
"free_methods": [
{
"id": "621"
}
]
},
"max_installments": "12",
"application_fee": "1",
"acquirer_expiry_date": "2021-06-02T11:05:27",
"acquirer_expiry_date_from": "2021-06-01T11:05:27",
"acquirer_expiry_date_to": "2021-06-03T11:05:27",
"acquirer_expires": "false",
"ad_tracks": [
{
"conversion_id": "conversionId",
"type": "google_ad",
"conversion_label": "conversionLabel"
}
]
}
}