Sniffing feature
Sniffing is a feature that allows identifying if a user has the Mercado Pago app installed on their mobile device and automatically opens it. If so, when opening the agreement_uri
in a browser, the agreement flow is automatically initiated in the app, without the user needing to log in manually.
The sniffing feature simplifies the agreement process, improving the user experience by reducing friction in the agreement.
Models of sniffing implementation
See below for the available models to add to your integration with Mercado Pago.
- App Link (available only for Android devices): if the Mercado Pago app is installed on the user's device, it will intercept when navigating to
agreement_uri
and automatically open the agreement flow in the app's context. - Browser (available for Android and iOS devices): when opening the
agreement_uri
in a browser, the page will recognize the context and apply different strategies to try to open the Mercado Pago app, as follows:- If the user has the app installed, the linking flow will automatically open in the app.
- If the user does not have the app installed, they will be directed to the user's default browser, and in this case, the user may need to log in manually.
Configuration
To use the sniffing feature, simply open a link in the mobile device's web browser to activate detection and follow the linking flow. See below how to enable the sniffing feature in your integration.
Envie um GET com os atributos necessários, pricipalmente o
return_uri
, ao endpoint /v2/wallet_connect/agreements e execute a requisição para iniciar uma vinculação.Send a GET with the necessary attributes, primarily
return_uri
, to the endpoint /v2/wallet_connect/agreements and execute the request to create an agreement.
- The parameters
agreement_id
andagreement_uri
will be returned. Use an In-App Browser component to navigate toagreement_uri
, the address where the buyer is redirected to grant access to the Mercado Pago wallet to make the payment. According to the operating system, use Custom Tabs for Android devices and SVC for iOS devices. - After that, use the return URL
return_uri
to complete the linking process.
After configuration, it is possible to disable the sniffing feature of your application, and this action must be coordinated with the Integrations team at Mercado Pago.