Body
application/json
Payment Schema
Webhook payload for payment.failed events
Example:
{
"id": "trxn_ABC123DEF456GHI",
"customerId": "cus_MNO345PQR678STU",
"object": "transaction",
"environment": "development",
"type": "payment",
"amount": 1000,
"description": "Payment for Order #12345 - Premium Subscription",
"currency": "KES",
"status": "completed",
"phoneNumber": "254712345678",
"receiptNumber": "QMF7MBB5ED",
"fee": 100,
"netAmount": 900,
"failureReason": null,
"metadata": {},
"source": "api",
"processedAt": "2024-12-19T10:30:00.000Z",
"createdAt": "2024-12-19T10:25:00.000Z",
"paidAt": "2024-12-19T10:32:00.000Z",
"failedAt": null
}
ISO 8601 timestamp when the event occurred
Example:
"2021-01-01T00:00:00Z"
Event type for payment.failed
Example:
"payment.failed"
Object type, always "event"
Example:
"event"
Response
200
Webhook received successfully