AI resources

Transactions via Checkout API

After receiving your corresponding PLATFORM_ID for your platform, you can add it to the request header for payment (/v1/payments) when creating a transaction with Mercado Pago.

Example:

using MercadoPago.Config;

MercadoPagoConfig.PlatformId = "YOUR_PLATFORM_ID";
// continue creating the payment
import com.mercadopago.MercadoPagoConfig;

MercadoPagoConfig.setPlatformId("your-platform-id");
// create the payment
import MercadoPago, { Payment } from '@src/index';

const client = new MercadoPago({
  accessToken: 'YOUR_ACCESS_TOKEN',
  options: {
    plataformId: 'your-platform-id'
  }
});
// create the payment
use MercadoPago\MercadoPagoConfig;

MercadoPagoConfig::setPlatformId("YOUR_PLATFORM_ID");
// create the payment
import mercadopago
from mercadopago.config import RequestOptions

request_options = RequestOptions(platform_id="your_platform_id")
# create the payment
require 'mercadopago'

request_options = Mercadopago::RequestOptions.new(
  platform_id: 'your_platform_id_value'
)
# create the payment
cfg, err := config.New(
    accessToken,
    config.WithPlatformID("your_platform_id_here"),
)
// create the payment
curl --location --request POST 'https://api.mercadolibre.com/checkout/preferences' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
--header 'x-platform-id: {{PLATFORM_ID proporcionado por el equipo de Partners}}' \
// create the payment