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+
bashcomposer require mercadopago/dx-php
phprequire_once('vendor/autoload.php'); use MercadoPago\MercadoPagoConfig; MercadoPagoConfig::setAccessToken("YOUR_ACCESS_TOKEN");
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)
bashnpm install @mercadopago/sdk-js
javascriptconst mp = new MercadoPago("YOUR_PUBLIC_KEY");
Or via script tag without a bundler:
html<script src="https://sdk.mercadopago.com/js/v2"></script>
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
- In Xcode, go to File > Add Packages.
- Paste the URL:
https://github.com/mercadopago/sdk-ios - Select the desired version and click Add Package.
swiftimport CoreMethods let configuration = MercadoPagoSDK.Configuration( publicKey: "YOUR_PUBLIC_KEY", country: .argentina ) MercadoPagoSDK.shared.initialize(configuration)