Skip to main content

Mercado Pago Connect

Requirements

  • API Credentials - Make sure you have your EBANX integration key. If not, complete the Merchant Signup Form.

Availability

Mercado Pago Connect is currently available in the following countries:

  • Argentina
  • Brazil
  • Chile
  • Mexico
  • Uruguay
CountryAvailable digital wallets
Argentina flagArgentina
Mercado Pago Connect
Brazil flagBrazil
NuPay RecurringMercado Pago Connect
Chile flagChile
Mercado Pago Connect
Colombia flagColombia
Nequi Recurring
Mexico flagMexico
Mercado Pago Connect
Uruguay flagUruguay
Mercado Pago Connect

Workflow

Recurring payments with Mercado Pago Connect involve three main steps:

  1. Customer authorizes the enrollment.
  2. Payment token is created for future charges.
  3. Recurring charges are made using the saved token.

Instructions

Follow the steps below.

  1. Customer Checkout

    Your customer selects Mercado Pago Connect at checkout.

  2. Customer Enrollment

    You must enroll your customer in recurring payments by submitting a request to the following endpoint: /ws/userenrollment/mpconnect.


    Sample request


    curl -X POST
    --location 'https://api.ebanxpay.com/ws/userenrollment/mpconnect' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "your_ebanx_integration_key",
    "operation": "enrollment",
    "payment_type_code": "mpconnect",
    "enrollment": {
    "merchant_enrollment_code": "{unique_user_identifier}",
    "email": "{customer.email@example.com}",
    "country": "{country_code}"
    }
    }'

    Sample response

    {
    "status": "SUCCESS",
    "redirect_url": "{unique_mpconnect_url_to_finish_enrollment}",
    "enrollment": {
    "status": "PENDING",
    "merchant_enrollment_code": "{unique_user_identifier}"
    }
    }
  3. Customer Approval

    The customer is redirected to the redirect_url, where they approve the recurring payment enrollment.

  4. Create a payment with token

    Create a payment using the confiormed merchant_enrollment_code

    curl -X POST
    --location 'https://api.ebanxpay.com/ws/direct' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "your_ebanx_integration_key",
    "payment": {
    "payment_type_code": "mpconnect",
    "country": "{country_code}",
    "amount_total": "{amount}",
    "currency_code": "{currency_code}",
    "name": "{PAYMENT REQUEST CUSTOMER}",
    "email": "{customer.email@example.com}"
    "merchant_payment_code": "{xyz-123-1001}",
    "metadata": {
    "merchant_enrollment_code": "{unique_user_identifier}"
    },
    }
    }
  5. Handle the payment response

    • The response will have a Completed (CO) or Canceled (CA) status.
    • There will be no redirection.

    {
    "payment": {
    "hash": "5ec27f3b86fa8e3123452345626aec3989aa2ceccdb7",
    "country": "br",
    "merchant_payment_code": "xyz-123-1001",
    "order_number": null,
    "status": "CO",
    "status_date": "2021-12-13 20:23:25",
    "open_date": "2021-12-13 20:23:21",
    "confirm_date": "2021-12-13 20:23:25",
    "transfer_date": null,
    "amount_br": "20.00",
    "amount_ext": "20.00",
    "amount_iof": "0.00",
    "currency_rate": "1.0000",
    "currency_ext": "BRL",
    "due_date": "2021-12-16",
    "instalments": "1",
    "payment_type_code": "mpconnect",
    "pre_approved": false,
    "capture_available": null
    },
    "status": "SUCCESS"
    }
  6. Congratulations!

    You have completed the necessary steps to create a Mercado Pago Connect payment.


Resources

Use the following resources when testing in your sandbox environment.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: