💳Payment Refunded
payment.refundedv1.0
Triggered when a refund is issued
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
idstring
required
Refund transaction ID
originalPaymentIdstring
required
Original payment ID
amountnumber
required
Refund amount in cents
reasonstring
Refund reason
refundedAtstring
required
date-time
Integration Examples
Example code for handling this event
// Handle payment.refunded event
app.post('/webhook', async (req, res) => {
const event = req.body;
if (event.type === 'payment.refunded') {
// Process the event
console.log('Received Payment Refunded:', event.data);
// Your business logic here
// Update payment status
await updatePaymentStatus(event.data.id, event.data.status);
}
res.status(200).json({ received: true });
});