Skip to main content

Mercado Pago SDK for Python

PyPI PyPI Downloads APM

This library provides developers with a simple set of bindings to help you integrate Mercado Pago API to a website and start receiving payments.

💡 Requirements

Python 3 or higher.

📲 Installation

Run pip3 install mercadopago

🌟 Getting Started

First time using Mercado Pago? Create your Mercado Pago account.

Copy your Access Token in the credentials panel and replace the text YOUR_ACCESS_TOKEN with it.

Simple usage

import mercadopago

sdk = mercadopago.SDK("YOUR_ACCESS_TOKEN")

payment_data = {
    "transaction_amount": 100,
    "token": "CARD_TOKEN",
    "description": "Payment description",
    "payment_method_id": 'visa',
    "installments": 1,
    "payer": {
        "email": 'test_user_123456@testuser.com'
    }
}
result = sdk.payment().create(payment_data)
payment = result["response"]

print(payment)

Per-request configuration

All methods that make API calls accept an optional RequestOptions object. This can be used to configure some special options of the request, such as changing credentials or custom headers.

import mercadopago
from mercadopago.config import RequestOptions

request_options = RequestOptions(access_token='YOUR_ACCESS_TOKEN')
# ...

result = sdk.payment().create(payment_data, request_options)
payment = result["response"]

📚 Documentation

Visit our Dev Site for further information regarding:

Check our official code reference to explore all available functionalities.

🤝 Contributing

All contributions are welcome, ranging from people wanting to triage issues, others wanting to write documentation, to people wanting to contribute code.

Please read and follow our contribution guidelines. Contributions not following this guidelines will be disregarded. The guidelines are in place to make all of our lives easier and make contribution a consistent process for everyone.

❤️ Support

If you require technical support, please contact our support team at developers.mercadopago.com.

🏻 License

MIT license. Copyright (c) 2021 - Mercado Pago / Mercado Libre
For more information, see the LICENSE file.

Metadata

Release files for mercadopago 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mercadopago 2.2.0
File Size Uploaded Provenance Actions
mercadopago-2.2.0.tar.gz 14.0 kB Without provenance Details for mercadopago-2.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for mercadopago 2.2.0
File Interpreter ABI Platform Actions
mercadopago-2.2.0-py3.7.egg Legacy Egg format - - Details for mercadopago-2.2.0-py3.7.egg
mercadopago-2.2.0-py3-none-any.whl Python 3 none any Details for mercadopago-2.2.0-py3-none-any.whl

Total release size: 91.5 kB

Release files / mercadopago-2.2.0.tar.gz

Download URL mercadopago-2.2.0.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
703ec896eb4b23133ccfb86283d63aaf7c04e1e36dad89f90f2babde118bb6bf
BLAKE2b-256 checksum
How to use checksums
35774a2ea50117ada6a8591b59a3a0b1a7f0ad955066bc203062fa3b36a72610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.14

Release files / mercadopago-2.2.0-py3.7.egg

Download URL mercadopago-2.2.0-py3.7.egg
Size 53.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
10e14e8139c13623949c6a19267d143b80580ea32c38c47e34cf30599b0c1e56
BLAKE2b-256 checksum
How to use checksums
fc8d06007b0e891d0631d18340e738d36ad6f55827e3d9a6cba9510121aa9e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.14

Release files / mercadopago-2.2.0-py3-none-any.whl

Download URL mercadopago-2.2.0-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59582b2a8feb48100eccbd13502044a290ae3801f28c3a33ad9290d8281024db
BLAKE2b-256 checksum
How to use checksums
48e05066a22c91ea73bd3b7c1e62f7f9c94e15cfa8d27669eda9a70c22b0664c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.14

Security for mercadopago 2.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.0 This release

3 release files No provenance

0.1.5

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page