For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrated Webhooks: Mercado Pago with SprintHub

This integration with Mercado Pago aims to bring the buyer's registration data into SprintHub. In this example, we will bring only the credit card name and email.

Integration flowchart.

For a better understanding of this step-by-step guide, watch the video above.

Step 1:

Register and access Mercado Pago's Developers area:

https://www.mercadopago.com.br/developers/panel/app

On the Apps screen, create a new app “Create application”.

Step 2:

In SprintHub, under Custom Fields, create the fields you want to bring from Mercado Pago. In the example in this tutorial, besides Client ID and Merchand Order, I am bringing only the Order ID field.

https://SUA_INSTANCIA.sprinthub.app/sh/fields/panel/lead

Keep Client ID as the unique identifier.

Step 3:

Go to Integration Webhooks and create a new Passive webhook.

https://SUA_INSTANCIA.sprinthub.app/sh/advwebhooks/panel?

Do the automatic mapping, but then create a new field called ID because what comes in production in real sales is different from what comes in the test submission during mapping.

Extra Actions: Create an extra action called “Send integration webhook”. Do this step only after you create active webhooks 02 and 03 as shown in the video and in the screens below.

Configure the token as below. Watch the video to find out where to get the token.

Automatic Lead Creation: Update and automatically create the Lead by mapping these fields.

Step 04:

Create an Active Webhook called 02 - MP - Fetch Order ID

Map as above. This is what we will fetch from this endpoint:

Destination URL:

https://api.mercadopago.com/merchant_orders/{contactfield=mp_merchant_order}

In the Array configuration, I am only fetching id and status, but you can fetch other data within the payment object.

Return validation: In the example, I want to bring only what has status approved.

Extra Actions: I am adding the payment ID in the MP - Order ID field.

I am calling webhook 03, where I will pass the Payment ID to bring the buyer's data.

Step 05:

Create a new active webhook called 03 - MP - Fetch Payment Data with Order ID

Destination URL: https://api.mercadopago.com/v1/payments/{contactfield=id_da_compra}

Extra Actions: This call will update the Contact, Name, and Email fields.

Last updated

Was this helpful?