AI resources
Integrate Mercado Pago with our official libraries With Mercado Pago SDKs you can reduce integration time, work with secure code, and access our API features from your favorite language.
    11 official libraries
    For server, web, and mobile
    Agile integration
    Secure and certified code

Server SDKs

Connect your backend to Mercado Pago. Choose your language, install the library, and initialize with your Access TokenPrivate key of the application created in Mercado Pago, used in the backend. You can access it through Your integrations > Integration data > Tests > Test credentials.View credentials.

PHP 8.2+

bash

composer require mercadopago/dx-php

php

require_once('vendor/autoload.php');
use MercadoPago\MercadoPagoConfig;
MercadoPagoConfig::setAccessToken("YOUR_ACCESS_TOKEN");

→ Repository on GitHub

Web SDKs

Tokenize cards and render Checkout Bricks directly in the browser. Initialize with your Public KeyPublic key used in the frontend to access information and encrypt data. You can access it through Your integrations > Integration data > Tests > Test credentials.View credentials.

Modern browsers (Chrome, Firefox, Safari, Edge)

bash

npm install @mercadopago/sdk-js

javascript

const mp = new MercadoPago("YOUR_PUBLIC_KEY");

Or via script tag without a bundler:

html

<script src="https://sdk.mercadopago.com/js/v2"></script>

→ Repository on GitHub

Mobile SDKs

Securely integrate card tokenization in native applications. Initialize with your production Public KeyPublic key used in the frontend to access information and encrypt data. You can access it through Your integrations > Integration data > Tests > Test credentials.View credentials.

Swift · UIKit and SwiftUI

  1. In Xcode, go to File > Add Packages.
  2. Paste the URL: https://github.com/mercadopago/sdk-ios
  3. Select the desired version and click Add Package.

swift

import CoreMethods

let configuration = MercadoPagoSDK.Configuration(
    publicKey: "YOUR_PUBLIC_KEY",
    country: .argentina
)
MercadoPagoSDK.shared.initialize(configuration)

→ Repository on GitHub

Next steps

API Reference
Generate code snippets in your favorite language directly from the endpoint reference.
Credentials
Get your test and production credentials to authenticate your Mercado Pago integrations.
Security
Learn best practices to protect your integration and your buyers' data.
Test accounts
Create seller and buyer accounts to test your integration in the sandbox environment.