Configure notifications
If you wish, you can receive notifications from Webhooks. These are sent from our Integrations API to your receiving system through an HTTP POST
call in relation to the status changes presented by a payment intent.
To integrate Webhook notifications, follow the instructions shown in this documentation.
Examples of notification statuses
Once you have implemented the notifications and made the necessary adjustments, they will have the following format:
Finished Status:
json
{
"amount": 100,
"caller_id": 09876543,
"client_id": 1234567890,
"created_at": "2021-11-29 17:10:37",
"id": "abcdef123-8ab5-4139-9aa3-abcd123",
"payment": {
"id": 123456789,
"state": "approved",
"type": "credit_card"
},
"state": "FINISHED",
"additional_info": {
"external_reference": "information",
"ticket_number": "39SHDKKDJ"
}
}
Canceled Status:
json
{
"amount": 100,
"caller_id": 09876543,
"client_id": 1234567890,
"created_at": "2021-11-29 17:10:37",
"id": "abcdef123-8ab5-4139-9aa3-abcd123",
"state": "CANCELED",
"additional_info": {
"external_reference": "information",
"ticket_number": "39SHDKKDJ"
}
}
Error Status:
json
{
"amount": 100,
"caller_id": 09876543,
"client_id": 1234567890,
"created_at": "2021-11-29 17:10:37",
"id": "abcdef123-8ab5-4139-9aa3-abcd123",
"state": "ERROR",
"additional_info": {
"external_reference": "information",
"ticket_number": "39SHDKKDJ"
}
}
Notifications from my point devices
You can receive notifications about events generated by each of your point devices, in this way you will achieve have control and monitoring of your devices. These notifications may be caused by:
- Terminal restarts.
- Logouts.
- Change in the operating mode from PDV to STANDALONE or vice versa.
The notifications will reach your email registered in MercadoPago, in case you cannot find it, make sure to check your SPAM folder.
Notification Example.
Enable notifications
To activate the notifications it is necessary to enable the integrator's email channel, you can use the following command:
curl
curl --location --request PATCH 'https://api.mercadopago.com/point/integration-api/integrator' \
--header 'Authorization: Bearer ${ACCESS_TOKEN}' \
--header 'Content-Type: application/json' \
--data-raw '{
"event_channel_devices": [
"email"
]
}'
Check enabled channels.
Once the notification channel is configured, you can check its status by executing the following command:
curl
curl --location --request GET 'https://api.mercadopago.com/point/integration-api/integrator' \
--header 'Authorization: Bearer ${ACCESS_TOKEN}'
Response example:
json
{
"id": 1234567890,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0002-02-02T00:00:00Z",
"notification_url_enabled": true,
"event_channel_devices": [
"email"
]
}