Getting Started

Follow this guide to integrate StayInLagos into your application in minutes.

Prerequisites

  • A StayInLagos developer account
  • Basic knowledge of REST APIs
  • HTTPS-enabled server for webhooks (production)
1

Create a Developer Account

Sign up for a StayInLagos developer account to get started.

2

Generate API Keys

Create API keys from your developer dashboard. You'll get a public key and a secret key.

// Store your keys securely
const API_KEY = 'sil_pk_live_xxxxxxxxxxxxx';
const API_SECRET = 'sil_sk_live_xxxxxxxxxxxxx';
3

Make Your First Request

Test your integration by fetching available properties.

const response = await fetch('https://api.stayinlagos.com/v1/properties', {
  headers: {
    'Authorization': 'Bearer ' + API_KEY,
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);
4

Handle Webhooks

Set up webhook endpoints to receive real-time updates on bookings and payments.

// Express.js webhook handler
app.post('/webhooks/stayinlagos', (req, res) => {
  const event = req.body;

  switch(event.type) {
    case 'booking.created':
      handleNewBooking(event.data);
      break;
    case 'booking.confirmed':
      handleBookingConfirmation(event.data);
      break;
    case 'payment.completed':
      handlePayment(event.data);
      break;
  }

  res.status(200).send('OK');
});

Official SDKs

Use our official SDKs for faster integration:

JavaScript/Node.jsAvailable
PythonAvailable
PHPAvailable
RubyComing Soon
GoComing Soon

Need help getting started?