Configuration
How to configure webhooks for your MyTPE Pay instance via the dashboard or API.
Webhook Configuration
You can configure webhooks via the MyTPE Pay dashboard or the API.
Via Dashboard
Navigate to your instance
Go to MyTPE Pay > Select your instance > Webhook & API Keys section.
Enter your webhook URL
Click "Configurer" and enter your HTTPS endpoint URL (e.g., https://api.yourapp.com/webhooks/mytpe).
Save
Click "Enregistrer". A signing secret (whsec_...) is automatically generated and displayed. Copy it now — it will be masked on subsequent visits.
Done
Your endpoint will now receive signed webhook notifications for every transaction event on this instance.
Managing Your Webhook
| Action | How |
|---|---|
| View secret | Click the eye icon next to the masked secret |
| Copy secret | Click the copy icon |
| Change URL | Click "Modifier", update the URL, save |
| Regenerate secret | Click the refresh icon (invalidates the old secret) |
| Remove webhook | Click "Supprimer" (stops all webhook deliveries) |
Via API
Get Webhook Configuration
GET /api/v2/mytpe-pay/{instanceId}/webhookResponse:
{
"success": true,
"data": {
"webhook_url": "https://api.yourapp.com/webhooks/mytpe",
"webhook_secret": "************************************sec_a1b2c3",
"has_secret": true
}
}The secret is masked in GET responses. The full secret is only shown when first created or regenerated.
Set or Update Webhook URL
PUT /api/v2/mytpe-pay/{instanceId}/webhook
Content-Type: application/json
{
"webhook_url": "https://api.yourapp.com/webhooks/mytpe"
}Response (first time — includes full secret):
{
"success": true,
"message": "Webhook updated successfully",
"data": {
"webhook_url": "https://api.yourapp.com/webhooks/mytpe",
"webhook_secret": "whsec_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"has_secret": true
}
}Regenerate Secret
POST /api/v2/mytpe-pay/{instanceId}/webhook/regenerate-secretResponse:
{
"success": true,
"message": "Webhook secret regenerated",
"data": {
"webhook_secret": "whsec_new_secret_here_x1y2z3..."
}
}Secret Regeneration
Regenerating the secret immediately invalidates the old one. Update your server's configuration before the next webhook fires, or you'll fail signature verification.
Remove Webhook
PUT /api/v2/mytpe-pay/{instanceId}/webhook
Content-Type: application/json
{
"webhook_url": null
}This removes the URL and clears the secret. No more webhooks will be sent.