💳Payment Completed

payment.completed
v1.0

Triggered when a payment is successfully processed

Webhook Delivery

This event can be delivered to your webhook endpoint

Real-time Streaming

This event does not support real-time streaming

Event Details

Schema definition and example payload

Event Properties

object
id
string
required

Payment transaction ID

bookingId
string

Associated booking ID

amount
number
required

Payment amount in cents

currency
string
required

Currency code (e.g., USD)

method
string
required
Enum: cardbankcredits
processedAt
string
required
date-time

Integration Examples

Example code for handling this event

// Handle payment.completed event
app.post('/webhook', async (req, res) => {
  const event = req.body;
  
  if (event.type === 'payment.completed') {
    // Process the event
    console.log('Received Payment Completed:', event.data);
    
    // Your business logic here
    
    // Update payment status
    await updatePaymentStatus(event.data.id, event.data.status);
    
    
  }
  
  res.status(200).json({ received: true });
});