Home / Documentation / Integrations

doc://integracoes/mercado-pago

Mercado Pago: OAuth, PIX, and the 6-month token

Just like with Stripe, you never paste any credentials into MMNWEB. You authorize Fragasoft's application to charge on your account, and Mercado Pago returns a token to our server. But MP has one quirk that has already broken the split for plenty of merchants — and it's at the end of this page.

Mercado Pago credential types

PairWhat it's forCan it be exposed?
Public Key + Access Tokenpayment integrationsPublic Key yes; Access Token no
Client ID + Client Secretintegrations that use OAuth (access to third-party accounts)No

Each pair is unique per application (tied to the application you created, not to a generic account). And there are two sets: test and production. Test credentials come active by default; production credentials must be activated by filling in your business details (including your line of business).

MP's own security rule: the Access Token always goes in the request header, never as a URL parameter — so it never leaks into logs, browser history, or referrers.

Who holds what, in MMNWEB

Fragasoft maintains the platform application at Mercado Pago and holds the Client ID, Client Secret, and the webhook secret — global credentials, encrypted at rest, that never reach the browser or the repository. You keep your Mercado Pago account and never hand us your Public Key or Access Token manually. When you authorize, MP delivers to our server a set of credentials tied to you: access_token, refresh_token, user_id (your receiver ID), and public_key — stored encrypted (AES-256-GCM) and used only to charge on your behalf.

How to connect, step by step

  1. In the MMNWEB panel, go to your project's payments settings.
  2. Click "Connect my Mercado Pago account".
  3. You're taken to Mercado Pago. Log in to your account and authorize the application.
  4. MP redirects you back and MMNWEB records the authorization.
  5. Check the status: PIX only appears at checkout when it's ready.
Complete the whole process in one sitting, without pausing. The authorization code MP returns in the redirect expires in 10 minutes. If you abandon the screen halfway through and come back later, the flow fails and you have to start over.

⚠️ The trap: the seller token expires in 6 months

The access_token MP issues to the seller is valid for 180 days (the expires_in field returns 15,552,000 seconds). It comes with a refresh_token, made precisely to renew access before expiration. If the token expires without renewal, that merchant's split simply stops — it's not a noisy failure; it's a charge that quietly stops being authorized.

MMNWEB renews it automatically before expiration — you don't have to do anything. But you need to know this exists, for two reasons:

Don't do this without telling support first:
1. If you revoke the authorization in the MP panel, automatic renewal stops working and PIX goes down.
2. If you manually renew your production credentials in the MP panel (Public Key/Access Token or Client ID/Client Secret), the operation affects integrations already configured — MP itself warns that the old credentials must be replaced with the new ones to keep operating.

How the split works

The PIX charge happens inside MMNWEB, on your Mercado Pago account. The platform fee is deducted via application_fee — MP's native split mechanism. The money never passes through Fragasoft's account: using the native split is what keeps the operation outside the regulatory requirements that apply to anyone holding third-party funds. The percentage is set by Fragasoft and configured in the system — you don't edit it. As with Stripe, the rule is "no ready provider, no sale": checkout only offers PIX when the authorization is valid and the ability to charge has been genuinely verified.

Quick questions

Do I need to send my Access Token to support? No. The flow is OAuth; the token goes straight to the server. If anyone asks for your Access Token in a message, be suspicious.

PIX stopped out of nowhere. Two likely causes: authorization revoked in the MP panel, or production credentials manually renewed. Open a support ticket before touching anything.

I tested with test credentials and it worked. Test and production are separate sets. Production must be activated in the panel, with your business details filled in.

Can I use Mercado Pago and Stripe at the same time? Yes. Typically: PIX through Mercado Pago, cards through Stripe.

Official sources

Credentials (types, test × production) · OAuth — Access Token, validity and refresh · OAuth API reference

Related: Integrations overview · Stripe (cards) · Cielo · Engine concepts

Want PIX with split running in your store?