---
title: "Mercado Pago"
canonical_url: https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/integration
---

* [Overview](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/overview/globalcollect.md)
* [Countries \& currencies](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/countries-and-currencies/globalcollect.md)
* [Integration](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/integration/globalcollect.md)
* [Process flows](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/process-flows/globalcollect.md)
* [Testing](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/testing/globalcollect.md)
* [Consumer experience](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/consumer-experience/globalcollect.md)
* [Reporting](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/reporting/globalcollect.md)
* [FAQ](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/faqs/globalcollect.md)

# Integration

* [Using MyCheckout hosted payment pages](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/integration.md#my-checkout)
* [Using your own checkout page](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/integration.md#your-own-checkout-page)
* [Consumer redirection](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/integration.md#consumer-redirection)

## Before you begin

* Make sure you are boarded with Mercado Pago
* Build your server integration
* The correct [API endpoint](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/endpoints.html?paymentPlatform=ALL)
* A way to construct the [authorization header](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/authentication.html?paymentPlatform=ALL) (API Explorer, [SDKs](https://docs.connect.worldline-solutions.com/documentation/sdk/.md), etc.)
* A way to send REST API calls (API Explorer, [SDKs](https://docs.connect.worldline-solutions.com/documentation/sdk/.md), etc.)

# Using MyCheckout hosted payment pages

[MyCheckout hosted payment pages](https://docs.connect.worldline-solutions.com/documentation/hosted-payment-pages/.md) is the optimal solution if you're looking for the quickest way to accept payments and a hassle-free experience for your consumers.

1. Make the [Create hosted checkout API call](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/hostedcheckouts/create.html?paymentPlatform=ALL), submitting the required properties.
2. Add the **order** object containing the required properties.

Below, you'll find an example API call with the essential data. To add more information with additional properties, please visit to our [API Reference](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/hostedcheckouts/create.html?paymentPlatform=ALL).  

|    Property    | Data type | Required |
|----------------|-----------|----------|
| order          | object    | yes      |
| amountOfMoney  | object    | yes      |
| currencyCode   | string    | yes      |
| amount         | integer   | yes      |
| customer       | object    | yes      |
| billingAddress | string    | yes      |
| countryCode    | string    | yes      |

Additionally, you can add **hostedCheckoutSpecificInput** object, featuring the followingstrings:

* **returnUrl -** the URL that the consumer is redirect to after the payment flow has finished.
* **variant**- the created styling of the checkout page tailored to your consumer's preferences.
* **locale**- the language, that will be used for your hosted checkout page.

For Brazil  
POST HOSTEDCHECKOUT REQUEST BRLCopy code

```hljs javascript language-javascript
{
"order": {
"amountOfMoney": {
"amount": 100,
"currencyCode": "BRL"
},
"customer": {
"billingAddress": {
"countryCode": "BR"
   }
  }
 }
}
```

POST HOSTEDCHECKOUT RESPONSE BRLCopy code

```hljs javascript language-javascript
{   "RETURNMAC": "89084bf6-d736-40a0-a5a0-2e6fb50baeae",
  "hostedCheckoutId": "067f7c64-6969-71ff-ba79-2d1cf4246ae1",
  "partialRedirectUrl": "pay1.checkout.worldline-solutions.com/checkout/9991-04b38b3ce0f5443599838b4fec060e76:067f7c64-6969-71ff-ba79-2d1cf4246ae1:41a98d29c2d347ff9582ea0d691fe883"
  {
```

For Mexico  
POST HOSTEDCHECKOUT REQUEST MXNCopy code

```hljs javascript language-javascript
{
"order": {
"amountOfMoney": {
"amount": 100,
"currencyCode": "MXN"
},
"customer": {
"billingAddress": {
"countryCode": "MX"
   }
  }
 }
}
```

POST HOSTEDCHECKOUT RESPONSE MXNCopy code

```hljs javascript language-javascript
{
  "RETURNMAC": "20254342-da5e-4281-acf5-a4d7fc2972b8",
  "hostedCheckoutId": "068ff69c-865a-71ff-844d-5f2d2e42a55c",
  "partialRedirectUrl": "pay1.preprod.checkout.worldline-solutions.com/checkout/15003-566973f13ea641f4832388435452560e:068ff69c-865a-71ff-844d-5f2d2e42a55c:222e68f8a0ca41bfb45d1b2f0bb30f07"
}
```

From the response, the important properties are:

* hostedCheckoutId-- can be used in subsequent API calls to retrieve the transaction details, (with [Get hosted checkout status](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/hostedcheckouts/get.html?paymentPlatform=ALL) API call);
* partialRedirectUrl-- is used to create the URL to which the customer needs to be redirected, By default, we configure every account with the subdomain payment, so you can always connect https://payment/. with the partialRedirectUrl, for example:

*https://payment.pay1.preprod.checkout.worldline-solutions.com/checkout/9992-6ce05357a95344\*\*\*\*\*\*\*\**

For more information on customizing the checkout page, please refer to our detailed guide on MyCheckout hosted payment pages.  
The hostedCheckoutId is only valid for 2 hours. Ensure to store the createdPaymentOutput.payment.id from [Get hosted checkout](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/hostedcheckouts/get.html?paymentPlatform=ALL) status response to be able to retrieve data after 2 hours have elapsed via [Get payment](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/java/payments/get.html?paymentPlatform=ALL) API call. Alternatively, we can also send a [webhook event](https://docs.connect.worldline-solutions.com/documentation/webhooks/.md) that will contain it.

# Using your own checkout page

You can build a direct integration using our SDKs (or integrate our API from scratch). Depending on your integration needs, there are several options available.

### Client encryption

Our [Client API](https://apireference.connect.worldline-solutions.com/c2sapi/v1/en_US/index.html?paymentPlatform=ALL) allows you to perform various actions. All you need is to be able to create a session via the [POST/v1/{merchantId}/sessions](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/sessions/create.html?paymentPlatform=ALL) API call, which will grant you access to the Client API. It's highly recommended that you use our [Client SDKs](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/.md), provided for the following programming languages:

* [JavaScript](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/javascript/.md)
* [Java](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/android/.md)
* [Swift](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/swift/.md)
* [Objective-C](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/ios/.md)
* [Flutter](https://docs.connect.worldline-solutions.com/documentation/sdk/mobile/flutter/.md)

We also have reference implementations showing how to use these SDKs on GitHub.

### Non-encrypted data

If you wish to do a direct server-to-server API call, go for this option. The difference with the other options mentioned before is that you don't need to submit the **encryptedCustomerInput** property. After the consumer selects the payment product, you need to perform the following:

1. Make a [POST /v1/{merchantId}/payments](https://apireference.connect.worldline-solutions.com/s2sapi/v1/en_US/json/payments/create.html?paymentPlatform=ALL) API call.
2. Add the **order** object containing the required properties.
3. Add the redirectPaymentMethodSpecificInput object containing the required properties.
4. Add the **redirectionData** object containing the **returnUrl** property.

Below, you'll find an example request containing the essential data. For more information, please refer to our API Reference.

For Brazil  

|              Property              | Data type | Required |
|------------------------------------|-----------|----------|
| order                              | object    | yes      |
| amountOfMoney                      | object    | yes      |
| amount                             | integer   | yes      |
| currencyCode                       | string    | yes      |
| customer                           | object    | yes      |
| billdingAddress                    | object    | yes      |
| countryCode                        | string    | yes      |
| contactDetails                     | object    | yes      |
| emailAddress                       | string    | yes      |
| fiscalNumber                       | string    | yes      |
| personalInformation                | object    | yes      |
| name                               | object    | yes      |
| firstName                          | string    | yes      |
| surname                            | string    | yes      |
| redirectPaymentMethodSpecificInput | object    | yes      |
| references                         | object    | yes      |
| merchantReference                  | string    | yes      |
| paymentProductId                   | integer   | yes      |
| redirectionData                    | object    | yes      |
| returnUrl                          | string    | yes      |

For Mexico  

|      Property       | Data type | Required |
|---------------------|-----------|----------|
| order               | object    | yes      |
| amountOfMoney       | object    | yes      |
| amount              | integer   | yes      |
| currencyCode        | string    | yes      |
| customer            | object    | yes      |
| billdingAddress     | object    | yes      |
| countryCode         | string    | yes      |
| contactDetails      | object    | yes      |
| emailAddress        | string    | yes      |
| personalInformation | object    | yes      |
| name                | object    | yes      |
| firstName           | string    | yes      |
| surname             | string    | yes      |
| references          | object    | yes      |
| merchantReference   | string    | yes      |
| paymentProductId    | integer   | yes      |
| redirectionData     | object    | yes      |
| returnUrl           | string    | yes      |

Below, you'll find an example request containing the essential data. For more information, please refer to our API Reference.

For Brazil  
POST PAYMENTS REQUEST BRLCopy code

```hljs javascript language-javascript

{
  "creationOutput": {
    "additionalReference": "2025060606",
    "externalReference": "2025060606"
  },
  "merchantAction": {
    "actionType": "REDIRECT",
    "redirectData": {
      "RETURNMAC": "cb5a9d99-d3a7-43ad-a32f-2407d29237d7",
      "redirectURL": "https://sandbox.ebanx.com/ws/redirect/execute?hash=6842fafc1975c4714c22d3852947184e3b70a6530cbc5263"
    },
    "showData": []
  },
  "payment": {
    "id": "301020240210000001400000100001",
    "paymentOutput": {
      "amountOfMoney": {
        "amount": 35000,
        "currencyCode": "BRL"
      },
      "references": {
        "merchantReference": "2025060606",
        "paymentReference": "E20200004FEA"
      },
      "paymentMethod": "redirect",
      "redirectPaymentMethodSpecificOutput": {
        "paymentProductId": 6106,
        "bankAccountBban": {
          "accountHolderName": "Kuhlman"
        }
      }
    },
    "status": "REDIRECTED",
    "statusOutput": {
      "isCancellable": false,
      "isRetriable": false,
      "statusCategory": "PENDING_PAYMENT",
      "statusCode": 50,
      "statusCodeChangeDateTime": "20250606162812",
      "isAuthorized": false,
      "isRefundable": false
    }
  }
}
```

POST PAYMENTS RESPONSE BRLCopy code

```hljs javascript language-javascript
{
  "creationOutput": {
    "additionalReference": "2025060606",
    "externalReference": "2025060606"
  },
  "merchantAction": {
    "actionType": "REDIRECT",
    "redirectData": {
      "RETURNMAC": "cb5a9d99-d3a7-43ad-a32f-2407d29237d7",
      "redirectURL": "https://sandbox.ebanx.com/ws/redirect/execute?hash=6842fafc1975c4714c22d3852947184e3b70a6530cbc5263"
    },
    "showData": []
  },
  "payment": {
    "id": "301020240210000001400000100001",
    "paymentOutput": {
      "amountOfMoney": {
        "amount": 35000,
        "currencyCode": "BRL"
      },
      "references": {
        "merchantReference": "2025060606",
        "paymentReference": "E20200004FEA"
      },
      "paymentMethod": "redirect",
      "redirectPaymentMethodSpecificOutput": {
        "paymentProductId": 6106,
        "bankAccountBban": {
          "accountHolderName": "Kuhlman"
        }
      }
    },
    "status": "REDIRECTED",
    "statusOutput": {
      "isCancellable": false,
      "isRetriable": false,
      "statusCategory": "PENDING_PAYMENT",
      "statusCode": 50,
      "statusCodeChangeDateTime": "20250606162812",
      "isAuthorized": false,
      "isRefundable": false
    }
  }
}
```

For Mexico  
POST PAYMENTS REQUEST MXNCopy code

```hljs javascript language-javascript
{
    "order": {
        "amountOfMoney": {
            "amount": 35000,
            "currencyCode": "MXN"
        },
        "customer": {
            "billingAddress": {
                "countryCode": "MX"
            },
            "contactDetails": {
                "emailAddress": "Preston42@yahoo.com"
            },
            "personalInformation": {
                "name": {
                    "firstName": "Josefina",
                    "surname": "Kuhlman"
                }
            }
        },
        "references": {
            "merchantReference": "2025060610"
        }
    },
    "redirectPaymentMethodSpecificInput": {
        "paymentProductId": 6106,
        "redirectionData": {
            "returnUrl": "https://epayments.developer-ingenico.com"
        }
    }
}
```

POST PAYMENTS RESPONSE MXNCopy code

```hljs javascript language-javascript
{
  "creationOutput": {
    "additionalReference": "2025060610",
    "externalReference": "2025060610"
  },
  "merchantAction": {
    "actionType": "REDIRECT",
    "redirectData": {
      "RETURNMAC": "a6ac4f8a-6722-4caa-89a4-afbfe7f64067",
      "redirectURL": "https://sandbox.ebanx.com/ws/redirect/execute?hash=684308cd644654a09ea18f83180a69d7f3e34ea364603e52"
    },
    "showData": []
  },
  "payment": {
    "id": "301020240210000001430000100001",
    "paymentOutput": {
      "amountOfMoney": {
        "amount": 35000,
        "currencyCode": "MXN"
      },
      "references": {
        "merchantReference": "2025060610",
        "paymentReference": "E20200004JNA"
      },
      "paymentMethod": "redirect",
      "redirectPaymentMethodSpecificOutput": {
        "paymentProductId": 6106,
        "bankAccountBban": {
          "accountHolderName": "Kuhlman"
        }
      }
    },
    "status": "REDIRECTED",
    "statusOutput": {
      "isCancellable": false,
      "isRetriable": false,
      "statusCategory": "PENDING_PAYMENT",
      "statusCode": 50,
      "statusCodeChangeDateTime": "20250606172710",
      "isAuthorized": false,
      "isRefundable": false
    }
  }
}
```

[Next Process flows](https://docs.connect.worldline-solutions.com/payment-product/mercado-pago/process-flows/globalcollect.md)
