AI resources

How to integrate checkout in marketplace

Marketplace is an e-commerce site/platform that connects sellers and buyers in a single sales environment, allowing the sale of products and/or services online with greater scope and possibility of conversion.

In addition to the structure needed to make sales, some marketplaces take care of the arrangement of products, payment and shipping methods, optimizing the sales process and facilitating business management.

If you choose to sell through a marketplace, you can integrate Checkout Pro from Mercado Pago to process payments. In this checkout model, the buyer is directed to a Mercado Pago page to complete the payment.

Checkout Pro automatically splits the amounts between the seller and the marketplace through the split payment, without any action required from the seller.

The Mercado Pago commission is deducted from the amount received by the seller. In other words, the Mercado Pago commission is deducted first and the Marketplace commission is deducted from the remaining amount.

To perform the integration, you will need to follow the Checkout Pro integration flow, necessarily using an access token for each seller, obtained through OAuth. Below we list the steps required to integrate a checkout with the marketplace.

  1. Follow the steps described in the OAuth documentation to get each access_token. This information will be necessary during the checkout integration process with the marketplace.
  2. Follow the entire integration flow of Checkout Pro.
  3. In the checkout integration, use the seller's public_key and access_token (obtained in step 1) in the backend or in the header of the request.
  4. To determine the marketplace commission percentage, fill the marketplace_fee parameter with the amount to be charged for each order created in the /v1/orders API.

Example

json

{
  "items": [
    {
      "id": "item-ID-1234",
      "title": "My product",
      "currency_id": "BRL",
      "quantity": 1,
      "unit_price": 75.76
    }
  ],
  "marketplace_fee": 10
}

Upon completing these steps, the checkout will have been integrated into the marketplace and will be ready to process payments.