Webhooks

Mangobeds webhooks allow you to receive real-time notifications about specific events related to your property. This guide will walk you through setting up and managing webhooks for your Mangobeds property.

Setting Up Webhooks

  1. Navigate to Webhooks:
    • Go to the Apps section in your Mangobeds dashboard.
    • Select the Webhooks app.
  2. Create a New Webhook:
    • Click the New button to create a new webhook.
  3. Enter Endpoint URL:
    • In the Endpoint URL field, enter the URL where you want to receive the webhook notifications.
  4. Select Events:
    • Choose the events you want to subscribe to. The available events are:
      • booking.confirmed: Triggered when a booking is confirmed.
      • booking.updated: Triggered when a booking is updated.
      • booking.canceled: Triggered when a booking is canceled.
  5. Save the Webhook:
    • Click Save to register the webhook.

Testing Webhooks

  1. Trigger Event:
    • To test a webhook, click the Trigger Event button.
    • Select the event you want to test (e.g., booking.confirmed).
  2. View Response:
    • The response window will show the details of the triggered event and the payload sent to your endpoint.

Webhook Body

When an event occurs, Mangobeds sends a POST request to the specified endpoint URL with a body that includes the event and payload.

Below is an example of the body for the booking.confirmed event:

{
      "event": "booking.confirmed",
      "payload": {
        "propertyId": "clx741jp60001we5pk2yhv9a6",
        "bookingId": "we5pk2yhv9a6clx741jp60001",
        "status": "Confirmed",
        "createdAt": "2024-05-14T15:44:34.562Z",
        "startDate": "2024-06-06T15:44:34.562Z",
        "endDate": "2024-06-20T15:44:34.562Z",
        "guests": [
          {
            "name": "Joé Veber",
            "email": "joey@indacloudsss.com",
            "phone": "+33612345678",
            "address": {
              "line1": "3 Rue Louis Fauré",
              "city": "Briançon",
              "state": "Briançon",
              "postalCode": "05100"
            },
            "country": "FR",
            "isMainGuest": true
          }
        ],
        "totalPrice": 100,
        "units": [
          {
            "unitName": "Double Room 1"
          }
        ],
        "payments": [
          {
            "paymentId": "we5pk2jp60001yhv9a6clx741",
            "provider": "Stripe",
            "externalId": "pi_3P3gliD1dvZgGttz0SpiG6ki",
            "createdAt": "2024-05-14T15:44:34.562Z",
            "amount": 100
          }
        ],
        "source": {
           "origin": "Airbnb",
           "externalId": "HM2J82JHD",
           "comission": 10
        }
      }
    }

For any questions or further assistance, contact our support team.

You may also like

How to Create and Use Coupons in Mangobeds

How to Create and Use Coupons in Mangobeds

Creating coupons in Mangobeds is a powerful way to enhance your marketing efforts, track the success of your campaigns, and collaborate effectively with influencers. By offering discounts through coupons, you can attract more attendees to your coliving, retreats,...

How to Find Your iCal on Mapmelon

What is an iCal link? An iCal link is a special internet address (URL) that looks similar to this: https://www.mapmelon.com/api/ical/unit/clx91h26y0045mk2giga4jug0 Each room on Booking.com has a unique link address. The link is made up of the: Site...

How to Find Your iCal on Booking.com

How to Find Your iCal on Booking.com

What is an iCal link? An iCal link is a special internet address (URL) that looks similar to this: https://admin.booking.com/hotel/hoteladmin/ical.html?t=d3a333333333333333333 Each room on Booking.com has a unique link address. The link is made up of the: Site...