Skip to main content
POST
/
payment.completed

Authorizations

Authorization
string
header
required

The API key to use for authentication

Body

application/json

Payment Schema

Webhook payload for payment.completed events

data
object
required
Example:
{
"id": "trxn_ABC123DEF456GHI",
"productId": "prod_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
}
timestamp
string
required

ISO 8601 timestamp when the event occurred

Example:

"2021-01-01T00:00:00Z"

type
string
default:payment.completed

Event type for payment.completed

Example:

"payment.completed"

object
string
default:event

Object type, always "event"

Example:

"event"

Response

200

Webhook received successfully