Mercado Pago Module

9 vues Markdown

Collect payments through Mercado Pago, where clients pay on Mercado Pago's own page and can also subscribe so renewals are collected automatically.

Reaching the Screen

Go to Settings → Financial → Payment Gateways, open All Modules and click the Mercado Pago card: {admin}/modules/payment?module=MercadoPago

Ticking Status and saving lists the method on the payment step. Use Payment Gateways to order the methods clients see.

What Is on the Screen

The card holds your Mercado Pago access token, the payment page options and the shared gateway settings.

On the payment step Mercado Pago appears as a box with a Continue to Mercado Pago button. The client pays on Mercado Pago's page and returns. The result is confirmed by a notification and re-read from Mercado Pago before the invoice is closed.

With Subscriptions on, a renewable order also offers Subscribe and pay automatically. Installments are chosen on Mercado Pago's page. Stored cards, automatic payments from a saved card and a card form inside your own site are not supported.

Before You Configure It

  • A Mercado Pago account and an application. Sign in at Mercado Pago Developers, click Your integrations and create an application if you have none.
  • Test credentials are ready as soon as the application exists. Production credentials have to be activated with your business details before they collect real money.
  • A currency Mercado Pago accepts in your country. If your prices are in another one, set Converting Currency.

Fields

StatusTurns the module on. While it is off, clients are never offered the method.
Access TokenRequired. The access token of your application. A token starting with TEST- runs against test credentials; the production token collects real money.
Webhook Secret SignatureThe signature Mercado Pago generates for your application. Filled in, every signed notification is verified and a mismatch is rejected. Left empty, notifications are accepted without that check.
Statement DescriptorUp to 13 characters shown on the payer's card statement.
Immediate Result OnlyOff by default. Ticked, only approved or rejected payments are accepted. Left off, a payment may also come back under review and the invoice waits for that review to finish.
Maximum InstallmentsHighest number of card installments offered on the payment page. Empty leaves the choice to Mercado Pago.
Excluded Payment TypesComma separated payment types to hide on the payment page, such as ticket or bank_transfer. Empty offers everything your account supports.
Payment Window (Minutes)How long the payment page stays payable after it is opened. Empty means no expiry.
SubscriptionsOff by default. Ticked, clients can subscribe instead of paying once and Mercado Pago collects each renewal.
Update Subscription FeeKeeps the recurring amount at Mercado Pago in step with the service price when that price changes.
Notification AddressCannot be edited. Copy it into the webhook settings of your Mercado Pago application.

Commission, converting currency, accepted amount range and country lists behave the same on every gateway; see Payment Gateways. Callback URL, Success URL and Failed URL cannot be edited.

Tasks

Connect your Mercado Pago application

  1. At Mercado Pago Developers click Your integrations and open your application. In the left menu choose Testing > Test credentials, or Production > Production credentials once they are activated.
  2. Copy the Access Token shown there.
  3. Open the Mercado Pago card under All Modules, tick Status and paste the token into Access Token.
  4. Click Save Changes. The method now appears on the payment step.

Register the notification address

  1. Copy Notification Address from the module card.
  2. In your application open Webhooks > Configure notifications and paste the address into the production URL, and into the test URL while you are still testing.
  3. Tick Payments. Add Plans and Subscriptions if you will offer subscriptions, then click Save.
  4. Reveal the secret signature on that screen, paste it into Webhook Secret Signature and click Save Changes. Payment results now reach the invoice on their own.

Run a test payment

  1. Place a small order as a client and choose Mercado Pago on the payment step.
  2. Click Continue to Mercado Pago and complete the payment on their page.
  3. You return to the site and the invoice is marked as paid, which activates the order.
  4. Replace the test token with the production one and repeat with a real low-value payment.

Offer a subscription

  1. Tick Subscriptions on the module card and click Save Changes.
  2. Register Plans and Subscriptions under Webhooks > Configure notifications as above.
  3. Eligible orders show Subscribe and pay automatically. All lines must share the same billing period and interval. Today's total must equal the recurring amount; setup fees, one-time lines or discounts can hide the option.
  4. Mercado Pago takes the first charge after confirmation and subsequent renewals automatically. Manage cancellation from Subscriptions.

Refund a payment

  1. Open the invoice from Invoice Detail.
  2. Under Summary → Change Status, select Refunded and Refund via payment gateway. Click Update Status.
  3. Confirm. The refund is sent to Mercado Pago and the money goes back to the payer.

Things to Watch

A test token collects nothing

Payments made with a TEST- token mark invoices as paid and activate orders. No money moves. Swap in the production token before you open the method to clients.

Subscription renewals need their own event

An agreement carries no notification address of its own. Without Plans and Subscriptions registered under Webhooks, a renewal Mercado Pago collected is never reported here. The client is charged and the order stays unpaid. Register the event before you tick Subscriptions.

A wrong signature blocks notifications

A mismatched Webhook Secret Signature rejects signed notifications and can leave invoices unpaid. Copy the current signature into the module whenever you renew it.

Required Privileges

Settings require Payment Module Settings (MODULES_PAYMENT_SETTINGS). Invoice changes require Billing → Edit (INVOICES_OPERATION).

Cet article vous a-t-il été utile ?

Merci pour votre retour !

Besoin d'aide supplémentaire ?

Notre équipe d'assistance est disponible 24h/24 pour tout ce que vous ne trouvez pas ci-dessus.