Webhooks

Real-time event notifications for your application

Real-time Events Secure Delivery Retry Mechanism Easy Integration
Event

payment.created

Triggered when a new payment is created

POST /webhook-endpoint
Event

payment.completed

Triggered when a payment is successfully completed

POST /webhook-endpoint
Event

payment.failed

Triggered when a payment fails to process

POST /webhook-endpoint
Event

payment.refunded

Triggered when a payment is refunded

POST /webhook-endpoint
Event

payment_link.created

Triggered when a payment link is created

POST /webhook-endpoint
Event

customer.created

Triggered when a new customer is registered

POST /webhook-endpoint

Webhook Example

Example of a webhook payload and how to handle it

// Example webhook payload { "event": "payment.completed", "timestamp": "2026-07-25T10:35:00Z", "data": { "id": "pay_123456789", "amount": 10000, "currency": "TZS", "status": "completed", "method": "mobile_money", "customer": { "name": "John Doe", "phone": "+255700000000", "email": "john@example.com" }, "completed_at": "2026-07-25T10:35:00Z", "created_at": "2026-07-25T10:30:00Z" } } // PHP example: handling the webhook $payload = file_get_contents('php://input'); $data = json_decode($payload, true); if ($data['event'] === 'payment.completed') { // Handle completed payment $paymentId = $data['data']['id']; // Update your database, send confirmation, etc. updateOrderStatus($paymentId, 'completed'); } // Always respond with 200 OK http_response_code(200); echo 'OK';

Ready to Integrate Webhooks?

Get started with webhooks and receive real-time notifications for your application.

View API Reference
Contact us

Contact Us

WhatsApp +255 678 520 538

AI Assistant

👋 Hello! I'm PigaPay's AI assistant. How can I help you today?