Webhook Controller handle Mercado Pago
curl --request POST \
--url https://api.raul.ugps.io/api/v1/webhooks/mercadopago \
--header 'Content-Type: application/json' \
--header 'x-request-id: <x-request-id>' \
--header 'x-signature: <x-signature>' \
--data '
{
"resource": "<string>",
"topic": "<string>",
"type": "<string>",
"action": "<string>",
"data": {
"id": "<string>"
},
"id": "<string>",
"live_mode": true,
"user_id": "<string>",
"api_version": "<string>",
"date_created": "<string>"
}
'import requests
url = "https://api.raul.ugps.io/api/v1/webhooks/mercadopago"
payload = {
"resource": "<string>",
"topic": "<string>",
"type": "<string>",
"action": "<string>",
"data": { "id": "<string>" },
"id": "<string>",
"live_mode": True,
"user_id": "<string>",
"api_version": "<string>",
"date_created": "<string>"
}
headers = {
"x-signature": "<x-signature>",
"x-request-id": "<x-request-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-signature': '<x-signature>',
'x-request-id': '<x-request-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
resource: '<string>',
topic: '<string>',
type: '<string>',
action: '<string>',
data: {id: '<string>'},
id: '<string>',
live_mode: true,
user_id: '<string>',
api_version: '<string>',
date_created: '<string>'
})
};
fetch('https://api.raul.ugps.io/api/v1/webhooks/mercadopago', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.raul.ugps.io/api/v1/webhooks/mercadopago",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resource' => '<string>',
'topic' => '<string>',
'type' => '<string>',
'action' => '<string>',
'data' => [
'id' => '<string>'
],
'id' => '<string>',
'live_mode' => true,
'user_id' => '<string>',
'api_version' => '<string>',
'date_created' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-request-id: <x-request-id>",
"x-signature: <x-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.raul.ugps.io/api/v1/webhooks/mercadopago"
payload := strings.NewReader("{\n \"resource\": \"<string>\",\n \"topic\": \"<string>\",\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"data\": {\n \"id\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"live_mode\": true,\n \"user_id\": \"<string>\",\n \"api_version\": \"<string>\",\n \"date_created\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-signature", "<x-signature>")
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.raul.ugps.io/api/v1/webhooks/mercadopago")
.header("x-signature", "<x-signature>")
.header("x-request-id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"<string>\",\n \"topic\": \"<string>\",\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"data\": {\n \"id\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"live_mode\": true,\n \"user_id\": \"<string>\",\n \"api_version\": \"<string>\",\n \"date_created\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/webhooks/mercadopago")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-signature"] = '<x-signature>'
request["x-request-id"] = '<x-request-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource\": \"<string>\",\n \"topic\": \"<string>\",\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"data\": {\n \"id\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"live_mode\": true,\n \"user_id\": \"<string>\",\n \"api_version\": \"<string>\",\n \"date_created\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyWebhook
Webhook Controller handle Mercado Pago
POST
/
api
/
v1
/
webhooks
/
mercadopago
Webhook Controller handle Mercado Pago
curl --request POST \
--url https://api.raul.ugps.io/api/v1/webhooks/mercadopago \
--header 'Content-Type: application/json' \
--header 'x-request-id: <x-request-id>' \
--header 'x-signature: <x-signature>' \
--data '
{
"resource": "<string>",
"topic": "<string>",
"type": "<string>",
"action": "<string>",
"data": {
"id": "<string>"
},
"id": "<string>",
"live_mode": true,
"user_id": "<string>",
"api_version": "<string>",
"date_created": "<string>"
}
'import requests
url = "https://api.raul.ugps.io/api/v1/webhooks/mercadopago"
payload = {
"resource": "<string>",
"topic": "<string>",
"type": "<string>",
"action": "<string>",
"data": { "id": "<string>" },
"id": "<string>",
"live_mode": True,
"user_id": "<string>",
"api_version": "<string>",
"date_created": "<string>"
}
headers = {
"x-signature": "<x-signature>",
"x-request-id": "<x-request-id>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-signature': '<x-signature>',
'x-request-id': '<x-request-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
resource: '<string>',
topic: '<string>',
type: '<string>',
action: '<string>',
data: {id: '<string>'},
id: '<string>',
live_mode: true,
user_id: '<string>',
api_version: '<string>',
date_created: '<string>'
})
};
fetch('https://api.raul.ugps.io/api/v1/webhooks/mercadopago', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.raul.ugps.io/api/v1/webhooks/mercadopago",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'resource' => '<string>',
'topic' => '<string>',
'type' => '<string>',
'action' => '<string>',
'data' => [
'id' => '<string>'
],
'id' => '<string>',
'live_mode' => true,
'user_id' => '<string>',
'api_version' => '<string>',
'date_created' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-request-id: <x-request-id>",
"x-signature: <x-signature>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.raul.ugps.io/api/v1/webhooks/mercadopago"
payload := strings.NewReader("{\n \"resource\": \"<string>\",\n \"topic\": \"<string>\",\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"data\": {\n \"id\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"live_mode\": true,\n \"user_id\": \"<string>\",\n \"api_version\": \"<string>\",\n \"date_created\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-signature", "<x-signature>")
req.Header.Add("x-request-id", "<x-request-id>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.raul.ugps.io/api/v1/webhooks/mercadopago")
.header("x-signature", "<x-signature>")
.header("x-request-id", "<x-request-id>")
.header("Content-Type", "application/json")
.body("{\n \"resource\": \"<string>\",\n \"topic\": \"<string>\",\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"data\": {\n \"id\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"live_mode\": true,\n \"user_id\": \"<string>\",\n \"api_version\": \"<string>\",\n \"date_created\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/webhooks/mercadopago")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-signature"] = '<x-signature>'
request["x-request-id"] = '<x-request-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"resource\": \"<string>\",\n \"topic\": \"<string>\",\n \"type\": \"<string>\",\n \"action\": \"<string>\",\n \"data\": {\n \"id\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"live_mode\": true,\n \"user_id\": \"<string>\",\n \"api_version\": \"<string>\",\n \"date_created\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Recurso notificado por Mercado Pago (IPN)
Tipo de notificación IPN de Mercado Pago
Mercado Pago notification type
Mercado Pago notification action
Show child attributes
Show child attributes
Mercado Pago notification ID
Whether the notification is live
Mercado Pago user ID
Mercado Pago API version
Notification creation timestamp
Response
200