Skip to main content

A Django app to add support for Mercadopago payments

Project description

AX3 Mercadopago

AX3 Mercadopago A Django app to add support for Mercadopago payments.


AX3 Mercadopago is easy to install from the PyPI package:

$ pip install ax3-mercadopago

After installing the package, the project settings need to be configured.

Add ax3_mercadopago to your INSTALLED_APPS


    # ax3_mercadopago app can be in any position in the INSTALLED_APPS list.


Add mercadopago settings

# app/

MERCADOPAGO_REFERENCE_PREFIX = ''  # Prefix for Mercadopago external reference 
MERCADOPAGO_PAYMENT_MODEL = ''  # Path to payment model
MERCADOPAGO_PAID_USECASE = ''  # Path to use case for paid payments
MERCADOPAGO_REJECTED_USECASE = ''  # Path to use case for rejected payments

# For Marketplace

Set ax3_mercadopago in app urls

# app/
urlpatterns = [

    # Add this line
    path('mercadopago/', include('ax3_mercadopago.urls', namespace='mercadopago')),

Use PaymentModelMixin in your payment model

class Payment(PaymentModelMixin):


Get seller token request uri, on shell_plus

from ax3_mercadopago.api import AX3Client

mp = AX3Client()
# response

To create Seller Token, on shell_plus use

from app.mercadopago import create_seller_token

brand = Brand.objects.first()
create_seller_token(code='SELLER-CODE', brand=brand)

Releasing a new version

Make sure you increase the version number and create a git tag:

$ python3 -m pip install --user --upgrade setuptools wheel twine
$ ./

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AX3 Mercadopago-0.3.6.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

AX3_Mercadopago-0.3.6-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page