Mercadopago SDK module for Payments integration
Project description
Mercado Pago SDK for Python
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mercadopago-2.0.8.tar.gz
.
File metadata
- Download URL: mercadopago-2.0.8.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63147051a6f2ceedeccaa50e73d85ffae78a1b473b5ed8c05bf85e4ccaebae86 |
|
MD5 | 4e1b70d3521eef3e9efc3d6df99fa74e |
|
BLAKE2b-256 | bfbe7878062b00753c4c3a34def4f39d91d302950d8eaa8a8658efae5b246f06 |
File details
Details for the file mercadopago-2.0.8-py3-none-any.whl
.
File metadata
- Download URL: mercadopago-2.0.8-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dae0bf82efaf6e790907238f4230dff58428c2351013660da0770ad28cf8c228 |
|
MD5 | 9be4f3d232538c498f257a1dc8288ba4 |
|
BLAKE2b-256 | dfbf47247f9800d205493906e561e61349e30f088e168ef27e7a7d40471cc489 |