# MD for: https://www.mercadopago.cl/developers/pt/docs/checkout-pro-orders/notifications.md \# Configure payment notifications \*\*Webhooks\*\*, also known as \*\*web callbacks\*\*, are HTTP messages that Mercado Pago sends to your server when a specific event occurs in your integration. Instead of your system constantly querying for updates, Webhooks transmit data automatically through an HTTPS POST request. :::::AccordionComponent{title="Configure Webhooks" pill="1"} Below is a step-by-step guide to receiving notifications in integrations with Checkout Pro. Once configured, Webhook notifications will be sent whenever an update occurs on the reported topic, including the creation and update of orders and transaction processing. 1\. Go to \[Integrations\](https://www.mercadopago.cl/developers/panel/app) and select the application integrated with Checkout Pro for which you want to activate notifications. !\[Integrations overview\](/images/dashboard/applications-es-v2.png) 2\. In the side menu, select \*\*Webhooks configuration\*\*. 3\. In the \*\*Test / Production\*\* switch at the top of the screen, select \*\*Test\*\* and enter the \`HTTPS URL\` to receive test notifications. If you want to configure production notifications, select \*\*Production\*\* and enter the production \`HTTPS URL\`. > NOTE > > If you need to identify multiple accounts, add the parameter \`?client=(sellername)\` to the end of the indicated URL to identify the sellers. 4\. Select the \*\*Order (Mercado Pago)\*\* event to receive notifications, which will be sent in \`JSON\` format via an \`HTTPS POST\` to the URL configured for the corresponding environment. !\[Checkout Pro with Orders Webhooks configuration\](/images/dashboard/webhooks-configuration-test-checkout-pro-orders-es-v1.png) 5\. Finally, click \*\*Save\*\*. This will generate a unique \*\*secret signature\*\* for the application, which allows you to validate the authenticity of the received notifications and confirm that Mercado Pago sent them. The signature does not expire, and periodic renewal is not mandatory, although it is recommended. To renew it, click \*\*Reset secret signature\*\*. ::::: :::::AccordionComponent{title="Simulate receiving the notification" pill="2"} To ensure that notifications are configured correctly, it is necessary to simulate their reception. To do this, follow the steps below. 1\. After configuring your Webhooks, click \*\*Simulate notification\*\*. 2\. On the simulation screen, select the URL to be tested. 3\. Next, choose the \*\*event type\*\* and enter the \*\*ID\*\* that will be sent in the notification body (\`Data ID\`). !\[Webhook notification simulation\](/images/dashboard/webhooks-simulation-orders-es-v2.png) 4\. Finally, click on \*\*Send test\*\* to verify the request, the response provided by the server, and the event description. You will receive a response as shown in the example below, representing the \_body\_ of the notification received on your server. \`\`\`json { "action": "order.processed", "api\_version": "v1", "application\_id": "5852534070406015", "data": { "currency\_id": "CLP", "external\_reference": "ext\_ref\_manual\_full\_test", "id": "ORDTST01M4V4VSXCTN8ZN1FJ02KKMFGE", "items": \[ { "external\_code": "ITEM-001", "quantity": 1 } \], "status": "processed", "status\_detail": "accredited", "total\_amount": "4500", "total\_paid\_amount": "4500", "transactions": { "payments": \[ { "amount": "4500", "attempt\_number": 1, "id": "PAY01M4V4XX5CXZ6KF1P3DEMX83VY", "paid\_amount": "4500", "payment\_method": { "id": "master", "installments": 1, "type": "credit\_card" }, "reference": { "id": "183961436800" }, "status": "processed", "status\_detail": "accredited" } \] }, "type": "online", "version": 1 }, "date\_created": "2026-10-13T17:28:26.540980984Z", "live\_mode": false, "type": "order", "user\_id": "3431137176" } \`\`\` > WARNING > > If for any reason you are not receiving Mercado Pago notifications, you can alternatively get information about the resource that was not notified by sending a request to the endpoint :TagComponent{tag="GET" text="/v1/orders/{order\_id}" href="/developers/en/reference/online-payments/checkout-pro/get-order/get"}. The use of this method is not recommended, so we additionally suggest contacting \[Support\](https://www.mercadopago.cl/developers/en/support). ::::: :::::AccordionComponent{title="Monitor notifications" pill="3"} To review how notifications are working, open the application and select the \*\*Webhooks\*\* tab under \*\*Home\*\*. Use the \*\*Test / Production\*\* switch to view notifications for the selected environment. From there, you can filter notification deliveries, review their date, delivery status, action, event, and resource ID, and check delivery and response-time metrics. In \*\*Test\*\*, data updates in real time. !\[Webhook notification monitoring\](/images/dashboard/webhooks-monitoring-orders-es-v1.png) To review the delivery data and notification body, select a notification from the table to open its details. !\[Webhook notification details\](/images/dashboard/webhooks-monitoring-detail-orders-es-v3.png) To resend one or more notifications, select them in the table and click \*\*Resend notifications\*\*. ::::: ::::::AccordionComponent{title="Validate the origin of the notification" pill="4"} Validating the origin of a notification is essential to ensure the security and authenticity of the received information. This process helps prevent fraud and ensures that only legitimate notifications are processed. Mercado Pago will send your server a notification similar to the example below for an \`order\` topic alert. This example includes the complete notification, which contains the \_query params\_, the \`body\`, and the \`header\` of the notification. - \*\*\_Query params\_\*\*: These are query parameters that accompany the URL. In the example, we have \`data.id=ORD01JQ4S4KY8HWQ6NA5PXB65B3D3\` and \`type=order\`. - \*\*\_Body\_\*\*: The body of the notification contains detailed information about the event, such as \`action\`, \`api\_version\`, \`application\_id\`, \`date\_created\`, \`id\`, \`live\_mode\`, \`type\`, \`user\_id\`, and \`data\`. - \*\*\_Header\_\*\*: The header contains important metadata, including the secret signature of the notification \`x-signature\`. \`\`\`http POST /test?data.id=ORD01JQ4S4KY8HWQ6NA5PXB65B3D3&type=order HTTP/1.1 Host: test.requestcatcher.com Accept: \*/\* Accept-Encoding: \* Connection: keep-alive Content-Length: 177 Content-Type: application/json Newrelic: eyJ2IjpbMCwxXSwiZCI6eyJ0eSI6IkFwcCIsImFjIjoiOTg5NTg2IiwiYXAiOiI5NjA2MzYwOTQiLCJ0eCI6ImY4MzljZjg4ODg2MGRmZTIiLCJ0ciI6ImMwOGMwZGMyMjNjZDY2YjJkZWQwMjUxZmYxNWNiNGQ1IiwicHIiOjEuMjUwMzIsInNhIjp0cnVlLCJ0aSI6MTc0Mjg0MjU4MDE2NCwiaWQiOiIxOGI2NDcxNjNkNzI3NjU4IiwidGsiOiIxNzA5NzA3In19= Traceparent: 00-c08c0dc223cd66b2ded0251ff15cb4d5-18b647163d727658-01 Tracestate: 1709707@nr=0-0-989586-960636094-18b647163d727658-f839cf888860dfe2-1-1.250320-1742842580164 User-Agent: restclient-node/4.15.3 X-Request-Id: 2066ca19-c6f1-498a-be75-1923005edd06 X-Rest-Pool-Name: /services/webhooks.js X-Retry: 0 X-Signature: ts=1742505638683,v1=ced36ab6d33566bb1e16c125819b8d840d6b8ef136b0b9127c76064466f5229b X-Socket-Timeout: 22000 {"action":"order.processed","api\_version":"v1","application\_id":"123456","date\_created":"2025-08-07T18:54:40.851374414Z","id":"123456","live\_mode":true,"type":"order","user\_id":123456,"data":{"id":"ORD01JYH1Z1YJN4HZ8J3Q0RB3YP6D"}} \`\`\` From the received Webhook notification, you can validate the authenticity of its origin. Mercado Pago will always include the secret key in Webhook notifications, which will allow you to validate their authenticity. This key will be sent in the \`x-signature\` \_header\_, which will look similar to the example below. \`\`\`plain ts=1742505638683,v1=ced36ab6d33566bb1e16c125819b8d840d6b8ef136b0b9127c76064466f5229b \`\`\` To confirm the validation, extract the key from the \_header\_ and compare it with the key provided for your application under \[Webhooks configuration\](https://www.mercadopago.cl/developers/en/docs/checkout-pro-orders/notifications#bookmark\_configure\_webhooks). Follow one of the approaches below to validate the authenticity of the notification. :::::TabsComponent ::::TabComponent{title="With SDKs"} The official SDK implements HMAC-based Webhook Signature Verification to authenticate the origin of each notification received. To obtain your secret key (\`secret\`), open the application and select \*\*Webhooks configuration\*\* from the side menu. Then reveal the \*\*Secret signature\*\*. php phpjavascriptpythongocsharpjavaruby ``` NOTE > > If \`data.id\` is returned with uppercase alphanumeric characters, convert it to lowercase before using it in the manifest. For example, \`ORD01JQ4S4KY8HWQ6NA5PXB65B3D3\` must be used as \`ord01jq4s4ky8hwq6na5pxb65b3d3\`. - \`\[x-request-id\_header\]\` must be replaced by the value received in the \`x-request-id\` \_header\_. - \`\[ts\_header\]\` will be the \`ts\` value extracted from the \`x-signature\` \_header\_. > NOTE > > If any of the values (\`data.id\`, \`x-request-id\`) are not present in the received notification, you must remove them from the \_manifest\_ before calculating the \`HMAC\`. 3\. Open the application and select \*\*Webhooks configuration\*\* from the side menu. Then reveal the \*\*Secret signature\*\*. 4\. Generate the counter-key for validation. To do this, calculate an \[HMAC\](https://en.wikipedia.org/wiki/HMAC) with the \`SHA256 hash\` function in hexadecimal base, using the secret key as the key and the \_template\_ with the values as the message. php phpnodejavapython ``` $cyphedSignature = hash_hmac('sha256', $data, $key); ``` ``` const crypto = require('crypto'); const cyphedSignature = crypto .createHmac('sha256', secret) .update(signatureTemplateParsed) .digest('hex'); ``` ``` String cyphedSignature = new HmacUtils("HmacSHA256", secret).hmacHex(signedTemplate); ``` ``` import hashlib, hmac, binascii cyphedSignature = binascii.hexlify(hmac.new(secret.encode(), signedTemplate.encode(), hashlib.sha256).digest()) ``` 5\. Finally, compare the generated key with the key extracted from the \_header\_, ensuring that they match exactly. You can also use the \_timestamp\_ extracted from the \_header\_ to compare it with a \_timestamp\_ generated at the time of notification reception, in order to establish a delay tolerance for message reception. See complete code examples below: php phpjavascriptpythongocsharpjavaruby ``` (); if (!string.IsNullOrEmpty(dataId)) parts.Add(\[\[\[ \`\`\`php (); if (!dataId.isEmpty()) parts.add("id:" + dataId); if (!xRequestId.isEmpty()) parts.add("request-id:" + xRequestId); parts.add("ts:" + ts); String manifest = String.join(";", parts) + ";"; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF\_8), "HmacSHA256")); byte\[\] bytes = mac.doFinal(manifest.getBytes(StandardCharsets.UTF\_8)); StringBuilder sb = new StringBuilder(); for (byte b : bytes) sb.append(String.format("%02x", b & 0xff)); String computed = sb.toString(); if (hash == null || !MessageDigest.isEqual( computed.getBytes(StandardCharsets.UTF\_8), hash.getBytes(StandardCharsets.UTF\_8))) { response.setStatus(401); return; } response.setStatus(200); \`\`\` \`\`\`ruby require 'openssl' x\_signature = request.headers\['x-signature'\] || '' x\_request\_id = request.headers\['x-request-id'\] || '' data\_id = (params\['data.id'\] || '').downcase ts = hash\_value = nil x\_signature.split(',').each do |part| key, value = part.split('=', 2) next unless key && value ts = value.strip if key.strip == 'ts' hash\_value = value.strip if key.strip == 'v1' end parts = \[\] parts << "id:#{data\_id}" unless data\_id.empty? parts << "request-id:#{x\_request\_id}" unless x\_request\_id.empty? parts << "ts:#{ts}" manifest = "#{parts.join(';')};" computed = OpenSSL::HMAC.hexdigest('SHA256', secret, manifest) if hash\_value.nil? || hash\_value.bytesize != computed.bytesize || !OpenSSL.fixed\_length\_secure\_compare(computed, hash\_value) head :unauthorized return end head :ok \`\`\` \]\]\]quot;id:{dataId}"); if (!string.IsNullOrEmpty(xRequestId)) parts.Add(\[\[\[ \`\`\`php (); if (!dataId.isEmpty()) parts.add("id:" + dataId); if (!xRequestId.isEmpty()) parts.add("request-id:" + xRequestId); parts.add("ts:" + ts); String manifest = String.join(";", parts) + ";"; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF\_8), "HmacSHA256")); byte\[\] bytes = mac.doFinal(manifest.getBytes(StandardCharsets.UTF\_8)); StringBuilder sb = new StringBuilder(); for (byte b : bytes) sb.append(String.format("%02x", b & 0xff)); String computed = sb.toString(); if (hash == null || !MessageDigest.isEqual( computed.getBytes(StandardCharsets.UTF\_8), hash.getBytes(StandardCharsets.UTF\_8))) { response.setStatus(401); return; } response.setStatus(200); \`\`\` \`\`\`ruby require 'openssl' x\_signature = request.headers\['x-signature'\] || '' x\_request\_id = request.headers\['x-request-id'\] || '' data\_id = (params\['data.id'\] || '').downcase ts = hash\_value = nil x\_signature.split(',').each do |part| key, value = part.split('=', 2) next unless key && value ts = value.strip if key.strip == 'ts' hash\_value = value.strip if key.strip == 'v1' end parts = \[\] parts << "id:#{data\_id}" unless data\_id.empty? parts << "request-id:#{x\_request\_id}" unless x\_request\_id.empty? parts << "ts:#{ts}" manifest = "#{parts.join(';')};" computed = OpenSSL::HMAC.hexdigest('SHA256', secret, manifest) if hash\_value.nil? || hash\_value.bytesize != computed.bytesize || !OpenSSL.fixed\_length\_secure\_compare(computed, hash\_value) head :unauthorized return end head :ok \`\`\` \]\]\]quot;request-id:{xRequestId}"); parts.Add(\[\[\[ \`\`\`php (); if (!dataId.isEmpty()) parts.add("id:" + dataId); if (!xRequestId.isEmpty()) parts.add("request-id:" + xRequestId); parts.add("ts:" + ts); String manifest = String.join(";", parts) + ";"; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF\_8), "HmacSHA256")); byte\[\] bytes = mac.doFinal(manifest.getBytes(StandardCharsets.UTF\_8)); StringBuilder sb = new StringBuilder(); for (byte b : bytes) sb.append(String.format("%02x", b & 0xff)); String computed = sb.toString(); if (hash == null || !MessageDigest.isEqual( computed.getBytes(StandardCharsets.UTF\_8), hash.getBytes(StandardCharsets.UTF\_8))) { response.setStatus(401); return; } response.setStatus(200); \`\`\` \`\`\`ruby require 'openssl' x\_signature = request.headers\['x-signature'\] || '' x\_request\_id = request.headers\['x-request-id'\] || '' data\_id = (params\['data.id'\] || '').downcase ts = hash\_value = nil x\_signature.split(',').each do |part| key, value = part.split('=', 2) next unless key && value ts = value.strip if key.strip == 'ts' hash\_value = value.strip if key.strip == 'v1' end parts = \[\] parts << "id:#{data\_id}" unless data\_id.empty? parts << "request-id:#{x\_request\_id}" unless x\_request\_id.empty? parts << "ts:#{ts}" manifest = "#{parts.join(';')};" computed = OpenSSL::HMAC.hexdigest('SHA256', secret, manifest) if hash\_value.nil? || hash\_value.bytesize != computed.bytesize || !OpenSSL.fixed\_length\_secure\_compare(computed, hash\_value) head :unauthorized return end head :ok \`\`\` \]\]\]quot;ts:{ts}"); var manifest = string.Join(";", parts) + ";"; using var hmacSha = new HMACSHA256(Encoding.UTF8.GetBytes(secret)); var computed = BitConverter .ToString(hmacSha.ComputeHash(Encoding.UTF8.GetBytes(manifest))) .Replace("-", "").ToLowerInvariant(); if (string.IsNullOrEmpty(hash) || !CryptographicOperations.FixedTimeEquals( Encoding.UTF8.GetBytes(computed), Encoding.UTF8.GetBytes(hash))) { return Unauthorized(); } return Ok(); ``` import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.util.ArrayList; import java.util.List; String xSignature = request.getHeader("x-signature") != null ? request.getHeader("x-signature") : ""; String xRequestId = request.getHeader("x-request-id") != null ? request.getHeader("x-request-id") : ""; String dataId = request.getParameter("data.id") != null ? request.getParameter("data.id").toLowerCase() : ""; String ts = null, hash = null; for (String part : xSignature.split(",")) { String[] kv = part.split("=", 2); if (kv.length != 2) continue; String key = kv[0].trim(); String val = kv[1].trim(); if ("ts".equals(key)) ts = val; if ("v1".equals(key)) hash = val; } List parts = new ArrayList<>(); if (!dataId.isEmpty()) parts.add("id:" + dataId); if (!xRequestId.isEmpty()) parts.add("request-id:" + xRequestId); parts.add("ts:" + ts); String manifest = String.join(";", parts) + ";"; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256")); byte[] bytes = mac.doFinal(manifest.getBytes(StandardCharsets.UTF_8)); StringBuilder sb = new StringBuilder(); for (byte b : bytes) sb.append(String.format("%02x", b & 0xff)); String computed = sb.toString(); if (hash == null || !MessageDigest.isEqual( computed.getBytes(StandardCharsets.UTF_8), hash.getBytes(StandardCharsets.UTF_8))) { response.setStatus(401); return; } response.setStatus(200); ``` ``` require 'openssl' x_signature = request.headers['x-signature'] || '' x_request_id = request.headers['x-request-id'] || '' data_id = (params['data.id'] || '').downcase ts = hash_value = nil x_signature.split(',').each do |part| key, value = part.split('=', 2) next unless key && value ts = value.strip if key.strip == 'ts' hash_value = value.strip if key.strip == 'v1' end parts = [] parts << "id:#{data_id}" unless data_id.empty? parts << "request-id:#{x_request_id}" unless x_request_id.empty? parts << "ts:#{ts}" manifest = "#{parts.join(';')};" computed = OpenSSL::HMAC.hexdigest('SHA256', secret, manifest) if hash_value.nil? || hash_value.bytesize != computed.bytesize || !OpenSSL.fixed_length_secure_compare(computed, hash_value) head :unauthorized return end head :ok ``` :::: ::::: :::::: :::::AccordionComponent{title="Required actions after receiving the notification" pill="5"} When you receive a notification on your platform, Mercado Pago expects a response to validate that the reception was correct. To do this, you must return an \`HTTP STATUS 200 (OK)\` or \`201 (CREATED)\`. The \*\*waiting time\*\* for this confirmation will be \*\*22 seconds\*\*. If this confirmation is not sent, the system will understand that the notification was not received and will make a new sending attempt \*\*every 15 minutes\*\*, until it receives the response. After the third attempt, the deadline will be extended, but the submissions will continue. sequenceDiagram participant MercadoPago as Mercado Pago participant Integrador as Integrator MercadoPago->>Integrador: attempt: 1. Delay: 0 minutes MercadoPago->>Integrador: attempt: 2. Delay: 15 minutes MercadoPago->>Integrador: attempt: 3. Delay: 30 minutes MercadoPago->>Integrador: attempt: 4. Delay: 6 hours MercadoPago->>Integrador: attempt: 5. Delay: 48 hours MercadoPago->>Integrador: attempt: 6. Delay: 96 hours MercadoPago->>Integrador: attempt: 7. Delay: 96 hours MercadoPago->>Integrador: attempt: 8. Delay: 96 hours After responding to the notification and confirming its receipt, you can get all the information about the notified order by sending a request to the endpoint :TagComponent{tag="GET" text="/v1/orders/{order\_id}" href="/developers/en/reference/online-payments/checkout-pro/get-order/get"}. With that information, you can make the necessary updates to your platform, such as updating an approved payment. :::::