Webhook Overview
Receive real-time notifications when payment events occur on your MyTPE Pay instance.
Webhooks
Webhooks allow your application to receive real-time HTTP notifications when events occur on your MyTPE Pay instance — such as a successful payment, a failed transaction, or a link status change.
Instead of polling the API to check for updates, MyTPE Pay pushes data to your server the moment something happens.
Stripe-like Security
MyTPE Pay webhooks follow the same security model as Stripe and PayPal — every webhook is signed with HMAC-SHA256, includes a timestamp for replay protection, and a unique delivery ID for idempotency.
How It Works
Benefits
- Real-time — Get notified instantly when a transaction status changes
- Secure — Every request is signed with your unique secret key
- Reliable — Automatic retries with exponential backoff (3 attempts)
- Idempotent — Each delivery has a unique ID to prevent duplicate processing
- Simple — Just provide a URL, we handle the rest
What You Can Track
Transaction Events
| Event | Description |
|---|---|
transaction.completed | Payment was successful |
transaction.failed | Payment failed or timed out |
transaction.refused | Payment was refused by the bank |
transaction.pending | Transaction is awaiting payment |
transaction.processing | Payment is being processed |
Pay Link Events
| Event | Description |
|---|---|
pay_link.created | New payment link created |
pay_link.updated | Link details changed |
pay_link.activated | Link set to active |
pay_link.deactivated | Link manually deactivated |
pay_link.closed | Link closed (max payments reached) |
pay_link.expired | Link expired |
pay_link.deleted | Link deleted |
Quick Start
Configure your webhook URL
Go to your MyTPE Pay instance settings and enter your HTTPS endpoint URL.
A signing secret (whsec_...) is automatically generated.
Copy your signing secret
Store it securely in your server's environment variables.
Implement the endpoint
Create a POST endpoint on your server that receives JSON payloads and verifies the signature.
Process events
Parse the event type and transaction data to update your system accordingly.
Next Steps
- Security & Signatures — How webhook signing works
- Configuration — Set up your webhook URL
- Events Reference — All event types and payloads
- Integration Guide — Code examples in multiple languages